<p></p>
<p><b>@eli-schwartz</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2761#discussion_r800123745">.gitignore</a>:</p>
<pre style='color:#555'>> @@ -20,6 +20,8 @@ Makefile.in
 /ABOUT-NLS
 /aclocal.m4
 /autom4te.cache
+/build/
+/build-*/
</pre>
<p dir="auto">Incidentally this is NOT necessary, because a builddir can be named anything (and you don't even match the recommended one which is <code>builddir/</code>.</p>
<p dir="auto">Meanwhile Meson itself always knows which directory you create as a builddir, so it just creates the file <code>builddir/.gitignore</code> with the contents <code>*</code> for you. :)</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2761#discussion_r800124024">meson.build</a>:</p>
<pre style='color:#555'>> +# actually constant, just match autconf
+pcconf.set('exec_prefix', '${prefix}')
+pcconf.set('datadir', '${datarootdir}')
+pcconf.set('localedir', join_paths('${datarootdir}', 'locale'))
+
+# needed programs
+sh = find_program('sh')
+cp = find_program('cp')
+ln = find_program('ln')
+python = find_program('python3')
+# These two are truly optional
+rst2html = find_program('rst2html', required: false)
+rst2pdf = find_program('rst2pdf', required: false)
+git = find_program('git', required: false)
+if git.found()
+       ret = run_command(git, 'rev-parse', '--short', '--revs-only', 'HEAD', check: false)
</pre>
<p dir="auto">I think you probably don't want this to be <code>check: false</code> because in the bizarro case that git errors out here you don't want this to be set to an empty string, though you might indeed want to check that the filesystem entry <code>.git</code> exists rather than assuming the current directory is a git checkout simply because git is installed.</p>
<p dir="auto">The empty string is not the same as your current fallback of <code>-1</code>.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2761#pullrequestreview-873988712">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ3COHMUHLVS6FDNDADUZXYURANCNFSM4ZDZAFLA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJ4B7JCHAXREH7PQBBLUZXYURA5CNFSM4ZDZAFLKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOGQMAE2A.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/pull/2761/review/873988712</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2761#pullrequestreview-873988712",
"url": "https://github.com/geany/geany/pull/2761#pullrequestreview-873988712",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>