# git rebase --whitespace

1 messages from 2008-11-11 to 2008-11-11. Participants: Patrick Ohly.
Thread: https://gitlist.dev/t/16270

## Patrick Ohly, 2008-11-11 14:12

Subject: git rebase --whitespace
Message-ID: <1226412770.17450.839.camel@ecld0pohly>
URL: https://gitlist.dev/e/1226412770.17450.839.camel%40ecld0pohly

```
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.


--- 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

```
