* git-describe fails with "--dirty is incompatible with committishes" if passing HEAD as argument
@ 2012-11-19 15:47 Francis Moreau
2012-11-19 19:36 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Francis Moreau @ 2012-11-19 15:47 UTC (permalink / raw
To: git
Hello,
Inside the kernel repository, I tried this:
$ git describe --dirty --match 'v[0-9]*' --abbrev=4 HEAD
fatal: --dirty is incompatible with committishes
If 'HEAD' is removed then git-describe works as expected.
Is that expected ?
Thanks
--
Francis
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-describe fails with "--dirty is incompatible with committishes" if passing HEAD as argument
2012-11-19 15:47 git-describe fails with "--dirty is incompatible with committishes" if passing HEAD as argument Francis Moreau
@ 2012-11-19 19:36 ` Junio C Hamano
2012-11-19 20:39 ` Francis Moreau
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2012-11-19 19:36 UTC (permalink / raw
To: Francis Moreau; +Cc: git
Francis Moreau <francis.moro@gmail.com> writes:
> Inside the kernel repository, I tried this:
>
> $ git describe --dirty --match 'v[0-9]*' --abbrev=4 HEAD
> fatal: --dirty is incompatible with committishes
>
> If 'HEAD' is removed then git-describe works as expected.
>
> Is that expected ?
I would say so, at least in modern codebase.
"git describe" without any commit object name used to mean "describe
the HEAD commit using the better known points" before the --dirty
option was introduced.
But "--dirty" makes it describe the current checkout. For example,
output from "git describe --dirty" v1.8.0-211-gd8b4531-dirty means
"your working tree contains work-in-progress based on d8b4531, which
is 211 commits ahead of the v1.8.0 tag". So conceptually, it should
not take any commit, even if it were spelled HEAD.
"git describe --dirty HEAD^^" would be an utter nonsense for the
same reason.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-describe fails with "--dirty is incompatible with committishes" if passing HEAD as argument
2012-11-19 19:36 ` Junio C Hamano
@ 2012-11-19 20:39 ` Francis Moreau
0 siblings, 0 replies; 3+ messages in thread
From: Francis Moreau @ 2012-11-19 20:39 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
On Mon, Nov 19, 2012 at 8:36 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Francis Moreau <francis.moro@gmail.com> writes:
>
>> Inside the kernel repository, I tried this:
>>
>> $ git describe --dirty --match 'v[0-9]*' --abbrev=4 HEAD
>> fatal: --dirty is incompatible with committishes
>>
>> If 'HEAD' is removed then git-describe works as expected.
>>
>> Is that expected ?
>
> I would say so, at least in modern codebase.
>
> "git describe" without any commit object name used to mean "describe
> the HEAD commit using the better known points" before the --dirty
> option was introduced.
>
> But "--dirty" makes it describe the current checkout. For example,
> output from "git describe --dirty" v1.8.0-211-gd8b4531-dirty means
> "your working tree contains work-in-progress based on d8b4531, which
> is 211 commits ahead of the v1.8.0 tag". So conceptually, it should
> not take any commit, even if it were spelled HEAD.
>
> "git describe --dirty HEAD^^" would be an utter nonsense for the
> same reason.
Thanks for explaining, that makes sense.
--
Francis
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-19 20:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19 15:47 git-describe fails with "--dirty is incompatible with committishes" if passing HEAD as argument Francis Moreau
2012-11-19 19:36 ` Junio C Hamano
2012-11-19 20:39 ` Francis Moreau
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).