Skip to content

sideband: skip unrecognized allowControlCharacters keywords - #2261

Open
thomasbachem wants to merge 1 commit into
gitgitgadget:masterfrom
thomasbachem:sideband-control-characters-loop
Open

thomasbachem wants to merge 1 commit into
gitgitgadget:masterfrom
thomasbachem:sideband-control-characters-loop

Conversation

@thomasbachem

@thomasbachem thomasbachem commented Oct 16, 2026 •

Copy link
Copy Markdown

Cc: Johannes Schindelin Johannes.Schindelin@gmx.de
Cc: Junio C Hamano gitster@pobox.com
cc: Tuomas Ahola taahol@utu.fi

Since 1289144 (sideband: add options to allow more control
sequences to be passed through, 2026-03-05), the value of
sideband.allowControlCharacters is a comma-separated list of
keywords. When the parser meets a keyword it does not know, it warns
but stays on that keyword, so the warning repeats forever.

As the setting is read whenever a transport is set up, a typo like
"colour", a list written as "color, cursor" with a space, or a
keyword that only a newer version of Git knows is enough to make
every fetch, push, clone and ls-remote hang this way.

Move on to the next keyword after the warning, and name only the
unrecognized keyword in it, not the rest of the list.

Assisted-by: Claude Opus 5.5
Signed-off-by: Thomas Bachem <mail@thomasbachem.com>
@thomasbachem

Copy link
Copy Markdown
Author

/preview

@gitgitgadget

gitgitgadget Bot commented Oct 16, 2026

Copy link
Copy Markdown

Preview email sent as pull.2261.git.1792148387473.gitgitgadget@gmail.com

@thomasbachem

Copy link
Copy Markdown
Author

/submit

@gitgitgadget

gitgitgadget Bot commented Oct 16, 2026

Copy link
Copy Markdown

Submitted as pull.2261.git.1792154374653.gitgitgadget@gmail.com

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-2261/thomasbachem/sideband-control-characters-loop-v1

To fetch this version to local tag pr-2261/thomasbachem/sideband-control-characters-loop-v1:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-2261/thomasbachem/sideband-control-characters-loop-v1

@gitgitgadget

gitgitgadget Bot commented Oct 16, 2026

Copy link
Copy Markdown

Tuomas Ahola wrote on the Git mailing list (how to reply to this email):

"Thomas Bachem via GitGitGadget" <gitgitgadget@gmail.com> wrote:

> +			warning(_("unrecognized value for '%s': '%.*s'"),
> +				var, (int)(end - value), value);
> +			value = end + !!*end;
> +		}

Reading CodingGuidelines, it seems that `!!` is a construct we would
like to avoid:

 - Some clever tricks, like using the !! operator with arithmetic
   constructs, can be extremely confusing to others.  Avoid them,
   unless there is a compelling reason to use them.

--Tuomas

@gitgitgadget

gitgitgadget Bot commented Oct 16, 2026

Copy link
Copy Markdown

User Tuomas Ahola <taahol@utu.fi> 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant