git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Alban Gruin <alban.gruin@gmail.com>
Cc: git <git@vger.kernel.org>,
	Christian Couder <christian.couder@gmail.com>,
	Pratik Karki <predatoramigo@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Phillip Wood <phillip.wood@dunelm.org.uk>,
	Wink Saville <wink@saville.com>
Subject: Re: [GSoC][PATCH 1/4] rebase: duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh
Date: Tue, 22 May 2018 11:26:13 -0700	[thread overview]
Message-ID: <CAGZ79kaTPu=z_6oJk__meuyhUt-pU_LtOJ90rPTQcC=YvhnOnw@mail.gmail.com> (raw)
In-Reply-To: <20180522133110.32723-2-alban.gruin@gmail.com>

On Tue, May 22, 2018 at 6:31 AM, Alban Gruin <alban.gruin@gmail.com> wrote:
> This duplicates git-rebase--interactive.sh to
> git-rebase--preserve-merges.sh. This is done to split -p from -i. No
> modifications are made to this file here, but any code that is not used by -p
> will be stripped in the next commit.
>
> Signed-off-by: Alban Gruin <alban.gruin@gmail.com>

So how would I best review this?

I applied the patches locally[1], and ran git-ls-tree on this commit
hoping to find the same blob id for git-rebase--interactive.sh as for
git-rebase--preserve-merges.sh; however I did not.

So I diffed them and had the diff below[2], which looks like that has parts
of Johannes recent series?

Thanks,
Stefan

[1] After applying I pushed it to
https://github.com/stefanbeller/git/tree/alban_split_off_-p
and this patch is commit 9f64342ea1b64d43e4675b5f202174c9e0f77dbf

[2] $ git diff 9f64342ea1b64d43e4675b5f202174c9e0f77dbf:git-rebase--preserve-merges.sh
\
    9f64342ea1b64d43e4675b5f202174c9e0f77dbf:git-rebase--interactive.sh
