This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: How should files be moved in the glibc repository


Zack Weinberg <zackw@panix.com> writes:
> Steve Ellcey <sellcey@caviumnetworks.com> wrote:

>> I found my problem.  I was doing 'git diff' and not 'git diff HEAD'.
>> The 'git diff' command did not capture renames or deletes when creating
>> a patch, the 'git diff HEAD' command does capture them and then when I
>> apply that patch the old files are no longer there.

> Doing `git config --global diff.renames true` might sort this out.
> Also, for patch submission `git format-patch` is better.

I suspect the problem that Steve is having is that git mv implicitly does
a git add of the moved file, so the diff is in the index and therefore no
longer shows up in git diff by default (which shows only differences not
added to the index).  git diff --cached will show the rename.

You'll be able to see the difference in git status.  The renames will show
up in the portion of the output for changes that one has already used git
add on.

-- 
Russ Allbery (eagle@eyrie.org)              <http://www.eyrie.org/~eagle/>


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