All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>
To: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Cc: git@vger.kernel.org,
	Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>,
	Franck Jonas <Franck.Jonas@ensimag.imag.fr>,
	Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>,
	Huynh Khoi Nguyen Nguyen 
	<Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>,
	Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Subject: Re: [PATCHv2] rebase [-i --exec | -ix] <CMD>...
Date: Thu, 07 Jun 2012 10:25:10 +0200	[thread overview]
Message-ID: <4FD06566.5010709@in.waw.pl> (raw)
In-Reply-To: <1338978856-26838-1-git-send-email-Lucien.Kong@ensimag.imag.fr>

On 06/06/2012 12:34 PM, Lucien Kong wrote:
> This patch provides a way to automatically add these "exec" lines
> between each commit applications. For instance, running 'git rebase -i
> --exec "make test"' lets you check that intermediate commits are
> compilable. It is also compatible with the option --autosquash. At
> this point, you can't use --exec without the interactive mode (-i).
> 
> Tests about this new command are also added in
> t3404-rebase-interactive.sh.
> 
> Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
> Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
> Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
> Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
> Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
> Signed-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
> ---
> The part of --onto in the documentation is changed to be consistent
> with the other options. The exec line, when using the option --autosquash,
> is now only added after the squash/fixup series.
> 
>  Documentation/git-rebase.txt  |   54 +++++++++++++++--
>  git-rebase--interactive.sh    |   19 ++++++
>  git-rebase.sh                 |   20 ++++++-
>  t/t3404-rebase-interactive.sh |  124 +++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 207 insertions(+), 10 deletions(-)
> 
> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
> index 147fa1a..1dd95c4 100644
> --- a/Documentation/git-rebase.txt
> +++ b/Documentation/git-rebase.txt
> @@ -8,9 +8,9 @@ git-rebase - Forward-port local commits to the updated upstream head
>  SYNOPSIS
>  --------
>  [verse]
> -'git rebase' [-i | --interactive] [options] [--onto <newbase>]
> +'git rebase' [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>]
>  	[<upstream>] [<branch>]
> -'git rebase' [-i | --interactive] [options] --onto <newbase>
> +'git rebase' [-i | --interactive] [options] [--exec <cmd>] --onto <newbase>
>  	--root [<branch>]
>  'git rebase' --continue | --skip | --abort
>  
> @@ -210,11 +210,29 @@ rebase.autosquash::
>  
>  OPTIONS
>  -------
> -<newbase>::
> -	Starting point at which to create the new commits. If the
> -	--onto option is not specified, the starting point is
> -	<upstream>.  May be any valid commit, and not just an
> -	existing branch name.
> +-x <cmd>::
> +--exec <cmd>::
> +	Automatically add "exec" followed by <cmd> between each commit
> +	applications. Using this option along with --autosquash adds
> +	the exec line after the squash/fixeup series only. <cmd>
> +	stands for shell commands. The --exec option has to be
> +	specified. (see INTERACTIVE MODE below)
Hi,
this still doesn't seem right:
- "exec" is added *after* other lines, not *between*
- --exec is not mandatory

Maybe something along these lines:
-x <cmd>::
--exec <cmd>::
  Append "exec <cmd>" after each commit application line. <cmd> will
  be interpreted as one or more shell commands.
  +
  If --autosquash is used, the "exec" lines will not be appended for
  the intermediate commits, and will only appear at the end of each
  squash/fixup series.

> ++
> +This has to be used along with the `--interactive` option explicitly.
This sentence is very unclear. (E.g. is 'this'?)

> +You may execute several commands between each commit applications.
> +For this, you can use one instance of exec:
> +	git rebase -i --exec "cmd1; cmd2; ...".
> +You can also insert several instances of exec, if you wish to
> +only have one command per line for example:
> +	git rebase -i --exec "cmd1" --exec "cmd2" ...
s/per line for example/per line. For example/ ?

