]> git.madduck.net Git - etc/zsh.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

fix branch detection in fake bare git repos
authormartin f. krafft <madduck@madduck.net>
Fri, 5 Feb 2010 01:48:22 +0000 (02:48 +0100)
committermartin f. krafft <madduck@madduck.net>
Fri, 5 Feb 2010 01:48:37 +0000 (02:48 +0100)
.zsh/zshrc/60_vcsprompt

index d12f686c2531f618d46ce8bfd88493b5ad902ea9..dd8335a2fbf1528cb37e87a416bbd44cc25101a0 100644 (file)
@@ -27,8 +27,8 @@ __git_get_branch()
 {
   # return the name of the git branch we're on
   local ref
 {
   # return the name of the git branch we're on
   local ref
-  ref=$(git symbolic-ref -q HEAD 2>/dev/null \
-     || git-name-rev --name-only HEAD 2>/dev/null) || return 1
+  ref=$(git --git-dir="$PWD" symbolic-ref -q HEAD 2>/dev/null \
+     || git --git-dir="$PWD" name-rev --name-only HEAD 2>/dev/null) || return 1
   echo "${ref#refs/heads/}"
 }
 
   echo "${ref#refs/heads/}"
 }