How should files be moved in the glibc repository
Steve Ellcey
sellcey@caviumnetworks.com
Tue Nov 29 23:26:00 GMT 2016
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
More information about the Libc-alpha
mailing list