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
Junio C Hamano <gitster@pobox.com>
Date
Feb 12, 2009, 23:22 UTC
Message-ID
<7viqnfi6la.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<bd6139dc0902121357l1eea7b8xe890513b756e97c2@mail.gmail.com>
Sverre Rabbelier <srabbelier@gmail.com> writes:
Show 23 quoted lines
> On Thu, Feb 12, 2009 at 22:34, Junio C Hamano <gitster@pobox.com> wrote:
>> For that, I would prefer to see:
>>  (1)   git format-patch --stdout origin >my.mbox
>>  (2)   git fetch origin
>>  (3)   git checkout origin             ;# yes, detach
>>  (4)   git am --whitespace=fix my.mbox
>>  (5)   make test
>>  (6)   git format-patch -o to-send-out origin
>>  (7)   git send-email ..options.. to-send-out
>
> If I understand things correctly 'git rebase -f --whitespace=fix
> origin' does only 1 and 4, yes? In my workflow I do 2 and 5 as 'git
> pull --rebase' before I push anything, and since I push rather then
> send-email, I never use 6 and 7. That leaves 3, which I guess is
> specific to your workflow? I am guessing you detach to make it easier
> to easily test many different topic branches.
>
>> It fixes whitespace breakages, but more importantly, the procedure makes
>> sure that what you will be sending out will apply cleanly to the origin
>> that may have progressed since you last looked at it.
>
> Mhhh, would 'git fetch && git rebase -f whitespace=fix orgin' do the
> same? Do you see any other problems with the patch?

No, because I didn't read the patch text; I don't read patches that are larger than 20 lines during the day-job hours.

I was only commenting on your "rebase does not work if I am up to date with respect to origin and here is my workaround".

Obviously neither the "fetch origin and reapply" nor "pull --rebase" would make any difference if you were indeed up to date.

Previous: Sverre RabbelierNext: Sverre Rabbelier
Message 8 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.