Skip to content

Commit 65ebfec

Browse files
committed
Merge branch 'sg/subtree-signed-commits'
"git subtree" script (in contrib/) scripted around "git log", whose output got affected by end-user configuration like log.showsignature * sg/subtree-signed-commits: subtree: fix add and pull for GPG-signed commits
2 parents 5fc4a7e + 8841b52 commit 65ebfec

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

contrib/subtree/git-subtree.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ find_latest_squash () {
297297
main=
298298
sub=
299299
git log --grep="^git-subtree-dir: $dir/*\$" \
300-
--pretty=format:'START %H%n%s%n%n%b%nEND%n' HEAD |
300+
--no-show-signature --pretty=format:'START %H%n%s%n%n%b%nEND%n' HEAD |
301301
while read a b junk
302302
do
303303
debug "$a $b $junk"
@@ -341,7 +341,7 @@ find_existing_splits () {
341341
main=
342342
sub=
343343
git log --grep="^git-subtree-dir: $dir/*\$" \
344-
--pretty=format:'START %H%n%s%n%n%b%nEND%n' $revs |
344+
--no-show-signature --pretty=format:'START %H%n%s%n%n%b%nEND%n' $revs |
345345
while read a b junk
346346
do
347347
case "$a" in
@@ -382,7 +382,7 @@ copy_commit () {
382382
# We're going to set some environment vars here, so
383383
# do it in a subshell to get rid of them safely later
384384
debug copy_commit "{$1}" "{$2}" "{$3}"
385-
git log -1 --pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' "$1" |
385+
git log -1 --no-show-signature --pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' "$1" |
386386
(
387387
read GIT_AUTHOR_NAME
388388
read GIT_AUTHOR_EMAIL
@@ -462,8 +462,8 @@ squash_msg () {
462462
oldsub_short=$(git rev-parse --short "$oldsub")
463463
echo "Squashed '$dir/' changes from $oldsub_short..$newsub_short"
464464
echo
465-
git log --pretty=tformat:'%h %s' "$oldsub..$newsub"
466-
git log --pretty=tformat:'REVERT: %h %s' "$newsub..$oldsub"
465+
git log --no-show-signature --pretty=tformat:'%h %s' "$oldsub..$newsub"
466+
git log --no-show-signature --pretty=tformat:'REVERT: %h %s' "$newsub..$oldsub"
467467
else
468468
echo "Squashed '$dir/' content from commit $newsub_short"
469469
fi
@@ -475,7 +475,7 @@ squash_msg () {
475475

476476
toptree_for_commit () {
477477
commit="$1"
478-
git log -1 --pretty=format:'%T' "$commit" -- || exit $?
478+
git rev-parse --verify "$commit^{tree}" || exit $?
479479
}
480480

481481
subtree_for_commit () {

0 commit comments

Comments
 (0)