git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: <dag@cray.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Antonio Ospite <ospite@studenti.unina.it>, <git@vger.kernel.org>
Subject: Re: Feature idea: git rebase --exec $CMD
Date: Wed, 23 May 2012 10:50:20 -0500	[thread overview]
Message-ID: <nngliki3nib.fsf@transit.us.cray.com> (raw)
In-Reply-To: <vpqd35udhwq.fsf@bauges.imag.fr> (Matthieu Moy's message of "Wed, 23 May 2012 17:41:09 +0200")

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

>> I took that and turned it into a git-run-command subcommand.  It will
>> take an arbitrary command and run it on each revision specified by a
>> revlist.
>
> That's sensible too. The nice things with running commands in "git
> rebase" are:
>
> * It's likely to be the place where you want to run some tests. The
>   typical use-case is that you have a patch serie whose last revision
>   passes tests, and you want to check that intermediate commits also do.

Yep, I have done that many times using the above-mentioned script
(obviously not during rebase).

> * if the "exec" command fails, you're likely to be exactly in the right
>   place to fix it: fix the bug, run "git commit --amend", and "git
>   rebase --continue".

That's a good point.

> The nice thing with your approach (as I understand it) is that it
> doesn't require rewritting history, and may apply to all commits in
> non-linear history.

Exactly.  I think there is room for both.  The downside to
git-run-command (besides the name) is that it forcibly checks out
revisions in the current workarea so one has to be careful about
unstaged and/or uncommitted changes.  I could change the behavior to
checkout in some /tmp workarea or something.

                                -Dave

      reply	other threads:[~2012-05-23 15:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-05 11:26 Feature idea: git rebase --exec $CMD Antonio Ospite
2012-05-05 11:54 ` Felipe Contreras
2012-05-06 10:03 ` Matthieu Moy
2012-05-06 10:44   ` Antonio Ospite
2012-05-06 12:26   ` Jeff King
2012-05-10  8:28 ` Matthieu Moy
2012-05-23 15:12 ` dag
2012-05-23 15:41   ` Matthieu Moy
2012-05-23 15:50     ` dag [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nngliki3nib.fsf@transit.us.cray.com \
    --to=dag@cray.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=ospite@studenti.unina.it \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).