aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-07-16 11:10:30 -0700
committerJunio C Hamano <gitster@pobox.com>2014-07-16 11:10:30 -0700
commitd22acacf810a92d5634099a7db0367ce5b6fdcef (patch)
tree9536fe05bcb4067f19cd8020bc5bc04c468df7b7 /builtin
parent34d5217584ee4722d0c0b07ed6c8f1f01ad157c3 (diff)
parent8c2cfa55446f542454eb4acc7f49d1747e425c94 (diff)
downloadgit-d22acacf810a92d5634099a7db0367ce5b6fdcef.tar.gz
git-d22acacf810a92d5634099a7db0367ce5b6fdcef.tar.xz
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
Diffstat (limited to 'builtin')
-rw-r--r--builtin/annotate.c12
-rw-r--r--builtin/clean.c2
2 files changed, 6 insertions, 8 deletions
diff --git a/builtin/annotate.c b/builtin/annotate.c
index fc43eed36..da413ae0d 100644
--- a/builtin/annotate.c
+++ b/builtin/annotate.c
@@ -5,20 +5,18 @@
*/
#include "git-compat-util.h"
#include "builtin.h"
+#include "argv-array.h"
int cmd_annotate(int argc, const char **argv, const char *prefix)
{
- const char **nargv;
+ struct argv_array args = ARGV_ARRAY_INIT;
int i;
- nargv = xmalloc(sizeof(char *) * (argc + 2));
- nargv[0] = "annotate";
- nargv[1] = "-c";
+ argv_array_pushl(&args, "annotate", "-c", NULL);
for (i = 1; i < argc; i++) {
- nargv[i+1] = argv[i];
+ argv_array_push(&args, argv[i]);
}
- nargv[argc + 1] = NULL;
- return cmd_blame(argc + 1, nargv, prefix);
+ return cmd_blame(args.argc, args.argv, prefix);
}
diff --git a/builtin/clean.c b/builtin/clean.c
index 977a068f1..8926ca851 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