{"thread":{"id":"32147","subject":"git-describe fails with \"--dirty is incompatible with committishes\" if passing HEAD as argument","startedAt":"2012-11-19T15:47:56Z","lastAt":"2012-11-19T20:39:23Z","messageCount":3,"participants":["Francis Moreau","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"203506","messageId":"CAC9WiBjw0W4kLCKMj6HhdjAXOJYpDW2Rgncb+06ahjiYOWtZ8Q@mail.gmail.com","threadId":"32147","inReplyTo":null,"subject":"git-describe fails with \"--dirty is incompatible with committishes\" if passing HEAD as argument","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2012-11-19T15:47:56Z","receivedAt":"2012-11-19T15:47:56Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"Hello,\n\nInside the kernel repository, I tried this:\n\n$ git describe --dirty --match 'v[0-9]*' --abbrev=4 HEAD\nfatal: --dirty is incompatible with committishes\n\nIf 'HEAD' is removed then git-describe works as expected.\n\nIs that expected ?\n\nThanks\n--\nFrancis\n"},{"id":"203510","messageId":"7vfw45xu4e.fsf@alter.siamese.dyndns.org","threadId":"32147","inReplyTo":"CAC9WiBjw0W4kLCKMj6HhdjAXOJYpDW2Rgncb+06ahjiYOWtZ8Q@mail.gmail.com","subject":"Re: git-describe fails with \"--dirty is incompatible with committishes\" if passing HEAD as argument","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-11-19T19:36:33Z","receivedAt":"2012-11-19T19:36:33Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Francis Moreau <francis.moro@gmail.com> writes:\n\n> Inside the kernel repository, I tried this:\n>\n> $ git describe --dirty --match 'v[0-9]*' --abbrev=4 HEAD\n> fatal: --dirty is incompatible with committishes\n>\n> If 'HEAD' is removed then git-describe works as expected.\n>\n> Is that expected ?\n\nI would say so, at least in modern codebase.\n\n\"git describe\" without any commit object name used to mean \"describe\nthe HEAD commit using the better known points\" before the --dirty\noption was introduced.\n\nBut \"--dirty\" makes it describe the current checkout.  For example,\noutput from \"git describe --dirty\" v1.8.0-211-gd8b4531-dirty means\n\"your working tree contains work-in-progress based on d8b4531, which\nis 211 commits ahead of the v1.8.0 tag\".  So conceptually, it should\nnot take any commit, even if it were spelled HEAD.\n\n\"git describe --dirty HEAD^^\" would be an utter nonsense for the\nsame reason.\n"},{"id":"203513","messageId":"CAC9WiBjcUMOpa_KvS-8k0bWR=XTqVRT_qFLx1keVmG1nee8GOw@mail.gmail.com","threadId":"32147","inReplyTo":"7vfw45xu4e.fsf@alter.siamese.dyndns.org","subject":"Re: git-describe fails with \"--dirty is incompatible with committishes\" if passing HEAD as argument","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2012-11-19T20:39:23Z","receivedAt":"2012-11-19T20:39:23Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"On Mon, Nov 19, 2012 at 8:36 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Francis Moreau <francis.moro@gmail.com> writes:\n>\n>> Inside the kernel repository, I tried this:\n>>\n>> $ git describe --dirty --match 'v[0-9]*' --abbrev=4 HEAD\n>> fatal: --dirty is incompatible with committishes\n>>\n>> If 'HEAD' is removed then git-describe works as expected.\n>>\n>> Is that expected ?\n>\n> I would say so, at least in modern codebase.\n>\n> \"git describe\" without any commit object name used to mean \"describe\n> the HEAD commit using the better known points\" before the --dirty\n> option was introduced.\n>\n> But \"--dirty\" makes it describe the current checkout.  For example,\n> output from \"git describe --dirty\" v1.8.0-211-gd8b4531-dirty means\n> \"your working tree contains work-in-progress based on d8b4531, which\n> is 211 commits ahead of the v1.8.0 tag\".  So conceptually, it should\n> not take any commit, even if it were spelled HEAD.\n>\n> \"git describe --dirty HEAD^^\" would be an utter nonsense for the\n> same reason.\n\nThanks for explaining, that makes sense.\n\n--\nFrancis\n"}]}