Skip to content

Commit d22acac

Browse files
committed
Merge branch 'maint-1.8.5' into maint-1.9
* maint-1.8.5: annotate: use argv_array t7300: repair filesystem permissions with test_when_finished enums: remove trailing ',' after last item in enum
2 parents 34d5217 + 8c2cfa5 commit d22acac

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

builtin/annotate.c

+5-7
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,18 @@
55
*/
66
#include "git-compat-util.h"
77
#include "builtin.h"
8+
#include "argv-array.h"
89

910
int cmd_annotate(int argc, const char **argv, const char *prefix)
1011
{
11-
const char **nargv;
12+
struct argv_array args = ARGV_ARRAY_INIT;
1213
int i;
13-
nargv = xmalloc(sizeof(char *) * (argc + 2));
1414

15-
nargv[0] = "annotate";
16-
nargv[1] = "-c";
15+
argv_array_pushl(&args, "annotate", "-c", NULL);
1716

1817
for (i = 1; i < argc; i++) {
19-
nargv[i+1] = argv[i];
18+
argv_array_push(&args, argv[i]);
2019
}
21-
nargv[argc + 1] = NULL;
2220

23-
return cmd_blame(argc + 1, nargv, prefix);
21+
return cmd_blame(args.argc, args.argv, prefix);
2422
}

builtin/clean.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ enum color_clean {
4848
CLEAN_COLOR_PROMPT = 2,
4949
CLEAN_COLOR_HEADER = 3,
5050
CLEAN_COLOR_HELP = 4,
51-
CLEAN_COLOR_ERROR = 5,
51+
CLEAN_COLOR_ERROR = 5
5252
};
5353

5454
#define MENU_OPTS_SINGLETON 01

pretty.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static void add_rfc822_quoted(struct strbuf *out, const char *s, int len)
274274

275275
enum rfc2047_type {
276276
RFC2047_SUBJECT,
277-
RFC2047_ADDRESS,
277+
RFC2047_ADDRESS
278278
};
279279

280280
static int is_rfc2047_special(char ch, enum rfc2047_type type)

t/t7300-clean.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,10 @@ test_expect_success SANITY 'removal failure' '
426426
427427
mkdir foo &&
428428
touch foo/bar &&
429+
test_when_finished "chmod 755 foo" &&
429430
(exec <foo/bar &&
430431
chmod 0 foo &&
431-
test_must_fail git clean -f -d &&
432-
chmod 755 foo)
432+
test_must_fail git clean -f -d)
433433
'
434434

435435
test_expect_success 'nested git work tree' '

0 commit comments

Comments
 (0)