Skip to content

sequencer: remove unnecessary variable setting - #1922

Open
newren wants to merge 1 commit into
gitgitgadget:masterfrom
newren:sequencer-remove-unnecessary-setting
Open

sequencer: remove unnecessary variable setting#1922
newren wants to merge 1 commit into
gitgitgadget:masterfrom
newren:sequencer-remove-unnecessary-setting

Conversation

@newren

@newren newren commented May 14, 2025

Copy link
Copy Markdown

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.

cc: Patrick Steinhardt ps@pks.im

@gitgitgadget

gitgitgadget Bot commented May 14, 2025

Copy link
Copy Markdown

There are issues in commit 4183bb9:
sequencer: remove unnecessary variable setting
Commit not signed off

@newren
newren force-pushed the sequencer-remove-unnecessary-setting branch 4 times, most recently from 3501d95 to 53c89cf Compare May 17, 2025 17:45
webstech added a commit that referenced this pull request Nov 5, 2025
…lti-8537485db5

build(deps-dev): bump jest and @types/jest
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 62db524 ("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>
@newren
newren force-pushed the sequencer-remove-unnecessary-setting branch from 53c89cf to d253493 Compare August 11, 2026 17:05
@newren

newren commented Aug 12, 2026

Copy link
Copy Markdown
Author

/submit

@gitgitgadget

gitgitgadget Bot commented Aug 12, 2026

Copy link
Copy Markdown

Submitted as pull.1922.git.1786516959130.gitgitgadget@gmail.com

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-1922/newren/sequencer-remove-unnecessary-setting-v1

To fetch this version to local tag pr-1922/newren/sequencer-remove-unnecessary-setting-v1:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-1922/newren/sequencer-remove-unnecessary-setting-v1

@gitgitgadget

gitgitgadget Bot commented Aug 12, 2026

Copy link
Copy Markdown

Junio C Hamano wrote on the Git mailing list (how to reply to this email):

"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:

> 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.

Thanks.  I'll mark the topic for 'next'.

> 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

gitgitgadget Bot commented Aug 13, 2026

Copy link
Copy Markdown

This branch is now known as en/sequencer-lose-pretty-given.

@gitgitgadget

gitgitgadget Bot commented Aug 13, 2026

Copy link
Copy Markdown

This patch series was integrated into seen via git@92999e3.

@gitgitgadget gitgitgadget Bot added the seen label Aug 13, 2026
@gitgitgadget

gitgitgadget Bot commented Aug 13, 2026

Copy link
Copy Markdown

There was a status update in the "New Topics" section about the branch en/sequencer-lose-pretty-given on the Git mailing list:

The setting of a now-unused member revs.pretty_given in the
sequencer machinery has been removed.

Will merge to 'next'?
cf. <xmqqa4qrxneq.fsf@gitster.g>
source: <pull.1922.git.1786516959130.gitgitgadget@gmail.com>

@gitgitgadget

gitgitgadget Bot commented Aug 13, 2026

Copy link
Copy Markdown

Patrick Steinhardt wrote on the Git mailing list (how to reply to this email):

On Wed, Aug 12, 2026 at 06:42:38AM +0000, Elijah Newren via GitGitGadget wrote:
> 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);

Makes sense. The only reference to this field is indeed in
"builtin/log.c", and as we don't use the sequencer there shouldn't be
any kind of interaction between those two subsystems here.

Thanks!

Patrick

@gitgitgadget

gitgitgadget Bot commented Aug 13, 2026

Copy link
Copy Markdown

User Patrick Steinhardt <ps@pks.im> has been added to the cc: list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant