git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Peter Collingbourne <peter@pcc.me.uk>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 01/12] Generate unique ID for submodules created using "git submodule add"
Date: Sat, 27 Mar 2010 04:44:28 -0500	[thread overview]
Message-ID: <20100327094427.GA30216@progeny.tock> (raw)
In-Reply-To: <1269617140-7827-2-git-send-email-peter@pcc.me.uk>

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

  reply	other threads:[~2010-03-27  9:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26 15:25 [PATCH 00/12] Improve handling of moving and removing submodules Peter Collingbourne
2010-03-26 15:25 ` [PATCH 01/12] Generate unique ID for submodules created using "git submodule add" Peter Collingbourne
2010-03-27  9:44   ` Jonathan Nieder [this message]
2010-04-03 20:04     ` Peter Collingbourne
2010-04-03 20:04     ` [PATCH 1/2] Prefix submodule names with the path basename Peter Collingbourne
2010-04-03 20:04     ` [PATCH 2/2] Truncate the SHA1 part of the submodule name to 7 characters Peter Collingbourne
2010-03-26 15:25 ` [PATCH 02/12] Implement "git mv" for submodules Peter Collingbourne
2010-03-26 15:25 ` [PATCH 03/12] git rm: display a warning for every unremovable file Peter Collingbourne
2010-03-27 11:01   ` Jonathan Nieder
2010-03-26 15:25 ` [PATCH 04/12] Generalise the unlink_or_warn function Peter Collingbourne
2010-03-26 15:25 ` [PATCH 05/12] Implement the rmdir_or_warn function Peter Collingbourne
2010-03-26 15:25 ` [PATCH 06/12] Introduce remove_or_warn function Peter Collingbourne
2010-03-26 15:25 ` [PATCH 07/12] Remove a redundant errno test in a usage of remove_path Peter Collingbourne
2010-03-26 15:25 ` [PATCH 08/12] git rm: collect file modes Peter Collingbourne
2010-03-26 15:25 ` [PATCH 09/12] Add a mode parameter to the remove_path function Peter Collingbourne
2010-03-26 15:25 ` [PATCH 10/12] git rm: do not abort due to an initialised submodule Peter Collingbourne
2010-03-26 15:25 ` [PATCH 11/12] git submodule: infrastructure for reading .gitmodules files in arbitrary locations Peter Collingbourne
2010-03-26 15:25 ` [PATCH 12/12] git rm: remove submodule entries from .gitmodules Peter Collingbourne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100327094427.GA30216@progeny.tock \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peter@pcc.me.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).