Re: git-describe fails with "--dirty is incompatible with committishes" if passing HEAD as argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Francis Moreau <francis.moro@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]