{"thread":{"id":"50320","subject":"git describe --dirty doesn't work with --work-tree","startedAt":"2019-01-25T14:05:33Z","lastAt":"2019-01-25T14:05:33Z","messageCount":1,"participants":["Blixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"367660","messageId":"CAFYJ4vur8KUbvnPaq2McR874K6o5YS6pCkKnihdwN758CKkwng@mail.gmail.com","threadId":"50320","inReplyTo":"CAFYJ4vvGhwxd5wTq-yYeOy6Hq-GpCsTy6=jG-LoHn2mShM4_NQ@mail.gmail.com","subject":"git describe --dirty doesn't work with --work-tree","fromName":"Blixt","fromEmail":"me@blixt.nyc","sentAt":"2019-01-25T14:05:18Z","receivedAt":"2019-01-25T14:05:33Z","isPatch":false,"sender":{"key":"me@blixt.nyc","avatar":null},"body":"In a script of mine I want to describe HEAD without changing the\ncurrent directory, so I specify --git-dir and --work-tree. But it\nappears the --dirty check doesn't consider the --work-tree value.\n\nHere's a simplified example (on macOS 10.14.1):\n\n$ git version\ngit version 2.20.1\n$ mkdir test\n$ cd test\n$ git init\nInitialized empty Git repository in /Users/example/test/.git/\n$ touch test\n$ git add test\n$ git commit -m \"initial commit\"\n[master (root-commit) 9fc4511] initial commit\n 1 file changed, 0 insertions(+), 0 deletions(-)\n create mode 100644 test\n$ git describe --all --dirty\nheads/master\n$ cd ..\n$ git --git-dir test/.git --work-tree test describe --all --dirty\nheads/master-dirty\n"}]}