-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Labels
upstreamBlocked on upstream libgit2/git2rsBlocked on upstream libgit2/git2rs
Description
The git CLI supports overriding configuration with options like -c absorb.fixupTargetAlwaysSHA, but these appear to be ignored by git-absorb (unlike GIT_CONFIG_GLOBAL/GIT_CONFIG_SYSTEM environment variables, which seem to be respected):
$ AWK_SCAN_OUTPUT='
/would have committed/ {
if(match($0, /[0-9a-fA-F]{8,}/)) by_hash++; else by_subject++;
}
END {
printf "%d by hash, %d by subject\n", by_hash, by_subject;
}
'
$ git absorb --dry-run 2>&1 | awk "$AWK_SCAN_OUTPUT"
0 by hash, 2 by subject
$ git -c absorb.fixupTargetAlwaysSHA absorb --dry-run 2>&1 | awk "$AWK_SCAN_OUTPUT"
0 by hash, 2 by subject
$ printf '[absorb]\n fixupTargetAlwaysSHA = true\n' > /tmp/dummy-gitconfig
$ cat /tmp/dummy-gitconfig
[absorb]
fixupTargetAlwaysSHA = true
$ GIT_CONFIG_GLOBAL=/tmp/dummy-gitconfig git absorb --dry-run 2>&1 | awk "$AWK_SCAN_OUTPUT"
2 by hash, 0 by subjectReading the source code suggests to me that the issue is probably in either git2 or in this code's use of it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
upstreamBlocked on upstream libgit2/git2rsBlocked on upstream libgit2/git2rs