From: Junio C Hamano <gitster@pobox•com>
To: "SZEDER Gábor" <szeder@ira•uka.de>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] describe: make '--always' fallback work after '--exact-match' failed
Date: Thu, 20 Aug 2015 11:39:27 -0700 [thread overview]
Message-ID: <xmqqegix7qjk.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1440072823-18024-1-git-send-email-szeder@ira.uka.de> ("SZEDER Gábor"'s message of "Thu, 20 Aug 2015 14:13:43 +0200")
SZEDER Gábor <szeder@ira•uka.de> writes:
> 'git describe [...] --always' should always show the unique abbreviated
> object name as a fallback when the given commit cannot be described with
> the given set of options, see da2478dbb0 (describe --always: fall back
> to showing an abbreviated object name, 2008-03-02).
>
> However, this is not the case when the combination '--exact-match
> --always' is given and the commit cannot be described, because in such
> cases 'git describe' errors out, as if '--always' were not given at all.
>
> Respect '--always' and print the unique abbreviated object name instead
> of erroring out when the commit cannot be described with '--exact-match
> --always'.
>
> Signed-off-by: SZEDER Gábor <szeder@ira•uka.de>
Well, that can be argued both ways. Your patch introduces a
regression, as "--exact-match" is an instruction to error out when
no tag exactly matches, and you deliberately break that.
My knee-jerk reaction is that the most sensible way forward is to
make --exact-match and --always mutually incompatible.
next prev parent reply other threads:[~2015-08-20 18:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 12:13 [PATCH] describe: make '--always' fallback work after '--exact-match' failed SZEDER Gábor
2015-08-20 18:39 ` Junio C Hamano [this message]
2015-08-21 11:40 ` SZEDER Gábor
2015-08-21 15:55 ` Junio C Hamano
2015-08-21 14:50 ` [PATCH] describe --contains: default to HEAD when no commit-ish is given SZEDER Gábor
2015-08-21 16:30 ` Junio C Hamano
2015-08-24 16:14 ` SZEDER Gábor
2015-08-24 16:15 ` [PATCH v2] " SZEDER Gábor
2015-08-24 18:47 ` [PATCH] " 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=xmqqegix7qjk.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=szeder@ira$(echo .)uka.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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