From ab22707f0a9480b2fe47d20030a03994f8e5d0b3 Mon Sep 17 00:00:00 2001 From: "tony.luck@intel.com" Date: Tue, 23 Aug 2005 14:03:14 -0700 Subject: [PATCH 1/2] [PATCH] Fix git-checkout-script exit status Sometimes the git-read-tree in git-checkout-script fails for me. Make sure that the failed status is passed up to caller. Signed-off-by: Tony Luck Signed-off-by: Junio C Hamano --- git-checkout-script | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-checkout-script b/git-checkout-script index a37740713e..9feff149ac 100755 --- a/git-checkout-script +++ b/git-checkout-script @@ -72,4 +72,6 @@ if [ "$?" -eq 0 ]; then fi [ "$branch" ] && ln -sf "refs/heads/$branch" "$GIT_DIR/HEAD" rm -f "$GIT_DIR/MERGE_HEAD" +else + exit 1 fi From 569061432e3a695d5a4178d515971ddcc0a80709 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 23 Aug 2005 17:14:13 -0700 Subject: [PATCH 2/2] [PATCH] Fix silly pathspec bug in git-ls-files The "verify_pathspec()" function doesn't test for ending NUL character in the pathspec, causing some really funky and unexpected behaviour. It just happened to work in the cases I had tested. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- ls-files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ls-files.c b/ls-files.c index 2c7aada88c..e53d245884 100644 --- a/ls-files.c +++ b/ls-files.c @@ -496,7 +496,7 @@ static void verify_pathspec(void) char c = n[i]; if (prev && prev[i] != c) break; - if (c == '*' || c == '?') + if (!c || c == '*' || c == '?') break; if (c == '/') len = i+1;