From 4bd0843d68070941214d4cd9a054562df44e0e24 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 22 Jun 2017 14:56:27 -0700 Subject: [PATCH] hooks/pre-commit: stop using cat_file -i Just use git cat-file :0:.topdeps directly as it's much more efficient and there's no good reason to incur the extra overhead for a call that will end up doing exactly the same thing in the end. Signed-off-by: Kyle J. McKay --- hooks/pre-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/pre-commit.sh b/hooks/pre-commit.sh index 75f2539..2449559 100644 --- a/hooks/pre-commit.sh +++ b/hooks/pre-commit.sh @@ -164,7 +164,7 @@ check_topdeps() # check for repetitions of deps depdir="$(get_temp tg-depdir -d)" || die "cannot check for multiple occurrences of dependents" - cat_file "$head_:.topdeps" -i | + git cat-file blob ":0:.topdeps" 2>/dev/null | while read -r dep || [ -n "$dep" ]; do [ ! -d "$depdir/$dep" ] || die "multiple occurrences of the same dependent: $dep" -- 2.11.4.GIT