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


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


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