git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-describe considers WC dirty incorrectly when using --git-dir

From
CPChris Pimlott <chris@pimlott.net>
Date
Mar 4, 2015, 20:12 UTC
Message-ID
<CACWYfsBVTcJxykWde5nNirHTdV9-yoanGAb2zVevXeewTTJJzQ@mail.gmail.com>
In-Reply-To
<xmqqoao88rol.fsf@gitster.dls.corp.google.com>
On Wed, Mar 4, 2015 at 11:54 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> Chris Pimlott <chris@pimlott.net> writes:
>
>>   folio:text chris$ git --git-dir=../.git describe --always --dirty
>>   c0edd63-dirty
>
> I have a feeling that this is not limited to describe at all.  With
> the --git-dir option, you are telling Git that your GIT_DIR is over
> there and (by not using --work-tree together with that option) you
> are telling Git that you do not want Git to guess where the working
> tree is (instead, you are telling Git that you are at the top of the
> working tree), no?

Ah, my apologies, you are correct. I was not aware of --work-tree and didn't realize that specifying --git-dir would turn off the normal working tree discovery process. Thanks!

Previous: Junio C Hamano
Message 3 of 3 in “git-describe considers WC dirty incorrectly when using --git-dir”
  1. Chris PimlottMar 4, 2015
  2. Junio C HamanoMar 4, 2015
  3. Chris PimlottMar 4, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.