diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-11-15 09:49:49 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-11-15 09:49:49 +0100 |
commit | 730baaa4fed5a013ed0744137389cfeaa643886e (patch) | |
tree | 788a026a5cc04fde045232939073c0af3cd27beb | |
parent | fdcc0dbadadddddaaf2bf6b63f706dd2b6d95db3 (diff) | |
download | nixos-730baaa4fed5a013ed0744137389cfeaa643886e.tar nixos-730baaa4fed5a013ed0744137389cfeaa643886e.tar.gz nixos-730baaa4fed5a013ed0744137389cfeaa643886e.tar.bz2 nixos-730baaa4fed5a013ed0744137389cfeaa643886e.tar.xz nixos-730baaa4fed5a013ed0744137389cfeaa643886e.zip |
(Hopefully) better check for inifinoted git sync
-rw-r--r-- | ymir.nix | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -896,8 +896,10 @@ in rec { | |||
896 | hook=${pkgs.writeScript "git-sync.sh" '' | 896 | hook=${pkgs.writeScript "git-sync.sh" '' |
897 | #!${pkgs.zsh}/bin/zsh | 897 | #!${pkgs.zsh}/bin/zsh |
898 | 898 | ||
899 | git -C ''${2:h} rev-parse --is-inside-work-tree || exit 0 | ||
900 | |||
899 | repository=$(git -C ''${2:h} rev-parse --show-toplevel) | 901 | repository=$(git -C ''${2:h} rev-parse --show-toplevel) |
900 | [[ $? -eq 0 ]] || exit 0 | 902 | [[ $? -ne 0 ]] && exit $? |
901 | 903 | ||
902 | git() { | 904 | git() { |
903 | $(whence -cp git) -C ''${repository} ''${@} | 905 | $(whence -cp git) -C ''${repository} ''${@} |