<p>Alex Thiessen has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/23252">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">util/release: Improve git worktree checks<br><br>The bash script `genrelnotes` checks for `.git` to be present to determine<br>whether the current directory is the top directory of a git worktree. This check<br>is rather weak and doesn't handle many 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: I32b06ca982d55fd8e88e55651b6bc53014905823<br>Signed-off-by: Alex Thiessen <alex.thiessen+coreboot@gmail.com><br>---<br>M util/release/genrelnotes<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/52/23252/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/util/release/genrelnotes b/util/release/genrelnotes</span><br><span>index 504eda4..9db8631 100755</span><br><span>--- a/util/release/genrelnotes</span><br><span>+++ b/util/release/genrelnotes</span><br><span>@@ -32,7 +32,8 @@</span><br><span>  exit 1</span><br><span> fi</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-if [ ! -e ".git" ];then</span><br><span style="color: hsl(120, 100%, 40%);">+if ! { cdup="$(git rev-parse --show-cdup 2>/dev/null)" && [ -z "${cdup}" ]; }</span><br><span style="color: hsl(120, 100%, 40%);">+then</span><br><span>        echo "ERROR: This is not the top directory of a git repo.  Exiting."</span><br><span>       exit 1</span><br><span> fi</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/23252">change 23252</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/23252"/><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: I32b06ca982d55fd8e88e55651b6bc53014905823 </div>
<div style="display:none"> Gerrit-Change-Number: 23252 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com> </div>