This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: How should files be moved in the glibc repository
- From: Steve Ellcey <sellcey at caviumnetworks dot com>
- To: Russ Allbery <eagle at eyrie dot org>, Zack Weinberg <zackw at panix dot com>
- Cc: 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: Tue, 29 Nov 2016 15:26:36 -0800
- Subject: Re: How should files be moved in the glibc repository
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steve dot Ellcey at cavium dot com;
- References: <201611281745.uASHjLIB015416@sellcey-lt.caveonetworks.com> <87d1hfqybg.fsf@linux-m68k.org> <1480358057.14808.8.camel@caviumnetworks.com> <CAKCAbMgvuqWdgqSsYBHbQ-dmFj0+4+9=UEiDx-kDk25WG=EFqw@mail.gmail.com> <87fuma6hfa.fsf@hope.eyrie.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Mon, 2016-11-28 at 20:25 -0800, Russ Allbery wrote:
>
> 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.
I think this was the basis of my problem. I thought 'git rm/add' might
be different than 'git mv' with respect to this but they aren't. I had
never used the --cached option on diff before. Of course in order to
use --cached I had to use 'git add' on all the files I modified so that
the patch included the files I modified as well as the ones I moved.
That was what I eventually did.
I did commit all my changes locally and run format-patch at one point,
that worked OK though I don't like how it uses the commit comment as
the text of the email since I would normally have different text and
comments in those two different places. Yes, I realize I can edit the
email before I send it. I didn't send my patch this way ultimitely
because I had committed my changes on the master branch (locally), then
before sending anything I wanted to update it with any changes from the
FSF tree so I did a 'git pull'. That worked and it seemed to merge my
changes with the latest FSF changes but after I had done that I
couldn't figure out how to use format-patch to recreate my patch, i.e.
I couldn't figure out how to specify what version/diff to use when
building my patch. When I just did 'git format-patch', or 'git format-
patch HEAD', or 'git format-patch HEAD~' I either got nothing or a
whole bunch of patches that were not my changes. Maybe I should have
commited my changes on a local branch instead of on the local master
but I hadn't.
Steve Ellcey
sellcey@caviumnetworks.com