When the working directory is a foreign git repository (other than
grml-debootstrap.git), and grml-debootstrap is invoked with the full
path pointing towards grml-debootstrap.git, then we're relying on `git
describe` output of the other (foreign) repository, which is failing and
reporting an unknown version.
Demonstration:
| % cd "$(mktemp -d)"
| % git init
| Initialized empty Git repository in /tmp/tmp.2TQO7PZPQX/.git/
| % ~/src/grml/grml-debootstrap/grml-debootstrap --version
| fatal: No names found, cannot describe anything.
| * grml-debootstrap - version unknown
| * Report bugs via https://github.com/grml/grml-debootstrap/ or https://grml.org/bugs/
... and also:
| % cd "$(mktemp -d)"
| % git init
| Initialized empty Git repository in /tmp/tmp.Y15j7wMMOn/.git/
| % echo foo > foo
| % git add foo ; git commit -m 'foo'
| [main (root-commit) 5d4357c] foo
| 1 file changed, 1 insertion(+)
| create mode 100644 foo
| % git tag 0.42
| % ~/src/grml/grml-debootstrap/grml-debootstrap --version
| fatal: No annotated tags can describe '
5d4357c0b5bb504e610265904619287be2c6718d'.
| However, there were unannotated tags: try --tags.
| * grml-debootstrap - version unknown
| * Report bugs via https://github.com/grml/grml-debootstrap/ or https://grml.org/bugs/
Thanks: Paul Menzel for the bugreport
Closes: grml/grml-debootstrap#183