about summary refs log tree commit diff
path: root/ChangeLog
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-02-16 20:54:12 +0000
committerDaniel Shahaf <danielsh@apache.org>2020-02-17 10:03:08 +0000
commit51260963703bbc91944434648ae71a05addbcb05 (patch)
tree7005f997f133449bdeb5465ff93ca55aef664531 /ChangeLog
parentbacad965238158b9ae6ff438ba923725ec128020 (diff)
downloadzsh-51260963703bbc91944434648ae71a05addbcb05.tar.gz
zsh-51260963703bbc91944434648ae71a05addbcb05.tar.xz
zsh-51260963703bbc91944434648ae71a05addbcb05.zip
github #48/0002: vcs_info git: properly detect bare repositories
We currently detect Git repositories by finding the top level of the
working tree, and if we fail to detect it, assume that we're not in a
repository.  However, there's a case we don't consider: a bare
repository.

Let's detect if the user is in a bare repository by checking if gitdir
is set, and if so, using that if there is no working tree.  We now
detect bare Git repositories with vcs_info, as expected.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog4
1 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 75751a547..290f1c6af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-02-17  brian m. carlson  <sandals@crustytoothpaste.net>
 
+	* github #48/0002:
+	Functions/VCS_Info/Backends/VCS_INFO_get_data_git: vcs_info git:
+	properly detect bare repositories
+
 	* github #48/0001:
 	Functions/VCS_Info/Backends/VCS_INFO_get_data_git: vcs_info git:
 	avoid warnings in bare repositories