Why is `git describe -dirty` adding a `-dirty` suffix when describing a clean checkout?

前端 未结 3 514
陌清茗
陌清茗 2021-02-09 01:44

I have just discovered the --dirty option to git describe and it looks like it should do something very useful, i.e. append a suffix to the output of <

3条回答
  •  梦如初夏
    2021-02-09 02:15

    Beware that there was another bug fix regarding git describe --dirty, about a year ago: https://github.com/git/git/commit/a1e19004e11dcbc0ceebd92c425ceb1770e52d0b

    "git --work-tree=$there --git-dir=$here describe --dirty" did not work correctly as it did not pay attention to the location of the worktree specified by the user

    In case of this bug, the workarounds shown here didn't work, so we had to upgrade our installation. There seems to be no fix readily available for Debian buster as of today (2020-02-20), yet the Debian bullseye main git packages are compatible with buster right now.

提交回复
热议问题