git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git rebase --whitespace

From
POPatrick Ohly <patrick.ohly@intel.com>
Date
Nov 11, 2008, 14:12 UTC
Message-ID
<1226412770.17450.839.camel@ecld0pohly>
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
Message 1 of 1 in “git rebase --whitespace”
  1. Patrick OhlyNov 11, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.