[riot-notifications] [RIOT-OS/RIOT] pkg/pkg.mk: Avoid doing a git fetch if we already have the commit. (#11491)

Gaƫtan Harter notifications at github.com
Mon May 6 13:52:33 CEST 2019


cladmi commented on this pull request.



> @@ -32,7 +32,9 @@ endif
 git-ensure-version: $(PKG_BUILDDIR)/.git-downloaded
 	if [ $(shell git -C $(PKG_BUILDDIR) rev-parse HEAD) != $(PKG_VERSION) ] ; then \
 		git -C $(PKG_BUILDDIR) clean -xdff ; \
-		git -C $(PKG_BUILDDIR) fetch "$(PKG_URL)" "$(PKG_VERSION)" ; \
+		if git cat-file -e -t '$(PKG_VERSION)^{commit}' ; then \

On `ubuntu` bionic, git does not like `-e -t`.
`error: switch `t' : incompatible with -e`.

I would like to maybe put it outside in a "git_check_version_is_a_commit" so document that it detects branches.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11491#pullrequestreview-233938962
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190506/6898ec35/attachment.html>


More information about the notifications mailing list