Git development
 help / color / mirror / Atom feed
* git rebase --whitespace
@ 2008-11-11 14:12 Patrick Ohly
  0 siblings, 0 replies; only message in thread
From: Patrick Ohly @ 2008-11-11 14:12 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 986 bytes --]

Hello!

I tried to use "git --rebase --whitespace=..." and noticed some
oddities. Git 1.6.0.4.

      * --whitespace is not supported when using --interactive. Should
        be mentioned in the docs.
      * Without --interactive, rebase will bail out early if the current
        branch is up-to-date. I was trying to use --whitespace=fix to
        clean up my patches and had to patch git-rebase (see attached),
        otherwise it didn't let me do that.
      * The documentation mentions --whitespace=check, but "check" is
        not a valid option.

I don't have time to fix the documentation, but I thought I should at
least mention the issues and send the patch your way in case someone
finds it useful.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.

[-- Attachment #2: git-rebase-whitespace.patch --]
[-- Type: text/x-patch, Size: 496 bytes --]

--- git-1.6.0.4/git-rebase.sh	2008-11-09 07:53:38.000000000 +0100
+++ git-1.6.0.4/git-rebase.sh.patched	2008-11-11 15:10:27.000000000 +0100
@@ -375,6 +375,7 @@
 # but this should be done only when upstream and onto are the same.
 mb=$(git merge-base "$onto" "$branch")
 if test "$upstream" = "$onto" && test "$mb" = "$onto" &&
+        ! (echo $git_am_opt | grep -e --whitespace ) > /dev/null &&
 	# linear history?
 	! (git rev-list --parents "$onto".."$branch" | grep " .* ") > /dev/null
 then

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-11 14:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-11 14:12 git rebase --whitespace Patrick Ohly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox