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 subject
Reading the source code suggests to me that the issue is probably in either git2 or in this code's use of it.
The
gitCLI supports overriding configuration with options like-c absorb.fixupTargetAlwaysSHA, but these appear to be ignored by git-absorb (unlikeGIT_CONFIG_GLOBAL/GIT_CONFIG_SYSTEMenvironment variables, which seem to be respected):Reading the source code suggests to me that the issue is probably in either git2 or in this code's use of it.