> +
> +--onto <newbase>::
> +	With this option, git rebase takes all commits from <branch>,
> +	that are not in <upstream>, and transplant them on top of
> +	<newbase>. <newbase> is the starting point at which to create
> +	the new commits. If the --onto option is not specified, the
> +	starting point is <upstream>.  May be any valid commit, and
> +	not just an existing branch name.
Shouldn't this chunk be a separate patch?

s/transplant/transplants/

--
Zbyszek

  parent reply	other threads:[~2012-06-07  8:25 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04 13:47 [PATCH] rebase [-i --exec | -ix] <CMD> Kong Lucien
2012-06-04 17:42 ` Junio C Hamano
2012-06-04 20:30   ` Matthieu Moy
2012-06-04 21:06     ` Junio C Hamano
2012-06-05 17:59   ` konglu
2012-06-05 18:13     ` Junio C Hamano
2012-06-04 17:48 ` Matthieu Moy
2012-06-06 10:34 ` [PATCHv2] " Lucien Kong
2012-06-06 20:03   ` Matthieu Moy
2012-06-06 22:54   ` Junio C Hamano
2012-06-07  8:25   ` Zbigniew Jędrzejewski-Szmek [this message]
2012-06-07  8:40   ` Johannes Sixt
2012-06-07 12:04     ` konglu
2012-06-07 13:43       ` Matthieu Moy
2012-06-08 14:53   ` [PATCHv3 1/2] git-rebase.txt: "--onto" option updated Lucien Kong
2012-06-08 14:53     ` [PATCHv3 2/2] rebase [-i --exec | -ix] <CMD> Lucien Kong
2012-06-08 17:02       ` Johannes Sixt
2012-06-08 18:56       ` Torsten Bögershausen
2012-06-08 19:15         ` konglu
2012-06-08 19:55           ` Torsten Bögershausen
2012-06-08 20:07             ` konglu
2012-06-08 20:51               ` Torsten Bögershausen
2012-06-08 21:03                 ` konglu
2012-06-09  6:14                   ` Torsten Bögershausen
2012-06-09  6:47                     ` konglu
2012-06-10 10:44       ` [PATCHv4] " Lucien Kong
2012-06-10 11:56         ` Johannes Sixt
2012-06-11 15:14           ` Junio C Hamano
2012-06-12 18:55             ` Johannes Sixt
2012-06-12 20:29               ` Junio C Hamano
2012-06-12  8:05         ` [PATCHv5] " Lucien Kong
2012-06-12  9:23           ` Zbigniew Jędrzejewski-Szmek
2012-06-12 14:46             ` Junio C Hamano
2012-06-13 14:04               ` Zbigniew Jędrzejewski-Szmek
2012-06-13 17:32                 ` Junio C Hamano
2012-06-13 18:05                 ` konglu
2012-06-13 18:22                   ` Junio C Hamano
2012-06-13 19:38                     ` konglu
2012-06-13 20:59                       ` Johannes Sixt
2012-06-13 21:07                         ` Zbigniew Jędrzejewski-Szmek
2012-06-13 22:25                         ` Junio C Hamano
2012-06-13 22:35                         ` Junio C Hamano
2012-06-13 22:43                           ` Zbigniew Jędrzejewski-Szmek
2012-06-14  6:57                             ` Matthieu Moy
2012-06-14 14:08                               ` Marc Branchaud
2012-06-08 15:00     ` [PATCHv3 1/2] git-rebase.txt: "--onto" option updated Matthieu Moy
2012-06-08 17:07     ` Junio C Hamano
2012-06-08 19:06       ` konglu
2012-06-08 19:52         ` Junio C Hamano
2012-06-08 20:08           ` konglu

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=4FD06566.5010709@in.waw.pl \
    --to=zbyszek@in.waw.pl \
    --cc=Franck.Jonas@ensimag.imag.fr \
    --cc=Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr \
    --cc=Lucien.Kong@ensimag.imag.fr \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=Thomas.Nguy@ensimag.imag.fr \
    --cc=Valentin.Duperray@ensimag.imag.fr \
    --cc=git@vger.kernel.org \
    /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.