From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 00/18] builtin rebase options
Date: Tue, 04 Sep 2018 14:59:47 -0700 (PDT) [thread overview]
Message-ID: <pull.33.v2.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <20180808152140.14585-1-predatoramigo@gmail.com>
This patch series completes the support for all rebase options in the
builtin rebase, e.g. --signoff, rerere-autoupdate, etc.
It is based on pk/rebase -in-c-3-acts.
Changes since v1:
* Added the forgotten -k short option for --keep-empty (and verified that
no other short options were forgotten).
* The "Applied autostash" message is now translated (as was the original in
the shell script version).
Pratik Karki (18):
builtin rebase: allow selecting the rebase "backend"
builtin rebase: support --signoff
builtin rebase: support --rerere-autoupdate
builtin rebase: support --committer-date-is-author-date
builtin rebase: support `ignore-whitespace` option
builtin rebase: support `ignore-date` option
builtin rebase: support `keep-empty` option
builtin rebase: support `--autosquash`
builtin rebase: support `--gpg-sign` option
builtin rebase: support `-C` and `--whitespace=<type>`
builtin rebase: support `--autostash` option
builtin rebase: support `--exec`
builtin rebase: support `--allow-empty-message` option
builtin rebase: support --rebase-merges[=[no-]rebase-cousins]
merge-base --fork-point: extract libified function
builtin rebase: support `fork-point` option
builtin rebase: add support for custom merge strategies
builtin rebase: support --root
builtin/merge-base.c | 81 +-------
builtin/rebase.c | 449 ++++++++++++++++++++++++++++++++++++++++++-
commit.c | 81 ++++++++
commit.h | 2 +
4 files changed, 528 insertions(+), 85 deletions(-)
base-commit: e01f72be63e6cb58243124abb2491f9d5dbcdbef
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-33%2Fdscho%2Frebase-in-c-4-opts-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-33/dscho/rebase-in-c-4-opts-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/33
Range-diff vs v1:
1: 22a65191f8 ! 1: 7f751c6ce1 builtin rebase: allow selecting the rebase "backend"
@@ -19,6 +19,7 @@
tests for this via `git pull --rebase=preserve`).
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
2: cb9129890b ! 2: 1e2ce4b34e builtin rebase: support --signoff
@@ -7,6 +7,7 @@
handling is left to the rebase backends.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
3: 99ff1fc128 ! 3: a301ef6bbd builtin rebase: support --rerere-autoupdate
@@ -7,6 +7,7 @@
`git-legacy-rebase.sh`.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
4: cb6596ea93 ! 4: 8f67a3969d builtin rebase: support --committer-date-is-author-date
@@ -6,6 +6,7 @@
`git_am_opt` variable that is handled by the `git-rebase--am` backend.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
5: bf3279c2d5 ! 5: f04394a500 builtin rebase: support `ignore-whitespace` option
@@ -7,6 +7,7 @@
`--am` backend.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
6: 804e1969c2 ! 6: 83bb277509 builtin rebase: support `ignore-date` option
@@ -6,6 +6,7 @@
to easily change the dates of the rebased commits.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
7: fcf2243476 ! 7: a8f12bf01f builtin rebase: support `keep-empty` option
@@ -12,6 +12,7 @@
already be chosen during the `parse_options()` call.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
@@ -60,7 +61,7 @@
&options.allow_rerere_autoupdate,
N_("allow rerere to update index with resolved "
"conflict")),
-+ OPT_BOOL(0, "keep-empty", &options.keep_empty,
++ OPT_BOOL('k', "keep-empty", &options.keep_empty,
+ N_("preserve empty commits during rebase")),
OPT_END(),
};
8: b4ecffc8f1 ! 8: 1b6851e5e1 builtin rebase: support `--autosquash`
@@ -12,6 +12,7 @@
falls back to) git_default_config().
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
@@ -46,7 +47,7 @@
@@
"conflict")),
- OPT_BOOL(0, "keep-empty", &options.keep_empty,
+ OPT_BOOL('k', "keep-empty", &options.keep_empty,
N_("preserve empty commits during rebase")),
+ OPT_BOOL(0, "autosquash", &options.autosquash,
+ N_("move commits that begin with "
9: e2a26f10e5 ! 9: b8055fb258 builtin rebase: support `--gpg-sign` option
@@ -6,6 +6,7 @@
to GPG-sign commits.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
10: a1f3245250 ! 10: 98908573ce builtin rebase: support `-C` and `--whitespace=<type>`
@@ -8,6 +8,7 @@
shell script version does so, too.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
11: 7b3c0dbbd9 ! 11: 5e5e5cb758 builtin rebase: support `--autostash` option
@@ -11,6 +11,7 @@
builtin.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
@@ -57,7 +58,7 @@
+ stash_apply.no_stderr = stash_apply.no_stdout =
+ stash_apply.no_stdin = 1;
+ if (!run_command(&stash_apply))
-+ printf("Applied autostash.\n");
++ printf(_("Applied autostash.\n"));
+ else {
+ struct argv_array args = ARGV_ARRAY_INIT;
+ int res = 0;
12: 6f6b3d9339 ! 12: 01e5cb3e91 builtin rebase: support `--exec`
@@ -14,6 +14,7 @@
The `--exec` option requires `--interactive` machinery.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
13: fa643c4b3f ! 13: 1c723ad592 builtin rebase: support `--allow-empty-message` option
@@ -14,6 +14,7 @@
`git rebase`, therefore the builtin rebase does the same.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
14: 00d7ccd356 ! 14: 1bebcde41c builtin rebase: support --rebase-merges[=[no-]rebase-cousins]
@@ -6,6 +6,7 @@
rebase, too.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
15: 1cf16f416e ! 15: 05652bccfe merge-base --fork-point: extract libified function
@@ -12,6 +12,7 @@
process definitely did not traverse any commits before exiting.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/merge-base.c b/builtin/merge-base.c
--- a/builtin/merge-base.c
16: 78ffb7aaff ! 16: 25f6771947 builtin rebase: support `fork-point` option
@@ -6,6 +6,7 @@
This is converted as-is from `git-legacy-rebase.sh`.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
17: 693b662542 ! 17: 10dc87d4ff builtin rebase: add support for custom merge strategies
@@ -9,6 +9,7 @@
This commit adds that support to the builtin rebase.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
18: 95679ccf0b ! 18: f155141023 builtin rebase: support --root
@@ -9,6 +9,7 @@
the fact that we do not have to write an empty tree in C.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
diff --git a/builtin/rebase.c b/builtin/rebase.c
--- a/builtin/rebase.c
--
gitgitgadget
next prev parent reply other threads:[~2018-09-04 21:59 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-08 15:21 [GSoC] [PATCH 00/18] builtin rebase options Pratik Karki
2018-08-08 15:21 ` [PATCH 01/18] builtin rebase: allow selecting the rebase "backend" Pratik Karki
2018-08-08 15:21 ` [PATCH 02/18] builtin rebase: support --signoff Pratik Karki
2018-08-08 15:21 ` [PATCH 03/18] builtin rebase: support --rerere-autoupdate Pratik Karki
2018-08-08 15:21 ` [PATCH 04/18] builtin rebase: support --committer-date-is-author-date Pratik Karki
2018-08-08 15:21 ` [PATCH 05/18] builtin rebase: support `ignore-whitespace` option Pratik Karki
2018-08-08 15:21 ` [PATCH 06/18] builtin rebase: support `ignore-date` option Pratik Karki
2018-08-08 15:21 ` [PATCH 07/18] builtin rebase: support `keep-empty` option Pratik Karki
2018-08-24 16:04 ` Johannes Schindelin
2018-08-08 15:21 ` [PATCH 08/18] builtin rebase: support `--autosquash` Pratik Karki
2018-08-08 15:21 ` [PATCH 09/18] builtin rebase: support `--gpg-sign` option Pratik Karki
2018-08-08 15:21 ` [PATCH 10/18] builtin rebase: support `-C` and `--whitespace=<type>` Pratik Karki
2018-08-08 15:21 ` [PATCH 11/18] builtin rebase: support `--autostash` option Pratik Karki
2018-08-18 15:59 ` Duy Nguyen
2018-08-24 16:06 ` Johannes Schindelin
2018-08-08 15:21 ` [PATCH 12/18] builtin rebase: support `--exec` Pratik Karki
2018-08-08 15:21 ` [PATCH 13/18] builtin rebase: support `--allow-empty-message` option Pratik Karki
2018-08-08 15:21 ` [PATCH 14/18] builtin rebase: support --rebase-merges[=[no-]rebase-cousins] Pratik Karki
2018-08-08 15:21 ` [PATCH 15/18] merge-base --fork-point: extract libified function Pratik Karki
2018-08-08 15:21 ` [PATCH 16/18] builtin rebase: support `fork-point` option Pratik Karki
2018-08-08 15:21 ` [PATCH 17/18] builtin rebase: add support for custom merge strategies Pratik Karki
2018-08-08 15:21 ` [PATCH 18/18] builtin rebase: support --root Pratik Karki
2018-09-04 21:59 ` Johannes Schindelin via GitGitGadget [this message]
2018-09-04 21:59 ` [PATCH v2 01/18] builtin rebase: allow selecting the rebase "backend" Pratik Karki via GitGitGadget
2018-09-04 21:59 ` [PATCH v2 02/18] builtin rebase: support --signoff Pratik Karki via GitGitGadget
2018-09-04 21:59 ` [PATCH v2 03/18] builtin rebase: support --rerere-autoupdate Pratik Karki via GitGitGadget
2018-09-04 21:59 ` [PATCH v2 04/18] builtin rebase: support --committer-date-is-author-date Pratik Karki via GitGitGadget
2018-09-04 21:59 ` [PATCH v2 05/18] builtin rebase: support `ignore-whitespace` option Pratik Karki via GitGitGadget
2018-09-04 21:59 ` [PATCH v2 06/18] builtin rebase: support `ignore-date` option Pratik Karki via GitGitGadget
2018-09-04 21:59 ` [PATCH v2 07/18] builtin rebase: support `keep-empty` option Pratik Karki via GitGitGadget
2018-09-04 21:59 ` [PATCH v2 08/18] builtin rebase: support `--autosquash` Pratik Karki via GitGitGadget
2018-09-04 22:00 ` [PATCH v2 09/18] builtin rebase: support `--gpg-sign` option Pratik Karki via GitGitGadget
2018-09-04 22:00 ` [PATCH v2 10/18] builtin rebase: support `-C` and `--whitespace=<type>` Pratik Karki via GitGitGadget
2018-09-04 22:00 ` [PATCH v2 11/18] builtin rebase: support `--autostash` option Pratik Karki via GitGitGadget
2018-09-04 22:00 ` [PATCH v2 12/18] builtin rebase: support `--exec` Pratik Karki via GitGitGadget
2018-09-04 22:00 ` [PATCH v2 13/18] builtin rebase: support `--allow-empty-message` option Pratik Karki via GitGitGadget
2018-09-04 22:00 ` [PATCH v2 14/18] builtin rebase: support --rebase-merges[=[no-]rebase-cousins] Pratik Karki via GitGitGadget
2018-09-04 22:00 ` [PATCH v2 15/18] merge-base --fork-point: extract libified function Pratik Karki via GitGitGadget
2018-09-04 22:00 ` [PATCH v2 16/18] builtin rebase: support `fork-point` option Pratik Karki via GitGitGadget
2018-09-04 22:00 ` [PATCH v2 17/18] builtin rebase: add support for custom merge strategies Pratik Karki via GitGitGadget
2018-09-04 22:00 ` [PATCH v2 18/18] builtin rebase: support --root Pratik Karki via GitGitGadget
2018-09-06 19:50 ` [PATCH v2 00/18] builtin rebase options Junio C Hamano
2018-09-06 20:38 ` Junio C Hamano
2018-10-12 12:01 ` Johannes Schindelin
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=pull.33.v2.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
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.