From: Bill Lear <rael@zopyra.com>
To: git@vger.kernel.org
Subject: Possible kinder GIT-VERSION-GEN?
Date: Mon, 4 Feb 2008 14:28:48 -0600 [thread overview]
Message-ID: <18343.30080.67524.3427@lisa.zopyra.com> (raw)
I have my home directory under git control, and I have a build
directory (not tracked by git) under my home directory into which I
untar files and then in which I build things, including git.
When doing this, the version reported always contains the '-dirty'
suffix, which I find annoying (and potentially misleading). I traced
this to the GIT-VERSION-GEN script, and I "fixed" it by checking
if there is a '.git' directory present before invoking git diff-index,
something like this:
dirty=$(sh -c 'test -f .git && git diff-index --name-only HEAD' 2>/dev/null) || dirty=
case "$dirty" in
'')
;;
*)
VN="$VN dirty" ;;
esac
If someone of authority here thinks this seems reasonable (or has a
better way), I will test this (along with any suggested improvements)
with the git repo itself (to ensure it puts '-dirty' when it really
should), and submit a patch.
Bill
next reply other threads:[~2008-02-04 20:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-04 20:28 Bill Lear [this message]
2008-02-04 21:59 ` Possible kinder GIT-VERSION-GEN? Junio C Hamano
2008-02-04 22:32 ` Bill Lear
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18343.30080.67524.3427@lisa.zopyra.com \
--to=rael@zopyra.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox