* Suggested workflow for frequent directory renames.
@ 2009-05-26 0:17 Matthew Clemence
2009-05-26 9:24 ` Jakub Narebski
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Clemence @ 2009-05-26 0:17 UTC (permalink / raw
To: git
Dear git users,
I am working with an externally supplied code tree (some 2000 files,
which gets passed to me without any SCM) and have multiple users wokring
on their own individual branched versions under git control. The problem
I am facing is that there are frequenct directory renames when the code
updates which I need to find a relatively painless way of bringing the
users branches up to date. From reading the lists and faq, there seems
to be problems (and strong opinions) with this, and I am struggling to
find an effcient model to manage this merging - either git loses track
of the users changed files (and so have to be manually merged from diff
files and usually lose history) or git loses track of everything else
(and I end up manually adding files from the new tree to get out of
merge conflict).
I would be very interested to hear if anyone has a suggestion on how
this could best be handled.
Many thanks
Matthew
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Suggested workflow for frequent directory renames.
2009-05-26 0:17 Suggested workflow for frequent directory renames Matthew Clemence
@ 2009-05-26 9:24 ` Jakub Narebski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Narebski @ 2009-05-26 9:24 UTC (permalink / raw
To: Matthew Clemence; +Cc: git
Matthew Clemence <matthew.clemence@virgin.net> writes:
> I am working with an externally supplied code tree (some 2000 files,
> which gets passed to me without any SCM) and have multiple users
> working on their own individual branched versions under git
> control. The problem I am facing is that there are frequenct directory
> renames when the code updates which I need to find a relatively
> painless way of bringing the users branches up to date.
Hmmm... are you sure you are solving the correct problem? Can't you
avoid directory renames, e.g. by munging position of files before
entering them into SCM?
> From reading
> the lists and faq, there seems to be problems (and strong opinions)
> with this, and I am struggling to find an effcient model to manage
> this merging - either git loses track of the users changed files (and
> so have to be manually merged from diff files and usually lose
> history) or git loses track of everything else (and I end up manually
> adding files from the new tree to get out of merge conflict).
>
> I would be very interested to hear if anyone has a suggestion on how
> this could best be handled.
Git, contrary to other version control systems such as Mercurial or
Bazaar, doesn't use tracking of renames (either via recording rename
event, or by using file identities / inodes), but heuristic similarity
based rename _detection_. If the files are of sufficient size
compared to changes, rename detection should work well and when
merging changes should be applied to correct files / correct files
would be renamed. Changing directory the file resides in is currently
in Git just the form of changing pathname of a file, i.e. renaming of
a file. Rename detection uses similarity of filename as one of
factors so if basename didn't change git should correctly pair files.
The problem currently is when one side renames directory, and other
side creates new file in the old-name directory. Rename tracking
would not help here unless SCM track also directory renames, like
Bazaar reportedly does.
But the problem is not impossible to overcome using rename detection
like in git. There were even patches adding detection of wholesame
directory renaming (factoring out directory renames out of set of
detected file renames) by Yann Dirson, but they were not accepted for
some reason. You migh want to either contact author, or clean up the
series and send them yourself (if possibly with use cases and success
stories):
http://thread.gmane.org/gmane.comp.version-control.git/99529
See also directory rename detection script (in Perl) in
http://permalink.gmane.org/gmane.comp.version-control.git/81547
BTW. This issue was discussed extensively on git mailing list...
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-26 9:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-26 0:17 Suggested workflow for frequent directory renames Matthew Clemence
2009-05-26 9:24 ` Jakub Narebski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.