From: Junio C Hamano <gitster@pobox.com>
To: Francis Moreau <francis.moro@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git-describe fails with "--dirty is incompatible with committishes" if passing HEAD as argument
Date: Mon, 19 Nov 2012 11:36:33 -0800 [thread overview]
Message-ID: <7vfw45xu4e.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAC9WiBjw0W4kLCKMj6HhdjAXOJYpDW2Rgncb+06ahjiYOWtZ8Q@mail.gmail.com> (Francis Moreau's message of "Mon, 19 Nov 2012 16:47:56 +0100")
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.
next prev parent reply other threads:[~2012-11-19 19:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-11-19 20:39 ` Francis Moreau
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=7vfw45xu4e.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=francis.moro@gmail.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