From: Thomas Rast <trast@inf.ethz.ch>
To: Junio C Hamano <gitster@pobox.com>
Cc: Andrew Pimlott <andrew@pimlott.net>, git <git@vger.kernel.org>
Subject: Re: [PATCH] rebase -i: fixup fixup! fixup!
Date: Sun, 16 Jun 2013 13:08:18 +0200 [thread overview]
Message-ID: <87ip1e2tzx.fsf@hexa.v.cablecom.net> (raw)
In-Reply-To: <7vk3lvlmat.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Sat, 15 Jun 2013 03:07:22 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Andrew Pimlott <andrew@pimlott.net> writes:
>
>> Excerpts from Andrew Pimlott's message of Fri Jun 14 12:31:57 -0700 2013:
>>> It happened to work and I added a test. But then it occurred to me that
>>> it might have been better to fix commit --fixup/--squash to strip the
>>> fixup! or squash! from the referenced commit in the first place.
>>> Anyhow, below is my patch for --autosquash, but unles someone has an
>>> objection to doing it in commit, I'll work on that.
>
> Is it always true that you would squash and fixup in the same order
> as these follow-up commits happened?
>
> That is, if you did this (time flows from top to bottom):
>
> 1 A
> 2 B
> 3 fixup A
> 4 squash B
> 5 fixup fixup A
> 6 fixup A
>
> I am wondering if applying 6 on top of 5 is always what you want, or
> you would want to apply it to 3 instead. Otherwise you would have
> written
>
> 6 fixup fixup fixup A
>
> instead.
>
> The two reordering possibilities are:
>
> 1 A 1 A
> 3 fixup A 3 fixup A
> 5 fixup fixup A 6 fixup A
> 6 fixup A 5 fixup fixup A
> 2 B 2 B
> 4 squash B 4 squash B
>
> If you strip out the prefix when you make commits, you may lose the
> information if you want to use in order to express these different
> orders. I am not sure if it matters in practice, but I am not yet
> convinced it is a good idea.
Isn't it a bit of an academic question?
All 'fixup* A' are clearly intended to be squashed into A eventually.
You could reorder them, but unless you arranged your fixups as nonlinear
history (does anyone do that?) they have been built sequentially. So at
best the extra reordering does not buy you anything, because you're
going to fix up A anyways. You may even get extra conflicts during the
reordering, which make the process less automatic and more error-prone.
[If you did actually arrange things nonlinearly, so that you have
* A
|\
| * fixup A
| |
* | fixup A
|/
* M (you need M so that you can rebase both fixups simultaneously)
then you might actually use the number of 'fixup' prefixes to determine
their order. However, if you actually generate such history, you have
to go out of your way to look at the other branches too, and make sure
that the number of prefixes is sufficiently unique to disambiguate the
order as far as you want it to do that, etc. It sounds like too much of
a headache to be worth using like that.]
And once you have that, it seems a nicer and cleaner idea to generate
'fixup! A' each time, instead of a successive sequence of
fixup! A
fixup! fixup! A
fixup! fixup! fixup! A
...
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2013-06-16 11:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-11 18:05 rebase --autosquash does not handle fixup! of fixup! Andrew Pimlott
2013-06-11 18:50 ` Thomas Rast
2013-06-14 19:31 ` [PATCH] rebase -i: fixup fixup! fixup! Andrew Pimlott
2013-06-15 6:50 ` Andrew Pimlott
2013-06-15 10:07 ` Junio C Hamano
2013-06-16 1:19 ` Junio C Hamano
2013-06-16 11:08 ` Thomas Rast [this message]
2013-06-17 2:38 ` Junio C Hamano
2013-06-17 8:07 ` Thomas Rast
2013-06-17 14:27 ` Junio C Hamano
2013-06-25 20:41 ` Andrew Pimlott
2013-06-25 21:33 ` Junio C Hamano
2013-06-25 23:17 ` Andrew Pimlott
2013-06-25 21:36 ` Junio C Hamano
2013-06-25 21:45 ` Junio C Hamano
2013-06-25 22:01 ` Junio C Hamano
2013-06-25 23:03 ` Andrew Pimlott
2013-06-26 22:00 ` Andrew Pimlott
2013-06-26 23:48 ` Junio C Hamano
2013-06-27 0:20 ` Andrew Pimlott
2013-06-27 19:26 ` Andrew Pimlott
2013-06-27 20:52 ` Junio C Hamano
2013-06-28 14:20 ` Andrew Pimlott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ip1e2tzx.fsf@hexa.v.cablecom.net \
--to=trast@inf.ethz.ch \
--cc=andrew@pimlott.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.