From 782735203c316041df120748e5e88c1787cdf4da Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 2 Jul 2014 11:24:05 -0700 Subject: enums: remove trailing ',' after last item in enum Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano diff --git a/builtin/clean.c b/builtin/clean.c index 615cd57..ceab182 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -48,7 +48,7 @@ enum color_clean { CLEAN_COLOR_PROMPT = 2, CLEAN_COLOR_HEADER = 3, CLEAN_COLOR_HELP = 4, - CLEAN_COLOR_ERROR = 5, + CLEAN_COLOR_ERROR = 5 }; #define MENU_OPTS_SINGLETON 01 diff --git a/pretty.c b/pretty.c index 962e82b..296cb56 100644 --- a/pretty.c +++ b/pretty.c @@ -274,7 +274,7 @@ static void add_rfc822_quoted(struct strbuf *out, const char *s, int len) enum rfc2047_type { RFC2047_SUBJECT, - RFC2047_ADDRESS, + RFC2047_ADDRESS }; static int is_rfc2047_special(char ch, enum rfc2047_type type) -- cgit v0.10.2-6-g49f6 From 45067fc973c31953ab283f77f0f91eba9a272624 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 2 Jul 2014 14:44:30 -0400 Subject: t7300: repair filesystem permissions with test_when_finished We create a directory that cannot be removed, confirm that it cannot be removed, and then fix it like: chmod 0 foo && test_must_fail git clean -d -f && chmod 755 foo If the middle step fails but leaves the directory (e.g., the bug is that clean does not notice the failure), this pollutes the test repo with an unremovable directory. Not only does this cause further tests to fail, but it means that "rm -rf" fails on the whole trash directory, and the user has to intervene manually to even re-run the test script. We can bump the "chmod 755" recovery to a test_when_finished block to be sure that it always runs. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh index 710be90..8dbe950 100755 --- a/t/t7300-clean.sh +++ b/t/t7300-clean.sh @@ -426,10 +426,10 @@ test_expect_success SANITY 'removal failure' ' mkdir foo && touch foo/bar && + test_when_finished "chmod 755 foo" && (exec