From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Elijah Newren <newren@gmail.com>, Elijah Newren <newren@gmail.com>
Subject: [PATCH] sequencer: remove unnecessary variable setting
Date: Wed, 12 Aug 2026 06:42:38 +0000 [thread overview]
Message-ID: <pull.1922.git.1786516959130.gitgitgadget@gmail.com> (raw)
From: Elijah Newren <newren@gmail.com>
revs.pretty_given is only ever read in builtin/log.c, and nothing from
builtin/log.c is ever called from sequencer.c. So setting this variable
cannot do anything.
This was introduced in commit 62db524779 ("rebase -i: generate the
script via rebase--helper", 2017-07-14), which used `git rev-list` even
though its commit message describes the logic as having been based on
`git log`. Because of this, I am guessing this line was copied or
ported from part of builtin/log.c without recognizing that this line was
not doing anything and could be removed.
It's certainly not doing anything now, though, so remove it.
Signed-off-by: Elijah Newren <newren@gmail.com>
---
sequencer: remove unnecessary variable setting
Random thing I noticed a few years ago, I believe while investigating
our tangled web of revision fields and parsing. Either way, it's still
valid and I'm finally sending it upstream.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1922%2Fnewren%2Fsequencer-remove-unnecessary-setting-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1922/newren/sequencer-remove-unnecessary-setting-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1922
sequencer.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sequencer.c b/sequencer.c
index 83c3849205..a0abcc69ce 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -6277,7 +6277,6 @@ int sequencer_make_script(struct repository *r, struct strbuf *out,
revs.sort_order = REV_SORT_IN_GRAPH_ORDER;
revs.topo_order = 1;
- revs.pretty_given = 1;
repo_config_get_string(the_repository, "rebase.instructionFormat", &format);
if (!format || !*format) {
free(format);
base-commit: 2c78326f810173a4f3aefd8021f1e07575412481
--
gitgitgadget
reply other threads:[~2026-08-12 6:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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.1922.git.1786516959130.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox