pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mk/git-package.mk: Use git-rev-parse, not git-show-ref.



Module Name:	pkgsrc-wip
Committed By:	Taylor R Campbell <riastradh%NetBSD.org@localhost>
Pushed By:	riastradh
Date:		Mon Sep 8 03:24:50 2025 +0000
Changeset:	094aac1260b4fff63b2ecac3df542f586252dce9

Modified Files:
	mk/git-package.mk

Log Message:
mk/git-package.mk: Use git-rev-parse, not git-show-ref.

We just need to know if the identity of the revspec changed, so the
difference between the two output formats is unlikely to matter.
git-show-ref only works for refs, while git-rev-parse additionally
works for commit hashes, so this fixes packages with GIT_REVISION.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=094aac1260b4fff63b2ecac3df542f586252dce9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 mk/git-package.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diffs:
diff --git a/mk/git-package.mk b/mk/git-package.mk
index b3d0bce803..bf542248cc 100644
--- a/mk/git-package.mk
+++ b/mk/git-package.mk
@@ -190,10 +190,10 @@ _GIT_CMD.checkout.${repo}= \
 	\
 	${STEP_MSG} "Updating Git working area $$extractdir.";		\
 	revision=${_GIT_REV.${repo}:Q};					\
-	rev_before=`${_GIT_CMDLINE.${repo}} -C "$$extractdir" show-ref "$$revision"`; \
+	rev_before=`${_GIT_CMDLINE.${repo}} -C "$$extractdir" rev-parse "$$revision"`; \
 	${_GIT_CMDLINE.${repo}} -C "$$extractdir"			\
 	  fetch ${_GIT_FETCH_FLAGS.${repo}};				\
-	rev_after=`${_GIT_CMDLINE.${repo}} -C "$$extractdir" show-ref "$$revision"`; \
+	rev_after=`${_GIT_CMDLINE.${repo}} -C "$$extractdir" rev-parse "$$revision"`; \
 	\
 	checkout_date=${CHECKOUT_DATE:Q};				\
 	if [ "$$checkout_date" ]; then					\


Home | Main Index | Thread Index | Old Index