Removing trailing whitespace [was Re: [frogs] Patch for Issue #830] |
[ Thread Index | Date Index | More lilynet.net/frogs Archives ]
Carl Sorensen wrote Monday, December 21, 2009 4:41 PM
On 12/21/09 9:11 AM, "Trevor Daniels" <t.daniels@xxxxxxxxxxx> wrote:Carl Sorensen wrote" <c_sorensen@xxxxxxx>so you can do git rebase --whitespace=fix HEAD^Hhm. I don't think this works. The whitespace option is simply passed to apply for actioning, but in this case apply is never invoked as HEAD is already up to date. But please correct me if you find it does work, as this would certainly be an easier option.On my system it works:
[snip]
Have I missed something?
No; it was I that missed something - as Reinhold pointed out I missed the ^. Sorry. I also learned something. Using --whitespace=warn does nothing, because apply is not invoked, but --whitespace=fix forces a rebase, and hence apply is invoked. So how does this sound: To remove trailing whitespace during git am use git am --whitespace=fix ... To remove trailing whitespace from the last commit in master use git rebase --whitespace=fix HEAD^ To remove training whitespace from all divergent commits in branch <branch> during a branch rebase use git rebase --whitespace=fix master <branch> (The latter is already in CG in git as of this morning) Trevor --- ---- Join the Frogs!
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |