You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
git-sync panics at startup when git config contains a key with no value #1005
Since 91a5cdf ("Log git configs"), git-sync can panic during startup when git config list -z returns a configuration key without a value.
The panic is:
panic: runtime error: index out of range [1] with length 1
The affected code splits each config entry on \n and unconditionally
accesses the second element. Git can emit a key without a value as key\0, without the \n separator.
This was reproduced with git 2.53 and the git-sync binary from the
affected commit.
Expected behavior: git-sync should continue starting and log the
configuration key.
A key without a value is kept distinct from an explicitly empty value.
The proposed fix represents the former as null in the diagnostic output.
The issue is reproducible through git configuration supplied via include.path, a repository-local configuration, or GIT_CONFIG_PARAMETERS.
Activity