This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New file extension


>>>>> Martin Jambor <mjambor@suse.cz>:

> Well, IIRC mostly worries about history.  SVN claims to be able to
> track history of renamed files but I use the git mirror now and I
> wonder what the history would show there.  I would consider it very
> unfortunate if 'git blame' did not show the .c era history of the
> renamed files.  But maybe it would just work.

It depends on how the rename if done.  If a file is added that has the
exact same SHA1 hash as a file with a different path, then git assumes
that the new file is a copy of the other file, and blame and the log
history can be made to follow the history beyond the copy.  Actually
"git blame" always follow the history across renames, and "git log"
needs the "--follow" option, or a config setting, to do so.

I have no idea what git-svn (or whatever) will do when it comes to an
svn rename, but it would make sense if it replicated it by a commit that
does a git rm of the file in the old location, and a git add of the file
in the new location.

If the svn rename also changes the renamed file, then things get
trickier... git-svn would have to split that commit into two.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]