From 7ed45a3d3997513bbfb009787dd5f158cb465653 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 29 Nov 2019 20:18:14 +0000 Subject: [PATCH] build system: Cope if HEAD refers to a packed ref In this case, there may be no corresponding .git/refs/. Simply tolerate this. Signed-off-by: Ian Jackson --- Subdir.sd.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Subdir.sd.mk b/Subdir.sd.mk index 4d7d35f..ead5f51 100644 --- a/Subdir.sd.mk +++ b/Subdir.sd.mk @@ -112,7 +112,7 @@ secnet: $(OBJECTS) ifneq (,$(wildcard .git/HEAD)) # If we have (eg) committed, relink and thus regenerate the version # with the new info from git describe. -secnet: Makefile .git/HEAD $(shell sed -n 's#^ref: #.git/#p' .git/HEAD) +secnet: Makefile .git/HEAD $(wildcard $(shell sed -n 's#^ref: #.git/#p' .git/HEAD)) secnet: $(wildcard .git/packed-refs) endif -- 2.30.2