RE: Inconsistent results from git rev-parse --show-toplevel
- From
- Crabtree, Andrew <andrew.crabtree@hpe.com>
- Date
- Jan 25, 2020, 19:31 UTC
- Message-ID
- <TU4PR8401MB1117B81EB9240905AA36B1E9F9090@TU4PR8401MB1117.NAMPRD84.PROD.OUTLOOK.COM>
- In-Reply-To
- <xmqqftg4zkvo.fsf@gitster-ct.c.googlers.com>
> From: Junio C Hamano [mailto:gitster@pobox.com] > Because you do not know where the top level is (otherwise you would not be asking "rev-parse --show-toplevel" about it), either is an option for you, > but you can "unset GIT_DIR" to stop telling Git that it should not perform the repository discovery.
Gotcha, thanks. Would it make sense to have 'git rev-parse --show-toplevel' error out if GIT_DIR is set? Or update the rev-parse documentation with a warning about GIT_DIR?
Regards, -Andrew