Re: [RFCv2/FYI] git-sequencer.txt

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Stephan Beyer <s-beyer@...>
Cc: <git@...>, Johannes Schindelin <Johannes.Schindelin@...>, Jakub Narebski <jnareb@...>, Paolo Bonzini <bonzini@...>, Pierre Habouzit <madcoder@...>, Daniel Barkalow <barkalow@...>, Christian Couder <chriscool@...>
Date: Thursday, June 12, 2008 - 1:16 am

Stephan Beyer <s-beyer@gmx.net> writes:


I think you called this --onto by modeling after rebase, but I am not sure
if that is a good generic naming.  Worse, "a branch that is not the
current one that is rebased" in rebase is not specified with "--onto" but
with the extra argument.

Is checking out that <base> branch considered as part of the sequencing
operation, or it is something that happens before the sequencing?  In
other words, if a sequencing stops and the user says "sequencer --abort",
where does it take the user back to?  The state the <base> is checked out,
or the state before that checkout happened?  Can't the front-end emit an
insn to checkout or detach as the first insn?

By the way, is it specified if sequencer will always work by:

 (1) remember the initial branch;

 (2) detach the HEAD;

 (3) run the operation;

 (4) and finally (unless the user says --abort) reattaching the original
     branch to the resulting HEAD?

That would mean the sequencer would essentially munge only one branch
(unless started from a detached HEAD state).  I think this is a reasonable
design decision (and a limitation) for the currently expected front-ends,
but I think this is a perfectly sane backend for filter-branch (without
any tree or content munging), and this limitation might later come back
and bite us.


"patch"?

What is the set of insn that can possibly give control back and give
you a chance to say "--skip"?

 - pick can conflict and --skip would mean "reset to the tree before the
   pick and continue on to the next insn";

 - Same goes for merge and patch (the semantics of "squash <commit>" is
   fuzzy to me);

 - pause can give control back to you.  What should --skip do?  I guess
   "no-op" is the right answer.


Meaning "what insns have we done, what insn were we in the middle of
executing, and what insns are still remaining"?


It seems you are assuming (and I am not saying it is a bad assumption)
that sequencer first detached the HEAD and operates on that state until it
is done.  Perhaps we would want to reword "into HEAD" somehow?  If we are
rebasing branch "main", even if sequencer internally detaches the HEAD to
carry out individual steps, we would want to see the resulting history to
say "into main", wouldn't we?


Hmm.  Are there cases where you might want to feed more than one patches
and then finally make the commit?  You could emulate it with

	mark :1
	patch --message=dummy file1
        patch --message=dummy file2
	squash --upto :1

but it might make sense to allow more than one files for this use case,
like

	patch file1 file2

Although that would introduce another issue, which is what to do if file1
is a naked diff and file2 is a mbox (with possibly more than one patches),
or vice versa.


I personally do not think it is worth supporting this b/c compatibility
option in a new command "sequencer".


before "saying --continue"?


