]> git.ipfire.org Git - thirdparty/git.git/commitdiff
subtree: use "^{commit}" instead of "^0"
authorLuke Shumaker <lukeshu@datawire.io>
Tue, 27 Apr 2021 21:17:38 +0000 (15:17 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Apr 2021 07:47:18 +0000 (16:47 +0900)
They are synonyms.  Both are used in the file.  ^{commit} is clearer, so
"standardize" on that.

Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree/git-subtree.sh

index af636fbb435e9590d6d53a7caacf94d4ac96d056..ee7fda3672192bad69a973270c7c0171ec29eb9c 100755 (executable)
@@ -316,7 +316,7 @@ find_latest_squash () {
                        main="$b"
                        ;;
                git-subtree-split:)
-                       sub="$(git rev-parse "$b^0")" ||
+                       sub="$(git rev-parse "$b^{commit}")" ||
                        die "could not rev-parse split hash $b from commit $sq"
                        ;;
                END)
@@ -363,7 +363,7 @@ find_existing_splits () {
                        main="$b"
                        ;;
                git-subtree-split:)
-                       sub="$(git rev-parse "$b^0")" ||
+                       sub="$(git rev-parse "$b^{commit}")" ||
                        die "could not rev-parse split hash $b from commit $sq"
                        ;;
                END)