diff --git a/git-rebase--preserve-merges.sh b/git-rebase--interactive.sh
index 9947e6265fe..2f4941d0fc9 100644
--- a/git-rebase--preserve-merges.sh
+++ b/git-rebase--interactive.sh
@@ -155,13 +155,19 @@ reschedule_last_action () {
 append_todo_help () {
        gettext "
 Commands:
-p, pick = use commit
-r, reword = use commit, but edit the commit message
-e, edit = use commit, but stop for amending
-s, squash = use commit, but meld into previous commit
-f, fixup = like \"squash\", but discard this commit's log message
-x, exec = run command (the rest of the line) using shell
-d, drop = remove commit
+p, pick <commit> = use commit
+r, reword <commit> = use commit, but edit the commit message
+e, edit <commit> = use commit, but stop for amending
+s, squash <commit> = use commit, but meld into previous commit
+f, fixup <commit> = like \"squash\", but discard this commit's log message
+x, exec <commit> = run command (the rest of the line) using shell
+d, drop <commit> = remove commit
+l, label <label> = label current HEAD with a name
+t, reset <label> = reset HEAD to a label
+m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
+.       create a merge commit using the original merge commit's
+.       message (or the oneline, if no original merge commit was
+.       specified). Use -c <commit> to reword the commit message.

 These lines can be re-ordered; they are executed from top to bottom.
 " | git stripspace --comment-lines >>"$todo"
@@ -888,6 +894,8 @@ init_revisions_and_shortrevisions () {
        else
                revisions=$onto...$orig_head
                shortrevisions=$shorthead
+               test -z "$squash_onto" ||
+               echo "$squash_onto" >"$state_dir"/squash-onto
        fi
 }

@@ -942,7 +950,7 @@ EOF
        die "Could not skip unnecessary pick commands"

        checkout_onto
-       if test -z "$rebase_root" && test ! -d "$rewritten"
+       if test ! -d "$rewritten"
        then
                require_clean_work_tree "rebase"
                exec git rebase--helper ${force_rebase:+--no-ff}
$allow_empty_message \
@@ -964,6 +972,8 @@ git_rebase__interactive () {
        init_revisions_and_shortrevisions

        git rebase--helper --make-script ${keep_empty:+--keep-empty} \
+               ${rebase_merges:+--rebase-merges} \
+               ${rebase_cousins:+--rebase-cousins} \
                $revisions ${restrict_revision+^$restrict_revision} >"$todo" ||
        die "$(gettext "Could not generate todo list")"

  reply	other threads:[~2018-05-22 18:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-22 13:31 [GSoC][PATCH 0/4] rebase: split rebase -p from rebase -i Alban Gruin
2018-05-22 13:31 ` [GSoC][PATCH 1/4] rebase: duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh Alban Gruin
2018-05-22 18:26   ` Stefan Beller [this message]
2018-05-22 19:15     ` Alban Gruin
2018-05-22 13:31 ` [GSoC][PATCH 2/4] rebase: strip unused code in git-rebase--preserve-merges.sh Alban Gruin
2018-05-22 13:31 ` [GSoC][PATCH 3/4] rebase: use the new git-rebase--preserve-merges.sh Alban Gruin
2018-05-22 13:31 ` [GSoC][PATCH 4/4] rebase: remove -p code from git-rebase--interactive.sh Alban Gruin
2018-05-22 18:29 ` [GSoC][PATCH 0/4] rebase: split rebase -p from rebase -i Stefan Beller
2018-05-22 21:16 ` [GSoC][PATCH v2 " Alban Gruin
2018-05-22 21:16   ` [GSoC][PATCH v2 1/4] rebase: duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh Alban Gruin
2018-05-22 21:16   ` [GSoC][PATCH v2 2/4] rebase: strip unused code in git-rebase--preserve-merges.sh Alban Gruin
2018-05-22 21:16   ` [GSoC][PATCH v2 3/4] rebase: use the new git-rebase--preserve-merges.sh Alban Gruin
2018-05-22 21:16   ` [GSoC][PATCH v2 4/4] rebase: remove -p code from git-rebase--interactive.sh Alban Gruin
2018-05-24 11:49   ` [GSoC][PATCH v3 0/4] rebase: split rebase -p from rebase -i Alban Gruin
2018-05-24 11:49     ` [GSoC][PATCH v3 1/4] rebase: duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh Alban Gruin
2018-05-26  2:54       ` Junio C Hamano
2018-05-24 11:49     ` [GSoC][PATCH v3 2/4] rebase: strip unused code in git-rebase--preserve-merges.sh Alban Gruin
2018-05-24 11:49     ` [GSoC][PATCH v3 3/4] rebase: use the new git-rebase--preserve-merges.sh Alban Gruin
2018-05-24 11:49     ` [GSoC][PATCH v3 4/4] rebase: remove -p code from git-rebase--interactive.sh Alban Gruin
2018-05-24 11:52     ` [GSoC][PATCH v3 0/4] rebase: split rebase -p from rebase -i Alban Gruin
2018-05-25  9:51     ` Johannes Schindelin
2018-05-28 12:34     ` [GSoC][PATCH v4 " Alban Gruin
2018-05-28 12:34       ` [GSoC][PATCH v4 1/4] rebase: introduce a dedicated backend for --preserve-merges Alban Gruin
2018-05-28 12:34       ` [GSoC][PATCH v4 2/4] rebase: strip unused code in git-rebase--preserve-merges.sh Alban Gruin
2018-05-28 12:34       ` [GSoC][PATCH v4 3/4] rebase: use the new git-rebase--preserve-merges.sh Alban Gruin
2018-05-28 12:34       ` [GSoC][PATCH v4 4/4] rebase: remove -p code from git-rebase--interactive.sh Alban Gruin

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='CAGZ79kaTPu=z_6oJk__meuyhUt-pU_LtOJ90rPTQcC=YvhnOnw@mail.gmail.com' \
    --to=sbeller@google.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=alban.gruin@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=predatoramigo@gmail.com \
    --cc=wink@saville.com \
    /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).