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

Re: rebase -i and --whitespace, was Re: [PATCH] git-rebase.sh: Update USAGE string (No. 1)

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 4, 2008, 16:32 UTC
Message-ID
<alpine.LSU.1.00.0802041629140.7372@racer.site>
In-Reply-To
<200802041642.52088.jnareb@gmail.com>
Hi,
On Mon, 4 Feb 2008, Jakub Narebski wrote:
Show 25 quoted lines
> W poniedziałek 4. lutego 2008 16:06, Johannes Schindelin napisał:
> > On Mon, 4 Feb 2008, しらいしななこ wrote:
> > 
> > > I tried to run "git rebase --interactive --whitespace=strip" but it does 
> > > not seem to strip blank characters at the end of my lines.  Did I find a 
> > > bug?
> > 
> > Yes.  Interactive rebase never bothered with --whitespace options, since 
> > it works purely with cherry-pick (the --merge option to non-interactive 
> > rebase).  Therefore, the operation is not patch based, and does not call 
> > git-apply at all (which would handle the whitespace).
> 
> So it means that synopsis should, instead of current (pre-patch)
> 
> 'git-rebase' [-i | --interactive] [-v | --verbose] [-m | --merge]
>         [-C<n>] [ --whitespace=<option>] [-p | --preserve-merges]
>         [--onto <newbase>] <upstream> [<branch>]
> 
> should read
> 
> 'git-rebase' [-v | --verbose]  [-p | --preserve-merges]
>         [{-i | --interactive} | [-C<n>] [ --whitespace=<option>] [-m | --merge]]
>         [--onto <newbase>] <upstream> [<branch>]
> 
> or perhaps even separated into interactive / non-interactive merge?

Or the --merge code path should check if there was any --whitespace option, and re-apply each commit using something like

	git reset --hard HEAD^ &&
	git diff-tree HEAD@{1}..HEAD |
	git apply --index <whitespace options>

Ciao, Dscho

Previous: Jakub NarebskiNext: Junio C Hamano
Message 17 of 20 in “git-rebase.sh: Update USAGE string”
  1. git-rebase.sh: Update USAGE stringJari Aalto, Feb 3, 2008
  2. Jakub NarebskiFeb 3, 2008
  3. git-rebase.sh: Update USAGE string (No. 1)Jari Aalto, Feb 3, 2008
  4. Johannes SchindelinFeb 3, 2008
  5. Jakub NarebskiFeb 3, 2008
  6. Jari AaltoFeb 4, 2008
  7. Johannes SchindelinFeb 4, 2008
  8. Junio C HamanoFeb 4, 2008
  9. Jakub NarebskiFeb 4, 2008
  10. Mike HommeyFeb 4, 2008
  11. Jakub NarebskiFeb 4, 2008
  12. Junio C HamanoFeb 4, 2008
  13. git-rebase.sh: Update USAGE stringJari Aalto, Feb 4, 2008
  14. しらいしななこFeb 4, 2008
  15. rebase -i and --whitespace, was Re: [PATCH] git-rebase.sh: Update USAGE string (No. 1)Johannes Schindelin, Feb 4, 2008
  16. Jakub NarebskiFeb 4, 2008
  17. Johannes SchindelinFeb 4, 2008
  18. Junio C HamanoFeb 5, 2008
  19. Johannes SchindelinFeb 6, 2008
  20. git-rebase.sh: Update USAGE stringJari Aalto, Feb 4, 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.