This is the mail archive of the
mailing list for the glibc project.
Re: How should files be moved in the glibc repository
- From: Russ Allbery <eagle at eyrie dot org>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: Steve Ellcey <sellcey at caviumnetworks dot com>, Andreas Schwab <schwab at linux-m68k dot org>, Steve Ellcey <sellcey at cavium dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 28 Nov 2016 20:25:45 -0800
- Subject: Re: How should files be moved in the glibc repository
- Authentication-results: sourceware.org; auth=none
- References: <201611281745.uASHjLIB015416@sellcey-lt.caveonetworks.com> <firstname.lastname@example.org> <email@example.com> <CAKCAbMgvuqWdgqSsYBHbQ-dmFj0+4+9=UEiDx-kDk25WG=EFqw@mail.gmail.com>
Zack Weinberg <firstname.lastname@example.org> writes:
> Steve Ellcey <email@example.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
Russ Allbery (firstname.lastname@example.org) <http://www.eyrie.org/~eagle/>