Just like you explained "edit <commit>" in terms of "pick" and "pause", we
might want to explain that this is "pick" and "squash --up-to HEAD^" (or
is it HEAD^^"?).


"In between" in "inclusive" sense, that is, neither <mark> nor HEAD cannot
be a merge?  Also --up-to feels somewhat wrong.  It is more like down-to
but perhaps "from" would be a better wording.


And what gets recorded?  A squashed merge?

A "squash --up-to <mark>" (modulo off-by-one I can never get straight X-<)
essentially:

	log --reverse <mark>.. >msg
	reset --soft <mark>
        commit --amend -F msg

so recording this result, when there is a merge in between, is like
running "merge --squash".


Hmm.  It is hard to judge this without seeing how the front-ends use it.
It might make sense to give lower-level access to update-ref instead, so
that more than one branches can be updated as well, but I am not sure.
How would this interact with "--abort"?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] git-sequencer.txt, Stephan Beyer, (Sat Jun 7, 6:01 pm)
[RFCv2/FYI] git-sequencer.txt, Stephan Beyer, (Wed Jun 11, 8:22 pm)
Re: [RFCv2/FYI] git-sequencer.txt, Jakub Narebski, (Thu Jun 12, 10:10 am)
Re: [RFCv2/FYI] git-sequencer.txt, Stephan Beyer, (Thu Jun 12, 1:20 pm)
Re: [RFCv2/FYI] git-sequencer.txt, Junio C Hamano, (Thu Jun 12, 1:16 am)
Re: [RFCv2/FYI] git-sequencer.txt, Stephan Beyer, (Thu Jun 12, 1:07 pm)
Re: [RFCv2/FYI] git-sequencer.txt, Olivier Marin, (Fri Jun 13, 3:24 pm)
Re: [RFCv2/FYI] git-sequencer.txt, Paolo Bonzini, (Fri Jun 13, 1:04 am)
Re: [RFCv2/FYI] git-sequencer.txt, Stephan Beyer, (Fri Jun 13, 8:16 am)
Re: [RFCv2/FYI] git-sequencer.txt, Paolo Bonzini, (Fri Jun 13, 10:42 am)
Re: [RFCv2/FYI] git-sequencer.txt, Paolo Bonzini, (Wed Jun 11, 9:31 pm)
Re: [RFCv2/FYI] git-sequencer.txt, Stephan Beyer, (Thu Jun 12, 11:29 am)
Re: [RFCv2/FYI] git-sequencer.txt, Paolo Bonzini, (Thu Jun 12, 11:56 am)
Re: [RFC] git-sequencer.txt, Jakub Narebski, (Mon Jun 9, 12:49 pm)
Re: [RFC] git-sequencer.txt, Stephan Beyer, (Mon Jun 9, 9:21 pm)
Re: [RFC] git-sequencer.txt, Jakub Narebski, (Tue Jun 10, 2:17 am)
Re: [RFC] git-sequencer.txt, Christian Couder, (Tue Jun 10, 12:46 am)
Re: [RFC] git-sequencer.txt, Daniel Barkalow, (Wed Jun 11, 1:07 pm)
Re: [RFC] git-sequencer.txt, Stephan Beyer, (Tue Jun 10, 4:59 am)
Re: [RFC] git-sequencer.txt, Christian Couder, (Wed Jun 11, 12:10 am)
squashing patches (was: Re: [RFC] git-sequencer.txt), Stephan Beyer, (Mon Jun 9, 7:45 am)
Re: squashing patches, Junio C Hamano, (Mon Jun 9, 3:34 pm)
Re: squashing patches, Stephan Beyer, (Mon Jun 9, 4:43 pm)
Re: squashing patches, Junio C Hamano, (Mon Jun 9, 5:02 pm)
Re: squashing patches, Stephan Beyer, (Mon Jun 9, 8:38 pm)
Re: squashing patches, Jeff King, (Mon Jun 9, 4:53 pm)
Re: squashing patches, Stephan Beyer, (Mon Jun 9, 7:57 pm)
Re: squashing patches, Jeff King, (Mon Jun 9, 9:00 pm)
Re: squashing patches, Paolo Bonzini, (Mon Jun 9, 11:10 am)
[RFC/PATCH] Add git-squash tool and tests, Stephan Beyer, (Mon Jun 9, 4:29 pm)
Re: [RFC/PATCH] Add git-squash tool and tests, Johannes Schindelin, (Mon Jun 9, 4:34 pm)
Re: [RFC/PATCH] Add git-squash tool and tests, Stephan Beyer, (Mon Jun 9, 7:46 pm)
Re: [RFC/PATCH] Add git-squash tool and tests, Paolo Bonzini, (Mon Jun 9, 4:53 pm)
Re: [RFC/PATCH] Add git-squash tool and tests, Johannes Schindelin, (Mon Jun 9, 5:34 pm)
Re: [RFC/PATCH] Add git-squash tool and tests, Stephan Beyer, (Mon Jun 9, 7:42 pm)
Re: [RFC/PATCH] Add git-squash tool and tests, Johannes Schindelin, (Mon Jun 9, 8:26 pm)
Re: squashing patches, Stephan Beyer, (Mon Jun 9, 12:29 pm)
Re: squashing patches, Paolo Bonzini, (Mon Jun 9, 12:37 pm)
Re: squashing patches, Paolo Bonzini, (Mon Jun 9, 11:43 am)
Re: squashing patches (was: Re: [RFC] git-sequencer.txt), Johannes Schindelin, (Mon Jun 9, 10:04 am)