From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephan Beyer Subject: Re: [RFCv2/FYI] git-sequencer.txt Date: Thu, 12 Jun 2008 19:07:15 +0200 Message-ID: <20080612170715.GC6848@leksak.fem-net> References: <20080607220101.GM31040@leksak.fem-net> <20080612002258.GC7200@leksak.fem-net> <7vabhr9qru.fsf@gitster.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org, Johannes Schindelin , Jakub Narebski , Paolo Bonzini , Pierre Habouzit , Daniel Barkalow , Christian Couder To: Junio C Hamano X-From: git-owner@vger.kernel.org Thu Jun 12 19:08:20 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1K6qHZ-0001HS-Dr for gcvg-git-2@gmane.org; Thu, 12 Jun 2008 19:08:18 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753697AbYFLRHW (ORCPT ); Thu, 12 Jun 2008 13:07:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753431AbYFLRHW (ORCPT ); Thu, 12 Jun 2008 13:07:22 -0400 Received: from mail.gmx.net ([213.165.64.20]:42271 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753420AbYFLRHU (ORCPT ); Thu, 12 Jun 2008 13:07:20 -0400 Received: (qmail invoked by alias); 12 Jun 2008 17:07:18 -0000 Received: from q137.fem.tu-ilmenau.de (EHLO leksak.fem-net) [141.24.46.137] by mail.gmx.net (mp034) with SMTP; 12 Jun 2008 19:07:18 +0200 X-Authenticated: #1499303 X-Provags-ID: V01U2FsdGVkX1+qSE1I3Z6qYEMrM9Lz80sHXcScqpK9wXiemjTYAp j37E1MoJ987+w3 Received: from sbeyer by leksak.fem-net with local (Exim 4.69) (envelope-from ) id 1K6qGZ-0000A1-OO; Thu, 12 Jun 2008 19:07:15 +0200 Content-Disposition: inline In-Reply-To: <7vabhr9qru.fsf@gitster.siamese.dyndns.org> X-Y-GMX-Trusted: 0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Hi, Junio C Hamano wrote: > > Note that the sanity check fails, if you use this option > > and an instruction like `edit` or `pause`. > > > > --onto=:: > > Checkout given commit or branch before sequencing. > > If you provide a branch, sequencer will make the provided > > changes on the branch, i.e. the branch will be changed. > > I think you called this --onto by modeling after rebase, but I am not sure > if that is a good generic naming. First it was called --branch=, but I considered this to be wrong, because it's also possible to work on a detached tree. Then I thought, that the rebase name is somehow right. > 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 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 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? Using git-sequencer --onto you specify the commit (or branch) where the TODO insns are executed on. (If you provide a branch, the branch ref points to the result of the sequencing process. If not, the sequencer process finishes on a detached HEAD, just as it started.) If you are on master and do git sequencer --onto foo todo-file and later do a git sequencer --abort then you are back on master "as if nothing happened". If the process finishes successfully, you are on "foo". I think this is quite handy and intuitive. Btw, I didn't include the --onto stuff into the test suite of my prototype branch yet, so the only thing that currently tests this is git-rebase --interactive, that does a git-sequencer --onto "$ONTO" "$TODO" and this works well. I didn't include it yet, because the questions you addressed were somehow still open to me. If you don't provide --onto, it works on the current HEAD, may it be a branch or detached HEAD. > By the way, is it specified if sequencer will always work by: Currently nothing of that is *specified*, but I can tell what the prototype currently does. > > (1) remember the initial branch; It saves the initial branch and commit, yes. > (2) detach the HEAD; It currently does not detach the HEAD if a branch is given in --onto. Imho this is a bug -- thanks -- but the fix is easy ;-) > (3) run the operation; > > (4) and finally (unless the user says --abort) reattaching the original > branch to the resulting HEAD? Yes. (Currently the reattaching is done "automagically" because of the bug it doesn't detach the 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. Sorry, I currently don't understand you. ;-) I've never used filter-branch so I'm a bit out of background here. I currently wonder if it's better to remove --onto and let the sequencer users do that. So that, for example, the rebase-i has to checkout the detached $ONTO and then just call git-sequencer "$TODO". (If we do it this way... Daniel, you were right *grin*) What do you think? > > --skip:: > > Restart the sequencing process by skipping the current patch. > > "patch"? "instruction". Thanks. > 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"; Right. > - Same goes for merge and patch (the semantics of "squash " is > fuzzy to me); Right. I've already considered squash, I c&p a comment from the prototype: # Hm, somehow I don't think --skip on a conflicting squash # may be useful, but if someone wants to do it, it should # do the obvious: skip what squash would do. This means, if you do squash --up-to :1 it will just not squash all the commits from :1 to HEAD. If you do squash it will not pick and squash it with the last. > - pause can give control back to you. What should --skip do? I guess > "no-op" is the right answer. Right. In other words: --skip equals --continue. I've already considered this and when in "pause", git --status does not tell the user that he can do --skip, although he can. > > --status:: > > Show the current status of git-sequencer and what > > operations can be done to change that status. > > Meaning "what insns have we done, what insn were we in the middle of > executing, and what insns are still remaining"? If sequencer is paused somewhere: - what insns have we done - are we in a conflict or pause? - what insns are still remaining - what options does sequencer run with? (The only option that can be reported is currently --verbose) - what can the user run to abort/continue/skip? And "Sequencer not running" if sequencer is not started or has finished or whatever. > > merge [] ... :: > > Merge commits into HEAD. > > + > > A commit can also be given by a mark, if prefixed with a colon. > > + > > If you do not provide a commit message (using `-F`, `-m`, `--reference` > > or `--standard`), an editor will be invoked. > > + > > See the following list and 'GENERAL OPTIONS' for values of `