From: Junio C Hamano <junkio@cox.net>
To: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Cc: git@vger.kernel.org
Subject: Re: git describe fails without tags
Date: Thu, 26 Jan 2006 00:07:57 -0800 [thread overview]
Message-ID: <7vmzhjif8i.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20060126074421.GA2941@informatik.uni-freiburg.de> (Uwe Zeisberger's message of "Thu, 26 Jan 2006 08:44:21 +0100")
Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> writes:
> Yes, I wrote a script that automatically build git and install it to
> ${HOME}/usr/stow/git-`git describe HEAD` and then stow(8)s it. Writing
> a similar script for sparse cannot use git describe because there are no
> tags ...
> ...
> It's a pity your not particularly interested, I like that patch's idea.
> git describe dies with an error here in a situation where there is the
> possibility to do something sensible.
I think I understand the problem pretty well, and actually I am
sympathetic to the cause.
Having said that, I do not agree with the approach of your
patch. It makes it inconvenient for scripts to tell describable
and indescribable revs apart by checking the exit status from
the command.
In other words, I think a sensible thing can be done more sanely
in your script. Something like this?
#!/bin/sh
project=git ;# or 'sparse'
version=`git describe HEAD` ||
version=untagged-g`git rev-parse --abbrev HEAD`
$(MAKE) prefix=$HOME/usr/stow/$project-$version
If you want to squelch the error message from indescribable rev,
you could do:
version=`git describe HEAD 2>/dev/null` ||
of course.
next prev parent reply other threads:[~2006-01-26 8:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-25 7:47 git describe fails without tags Uwe Zeisberger
2006-01-25 9:52 ` Junio C Hamano
2006-01-26 7:44 ` Uwe Zeisberger
2006-01-26 8:07 ` Junio C Hamano [this message]
2006-01-26 8:45 ` Uwe Zeisberger
2006-01-26 8:41 ` Uwe Zeisberger
2006-01-26 9:02 ` Junio C Hamano
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=7vmzhjif8i.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=zeisberg@informatik.uni-freiburg.de \
/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