author | Junio C Hamano <gitster@pobox.com> | |
Wed, 26 Oct 2011 23:13:31 +0000 (16:13 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 26 Oct 2011 23:13:31 +0000 (16:13 -0700) |
* jk/argv-array:
run_hook: use argv_array API
checkout: use argv_array API
bisect: use argv_array API
quote: provide sq_dequote_to_argv_array
refactor argv_array into generic code
quote.h: fix bogus comment
add sha1_array API docs
run_hook: use argv_array API
checkout: use argv_array API
bisect: use argv_array API
quote: provide sq_dequote_to_argv_array
refactor argv_array into generic code
quote.h: fix bogus comment
add sha1_array API docs
1 | 2 | |||
---|---|---|---|---|
Makefile | patch | | diff1 | | diff2 | | blob | history |
bisect.c | patch | | diff1 | | diff2 | | blob | history |
builtin/checkout.c | patch | | diff1 | | diff2 | | blob | history |
quote.c | patch | | diff1 | | diff2 | | blob | history |
run-command.c | patch | | diff1 | | diff2 | | blob | history |
submodule.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc Makefile
Simple merge
diff --cc bisect.c
index c7b7d7913dc444926b0260211e8bc3aa75eeffdb,ef92871e3cf8f29fa4c7f84702a4367610295cae..de05bf824620324e42b7a27571ecd3e763cf7e8f
+++ b/bisect.c
static const unsigned char *current_bad_sha1;
- struct argv_array {
- const char **argv;
- int argv_nr;
- int argv_alloc;
- };
-
static const char *argv_checkout[] = {"checkout", "-q", NULL, "--", NULL};
static const char *argv_show_branch[] = {"show-branch", NULL, NULL};
+static const char *argv_update_ref[] = {"update-ref", "--no-deref", "BISECT_HEAD", NULL, NULL};
/* bits #0-15 in revision.h */
diff --cc builtin/checkout.c
Simple merge
diff --cc quote.c
Simple merge
diff --cc run-command.c
Simple merge
diff --cc submodule.c
index 08756387e207700861cfa6dac039334ecd53c7a1,6306737eddd78e51848f0dccbf18efa0843d71b7..0b709bc2914335853e7525076f5e1d026d5dd779
--- 1/submodule.c
--- 2/submodule.c
+++ b/submodule.c
{
struct rev_info rev;
struct commit *commit;
- struct argv_array argv;
+ struct argv_array argv = ARGV_ARRAY_INIT;
+ /* No need to check if there are no submodules configured */
+ if (!config_name_for_path.nr)
+ return;
+
init_revisions(&rev, NULL);
- init_argv(&argv);
- push_argv(&argv, "--"); /* argv[0] program name */
+ argv_array_push(&argv, "--"); /* argv[0] program name */
sha1_array_for_each_unique(&ref_tips_after_fetch,
add_sha1_to_argv, &argv);
- push_argv(&argv, "--not");
+ argv_array_push(&argv, "--not");
sha1_array_for_each_unique(&ref_tips_before_fetch,
add_sha1_to_argv, &argv);
setup_revisions(argv.argc, argv.argv, &rev, NULL);