<p>Alex Thiessen has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/23254">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Makefile.inc: Improve git worktree check<br><br>`Makefile.inc` checks for `.git` to be present under $(top) to define<br>the value of $GIT. This check is rather weak and doesn't handle many<br>edge cases like that of a broken gitfile.<br><br>Add a proper `git rev-parse` call to check the condition.<br><br>Change-Id: Ifd6da19f13d9f2a9fddb6afd7cb5f16daba2401e<br>Signed-off-by: Alex Thiessen <alex.thiessen+coreboot@gmail.com><br>---<br>M Makefile.inc<br>1 file changed, 2 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/23254/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/Makefile.inc b/Makefile.inc</span><br><span>index 413f7ad..6bc51f8 100644</span><br><span>--- a/Makefile.inc</span><br><span>+++ b/Makefile.inc</span><br><span>@@ -14,7 +14,8 @@</span><br><span> ##</span><br><span> </span><br><span> ifneq ($(NOCOMPILE),1)</span><br><span style="color: hsl(0, 100%, 40%);">-GIT:=$(shell [ -e "$(top)/.git" ] && command -v git)</span><br><span style="color: hsl(120, 100%, 40%);">+GIT:=$(shell git -C "$(top)" rev-parse --git-dir 1>/dev/null 2>&1 \</span><br><span style="color: hsl(120, 100%, 40%);">+     && command -v git)</span><br><span> else</span><br><span> GIT:=</span><br><span> endif</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/23254">change 23254</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/23254"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ifd6da19f13d9f2a9fddb6afd7cb5f16daba2401e </div>
<div style="display:none"> Gerrit-Change-Number: 23254 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com> </div>