<p>Alex Thiessen has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/23256">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">util/genbuild_h: Add gitfile support<br><br>`genbuild_h.sh` checks whether it is running from a coreboot's own git<br>worktree to decide wheter to use git as the time source. This check<br>fails when `${top}/.git` is a gitfile, e.g. when coreboot is a<br>submodule.<br><br>Add a proper `git rev-parse` call to check the condition.<br><br>Change-Id: I8bb13d607a01f4f28fa8b165769e0a1f702da362<br>Signed-off-by: Alex Thiessen <alex.thiessen+coreboot@gmail.com><br>---<br>M util/genbuild_h/genbuild_h.sh<br>1 file changed, 3 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/56/23256/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/util/genbuild_h/genbuild_h.sh b/util/genbuild_h/genbuild_h.sh</span><br><span>index dfbfca5..8f6d0eb 100755</span><br><span>--- a/util/genbuild_h/genbuild_h.sh</span><br><span>+++ b/util/genbuild_h/genbuild_h.sh</span><br><span>@@ -28,7 +28,9 @@</span><br><span>     GITREV=Timeless</span><br><span>      TIMESOURCE="fixed"</span><br><span>         DATE=0</span><br><span style="color: hsl(0, 100%, 40%);">-elif GIT_DIR="${top}/.git" git status > /dev/null 2>&1; then</span><br><span style="color: hsl(120, 100%, 40%);">+elif cdup="$(git -C "${top}" rev-parse --show-cdup 2>/dev/null)" \</span><br><span style="color: hsl(120, 100%, 40%);">+     && [ -z "${cdup}" ]</span><br><span style="color: hsl(120, 100%, 40%);">+then</span><br><span>  GITREV=$(LANG= git log -1 --format=format:%h)</span><br><span>        TIMESOURCE=git</span><br><span>       DATE=$(git log --pretty=format:%ct -1)</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/23256">change 23256</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/23256"/><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: I8bb13d607a01f4f28fa8b165769e0a1f702da362 </div>
<div style="display:none"> Gerrit-Change-Number: 23256 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com> </div>