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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, 4 Feb 2008, Jakub Narebski wrote:

> 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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux