summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ymir.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/ymir.nix b/ymir.nix
index 84e71119..5d77ecef 100644
--- a/ymir.nix
+++ b/ymir.nix
@@ -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} ''${@}