Re: [PATCH 01/12] Generate unique ID for submodules created using "git submodule add"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Collingbourne wrote:

> This patch causes "git submodule add" to generate a unique ID for
> the submodule which is used as its name.  The ID is generated by
> computing the SHA1 hash of the pid, date and initial path.
> 
> The purpose of this patch is to avoid name conflicts which may
> arise due to the ability to rename submodules.

I assume this is related to Pasky’s patch “git submodule add: Fix
naming clash handling” [1]

	This patch fixes git submodule add behaviour when we add submodule
	living at a same path as logical name of existing submodule. This
	can happen e.g. in case the user git mv's the previous submodule away
	and then git submodule add's another under the same name.
	
	A test-case is obviously included.
	
	This is not completely satisfactory since .git/config cross-commit
	conflicts can still occur. A question is whether this is worth
	handling, maybe it would be worth adding some kind of randomization
	of the autogenerated submodule name, e.g. appending $$ or a timestamp.

The suggestion of _appending_ some nonsense to a submodule name sounds
much more palatable to me than _replacing_ the submodule name with
nonsense.  YMMV, of course.

Regards,
Jonathan

[1] submitted twice: once as part of the series you pointed to and
again in the re-roll at
http://thread.gmane.org/gmane.comp.version-control.git/95763/focus=95769
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]