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

Re: [RFC PATCH] Teach rebase to rebase even if upstream is up to date with -f

From
Sverre Rabbelier <srabbelier@gmail.com>
Date
Feb 13, 2009, 06:51 UTC
Message-ID
<bd6139dc0902122251j24696806xb89de3e338d49cb@mail.gmail.com>
In-Reply-To
<7vd4dmg8k1.fsf@gitster.siamese.dyndns.org>
On Fri, Feb 13, 2009 at 07:22, Junio C Hamano <gitster@pobox.com> wrote:
> I thought I left it up to you ;-).
Ah, I failed to notice that, my bad.
Show 6 quoted lines
> I can not think of a practical purpose of "git rebase -f" without other
> options that actively modify the tree each commit records (e.g. the "fix
> whitespace" option), perhaps other than to pretend that you committed them
> later than you actually did.  A patch that implements --force alone is
> harder to justify, because it is unclear what good it does.  It is
> especially true if you make --whitespace=fix imply that behaviour.
Agreed, thanks for the explanation.
Show 5 quoted lines
> One more thing.  I kept saying "detect --whitespace=fix (or its synonym
> strip)" because people can have "apply.whitespace = fix" in their
> configuration file for use with "git am", and countermand the
> configuration with "git rebase --whitespace=warn".  Such a usage should
> not imply --force.

Ok, so having 'apply.whitespace = fix' in your config _should_ imply -f, and '--whitespace=[no]warn' as commandline option should not affect '-f'. This does mean though that anyone with 'apply.whitespace = fix' in their git config that does a rebase on an up-to-date branch will automagically have the whitespace fixed. Then again, that behavior is probably desired for those with 'apply.whitespace = fix' set.

I'll look into making --whitespace=fix/strip imply -f then, and this time add some tests :).

-- 
Cheers,

Sverre Rabbelier
Previous: Junio C HamanoNext: Junio C Hamano
Message 13 of 14 in “Teach rebase to rebase even if upstream is up to date with -f”
  1. Teach rebase to rebase even if upstream is up to date with -fSverre Rabbelier, Feb 12, 2009
  2. Johannes SchindelinFeb 12, 2009
  3. Sverre RabbelierFeb 12, 2009
  4. Johannes SchindelinFeb 12, 2009
  5. Sverre RabbelierFeb 12, 2009
  6. Junio C HamanoFeb 12, 2009
  7. Sverre RabbelierFeb 12, 2009
  8. Junio C HamanoFeb 12, 2009
  9. Sverre RabbelierFeb 12, 2009
  10. Junio C HamanoFeb 13, 2009
  11. Sverre RabbelierFeb 13, 2009
  12. Junio C HamanoFeb 13, 2009
  13. Sverre RabbelierFeb 13, 2009
  14. Junio C HamanoFeb 13, 2009

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.