From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Philip Oakley <philipoakley@iee.org>, Jeff King <peff@peff.net>,
Phillip Wood <phillip.wood@dunelm.org.uk>,
Liam Beguin <liambeguin@gmail.com>
Subject: [PATCH v6 00/10] The final building block for a faster rebase -i
Date: Fri, 14 Jul 2017 16:44:32 +0200 (CEST) [thread overview]
Message-ID: <cover.1500043436.git.johannes.schindelin@gmx.de> (raw)
This patch series reimplements the expensive pre- and post-processing of
the todo script in C.
And it concludes the work I did to accelerate rebase -i so far.
I am still unwilling to replace a compile-time safe way to pass the
options to the revision machinery by the alternative (which I am still
flabbergasted about) proposed by Junio. This will not change.
I know that we want to concentrate on bug fixes on `master`, but this
patch series will most likely take a couple of months to get there, anyway.
So I may just as well send this iteration now. It's also not like I haven't
contributed any bug fixes lately...
Changes since v5:
- replaced a get_sha1() call by a get_oid() call already.
- adjusted to hashmap API changes
Johannes Schindelin (10):
t3415: verify that an empty instructionFormat is handled as before
rebase -i: generate the script via rebase--helper
rebase -i: remove useless indentation
rebase -i: do not invent onelines when expanding/collapsing SHA-1s
rebase -i: also expand/collapse the SHA-1s via the rebase--helper
t3404: relax rebase.missingCommitsCheck tests
rebase -i: check for missing commits in the rebase--helper
rebase -i: skip unnecessary picks using the rebase--helper
t3415: test fixup with wrapped oneline
rebase -i: rearrange fixup/squash lines using the rebase--helper
Documentation/git-rebase.txt | 16 +-
builtin/rebase--helper.c | 29 ++-
git-rebase--interactive.sh | 373 ++++-------------------------
sequencer.c | 531 ++++++++++++++++++++++++++++++++++++++++++
sequencer.h | 8 +
t/t3404-rebase-interactive.sh | 22 +-
t/t3415-rebase-autosquash.sh | 28 ++-
7 files changed, 647 insertions(+), 360 deletions(-)
base-commit: f3da2b79be9565779e4f76dc5812c68e156afdf0
Based-On: rebase--helper at https://github.com/dscho/git
Fetch-Base-Via: git fetch https://github.com/dscho/git rebase--helper
Published-As: https://github.com/dscho/git/releases/tag/rebase-i-extra-v6
Fetch-It-Via: git fetch https://github.com/dscho/git rebase-i-extra-v6
Interdiff vs v5:
diff --git a/sequencer.c b/sequencer.c
index 8713cc8d1d5..c54596f9699 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2654,7 +2654,7 @@ int skip_unnecessary_picks(void)
if (!read_oneliner(&buf, rebase_path_onto(), 0))
return error(_("could not read 'onto'"));
- if (get_sha1(buf.buf, onto_oid.hash)) {
+ if (get_oid(buf.buf, &onto_oid)) {
strbuf_release(&buf);
return error(_("need a HEAD to fixup"));
}
@@ -2756,8 +2756,9 @@ struct subject2item_entry {
char subject[FLEX_ARRAY];
};
-static int subject2item_cmp(const struct subject2item_entry *a,
- const struct subject2item_entry *b, const void *key)
+static int subject2item_cmp(const void *fndata,
+ const struct subject2item_entry *a,
+ const struct subject2item_entry *b, const void *key)
{
return key ? strcmp(a->subject, key) : strcmp(a->subject, b->subject);
}
@@ -2802,7 +2803,7 @@ int rearrange_squash(void)
* be moved to appear after the i'th.
*/
hashmap_init(&subject2item, (hashmap_cmp_fn) subject2item_cmp,
- todo_list.nr);
+ NULL, todo_list.nr);
ALLOC_ARRAY(next, todo_list.nr);
ALLOC_ARRAY(tail, todo_list.nr);
ALLOC_ARRAY(subjects, todo_list.nr);
--
2.13.3.windows.1.13.gaf0c2223da0
next reply other threads:[~2017-07-14 14:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 14:44 Johannes Schindelin [this message]
2017-07-14 14:44 ` [PATCH v6 01/10] t3415: verify that an empty instructionFormat is handled as before Johannes Schindelin
2017-07-14 14:44 ` [PATCH v6 02/10] rebase -i: generate the script via rebase--helper Johannes Schindelin
2017-07-14 22:50 ` Stefan Beller
2017-07-15 12:56 ` Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 03/10] rebase -i: remove useless indentation Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 04/10] rebase -i: do not invent onelines when expanding/collapsing SHA-1s Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 05/10] rebase -i: also expand/collapse the SHA-1s via the rebase--helper Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 06/10] t3404: relax rebase.missingCommitsCheck tests Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 07/10] rebase -i: check for missing commits in the rebase--helper Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 08/10] rebase -i: skip unnecessary picks using " Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 09/10] t3415: test fixup with wrapped oneline Johannes Schindelin
2017-07-14 14:45 ` [PATCH v6 10/10] rebase -i: rearrange fixup/squash lines using the rebase--helper Johannes Schindelin
2017-07-14 17:27 ` [PATCH v6 00/10] The final building block for a faster rebase -i Stefan Beller
2017-07-14 20:39 ` Johannes Schindelin
2017-07-20 21:38 ` Junio C Hamano
2017-07-22 11:44 ` 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=cover.1500043436.git.johannes.schindelin@gmx.de \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=liambeguin@gmail.com \
--cc=peff@peff.net \
--cc=philipoakley@iee.org \
--cc=phillip.wood@dunelm.org.uk \
/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 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 NNTP newsgroup(s).