From 1f26ce615ab4b74cdd018e5d543138c2d188c3d8 Mon Sep 17 00:00:00 2001 From: Charles Bailey Date: Sat, 29 Mar 2014 15:39:00 +0000 Subject: [PATCH 1/2] dir.c: make git_fnmatch() not inline Now that it calls a static inline function, it cannot be an inline definition with external linkage. Remove inline and make it an external definition. Signed-off-by: Charles Bailey Signed-off-by: Junio C Hamano --- dir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dir.c b/dir.c index b35b6330f8..a1740a51c9 100644 --- a/dir.c +++ b/dir.c @@ -52,9 +52,9 @@ int fnmatch_icase(const char *pattern, const char *string, int flags) return fnmatch(pattern, string, flags | (ignore_case ? FNM_CASEFOLD : 0)); } -inline int git_fnmatch(const struct pathspec_item *item, - const char *pattern, const char *string, - int prefix) +int git_fnmatch(const struct pathspec_item *item, + const char *pattern, const char *string, + int prefix) { if (prefix > 0) { if (ps_strncmp(item, pattern, string, prefix)) From 11b53902513c6d59f59594845ce53fe761f0894c Mon Sep 17 00:00:00 2001 From: Charles Bailey Date: Sat, 29 Mar 2014 15:39:01 +0000 Subject: [PATCH 2/2] tests: don't rely on strerror text when testing rmdir failure AIX doesn't make a distiction between EEXIST and ENOTEMPTY; relying on the strerror string for the rmdir failure is fragile. Just test that the start of the string matches the Git controlled "failed to rmdir..." error. The exact text of the OS generated error string isn't important to the test. Signed-off-by: Charles Bailey Signed-off-by: Junio C Hamano --- t/t3600-rm.sh | 3 +-- t/t7001-mv.sh | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh index 3d305814b9..e00d7d2b61 100755 --- a/t/t3600-rm.sh +++ b/t/t3600-rm.sh @@ -711,8 +711,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual git submodule update && git checkout -q HEAD^ 2>actual && git checkout -q master 2>actual && - echo "warning: unable to rmdir submod: Directory not empty" >expected && - test_i18ncmp expected actual && + test_i18ngrep "^warning: unable to rmdir submod:" actual && git status -s submod >actual && echo "?? submod/" >expected && test_cmp expected actual && diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index e3c8c2c1b8..e3290aafe7 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -446,8 +446,7 @@ test_expect_success 'checking out a commit before submodule moved needs manual u git mv sub sub2 && git commit -m "moved sub to sub2" && git checkout -q HEAD^ 2>actual && - echo "warning: unable to rmdir sub2: Directory not empty" >expected && - test_i18ncmp expected actual && + test_i18ngrep "^warning: unable to rmdir sub2:" actual && git status -s sub2 >actual && echo "?? sub2/" >expected && test_cmp expected actual &&