git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
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: [PATCHv3 2/2] rebase [-i --exec | -ix] <CMD>...
Date: Fri, 08 Jun 2012 20:56:41 +0200	[thread overview]
Message-ID: <4FD24AE9.8020101@web.de> (raw)
In-Reply-To: <1339167235-2009-2-git-send-email-Lucien.Kong@ensimag.imag.fr>

On 08.06.12 16:53, 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.

> Should now work on MacOS.

Hej,
I'm not sure on which commit to apply the patch. 
(may be we shoud improve git format-patch to tell us the original commit ID),
but if I remove the non applying part, it looks like this:

=================
ok 54 - rebase-i history with funny messages

expecting success: 
	git checkout master &&
	git checkout -b execute &&
	test_commit one_exec main.txt one_exec &&
	test_commit two_exec main.txt two_exec &&
	test_commit three_exec main.txt three_exec

Switched to branch 'master'
Switched to a new branch 'execute'
[execute 925b01e] one_exec
 Author: A U Thor <author@example.com>
 1 file changed, 1 insertion(+)
 create mode 100644 main.txt
[execute 7f87cbe] two_exec
 Author: A U Thor <author@example.com>
 1 file changed, 1 insertion(+), 1 deletion(-)
[execute f0f177e] three_exec
 Author: A U Thor <author@example.com>
 1 file changed, 1 insertion(+), 1 deletion(-)
ok 55 - prepare for rebase -i --exec

expecting success: 
	git rebase -i --exec "git show HEAD" HEAD~2 >actual &&
	(
		FAKE_LINES="1 exec_git_show_HEAD 2 exec_git_show_HEAD" &&
		export FAKE_LINES &&
		git rebase -i HEAD~2 >expected
	) &&
	sed 1,9d expected >expect &&
	mv expect expected &&
	test_cmp expected actual

error: unknown option `exec'
usage: git rebase [-i] [options] [--onto <newbase>] [<upstream>] [<branch>]
   or: git rebase [-i] [options] --onto <newbase> --root [<branch>]
   or: git-rebase [-i] --continue | --abort | --skip

Available options are
    -v, --verbose         display a diffstat of what changed upstream
    -q, --quiet           be quiet. implies --no-stat
    --onto ...            rebase onto given branch instead of upstream
    -p, --preserve-merges
                          try to recreate merges instead of ignoring them
    -s, --strategy ...    use the given merge strategy
    --no-ff               cherry-pick all commits, even if unchanged
    -m, --merge           use merging strategies to rebase
    -i, --interactive     let the user edit the list of commits to rebase
    -k, --keep-empty	     preserve empty commits during rebase
    -f, --force-rebase    force rebase even if branch is up to date
    -X, --strategy-option ...
                          pass the argument through to the merge strategy
    --stat                display a diffstat of what changed upstream
    -n, --no-stat         do not show diffstat of what changed upstream
    --verify              allow pre-rebase hook to run
    --rerere-autoupdate   allow rerere to update index with resolved conflicts
    --root                rebase all reachable commits up to the root(s)
    --autosquash          move commits that begin with squash!/fixup! under -i
    --committer-date-is-author-date
                          passed to 'git am'
    --ignore-date         passed to 'git am'
    --whitespace ...      passed to 'git apply'
    --ignore-whitespace   passed to 'git apply'
    -C ...                passed to 'git apply'

Actions:
    --continue            continue
    --abort               abort and check out the original branch
    --skip                skip current patch and continue

not ok - 56 running "git rebase -i --exec git show HEAD"
#	
#		git rebase -i --exec "git show HEAD" HEAD~2 >actual &&
#		(
#			FAKE_LINES="1 exec_git_show_HEAD 2 exec_git_show_HEAD" &&
#			export FAKE_LINES &&
#			git rebase -i HEAD~2 >expected
#		) &&
#		sed 1,9d expected >expect &&
#		mv expect expected &&
#		test_cmp expected actual
#	

expecting success: 
	git reset --hard execute &&
	git rebase --exec "git show HEAD" -i HEAD~2 >actual &&
	(
		FAKE_LINES="1 exec_git_show_HEAD 2 exec_git_show_HEAD" &&
		export FAKE_LINES &&
		git rebase -i HEAD~2 >expected
	) &&
	sed 1,9d expected >expect &&
	mv expect expected &&
	test_cmp expected actual

HEAD is now at f0f177e three_exec
error: unknown option `exec'
usage: git rebase [-i] [options] [--onto <newbase>] [<upstream>] [<branch>]
   or: git rebase [-i] [options] --onto <newbase> --root [<branch>]
   or: git-rebase [-i] --continue | --abort | --skip

Available options are
    -v, --verbose         display a diffstat of what changed upstream
    -q, --quiet           be quiet. implies --no-stat
    --onto ...            rebase onto given branch instead of upstream
    -p, --preserve-merges
                          try to recreate merges instead of ignoring them
    -s, --strategy ...    use the given merge strategy
    --no-ff               cherry-pick all commits, even if unchanged
    -m, --merge           use merging strategies to rebase
    -i, --interactive     let the user edit the list of commits to rebase
    -k, --keep-empty	     preserve empty commits during rebase
    -f, --force-rebase    force rebase even if branch is up to date
    -X, --strategy-option ...
                          pass the argument through to the merge strategy
    --stat                display a diffstat of what changed upstream
    -n, --no-stat         do not show diffstat of what changed upstream
    --verify              allow pre-rebase hook to run
    --rerere-autoupdate   allow rerere to update index with resolved conflicts
    --root                rebase all reachable commits up to the root(s)
    --autosquash          move commits that begin with squash!/fixup! under -i
    --committer-date-is-author-date
                          passed to 'git am'
    --ignore-date         passed to 'git am'
    --whitespace ...      passed to 'git apply'
    --ignore-whitespace   passed to 'git apply'
    -C ...                passed to 'git apply'

Actions:
    --continue            continue
    --abort               abort and check out the original branch
    --skip                skip current patch and continue

not ok - 57 running "git rebase --exec git show HEAD -i"

  parent reply	other threads:[~2012-06-08 18:56 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
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 [this message]
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

  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=4FD24AE9.8020101@web.de \
    --to=tboegi@web.de \
    --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.
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).