Browse Source

Merge branch 'ho/dashless' into maint

* ho/dashless:
  tests: use "git xyzzy" form (t7200 - t9001)
  tests: use "git xyzzy" form (t7000 - t7199)
  tests: use "git xyzzy" form (t3600 - t6999)
  tests: use "git xyzzy" form (t0000 - t3599)
  'git foo' program identifies itself without dash in die() messages
  Start conforming code to "git subcmd" style
maint
Junio C Hamano 17 years ago
parent
commit
36f44a0680
  1. 8
      builtin-apply.c
  2. 8
      builtin-archive.c
  3. 2
      builtin-blame.c
  4. 4
      builtin-bundle.c
  5. 4
      builtin-cat-file.c
  6. 2
      builtin-check-ref-format.c
  7. 6
      builtin-checkout-index.c
  8. 2
      builtin-commit-tree.c
  9. 2
      builtin-fetch-pack.c
  10. 2
      builtin-grep.c
  11. 6
      builtin-ls-files.c
  12. 4
      builtin-rm.c
  13. 6
      builtin-show-ref.c
  14. 4
      builtin-tar-tree.c
  15. 16
      builtin-update-index.c
  16. 4
      connect.c
  17. 20
      entry.c
  18. 6
      merge-index.c
  19. 2
      t/t0050-filesystem.sh
  20. 2
      t/t1007-hash-object.sh
  21. 2
      t/t1200-tutorial.sh
  22. 2
      t/t1303-wacky-config.sh
  23. 10
      t/t1400-update-ref.sh
  24. 2
      t/t1503-rev-parse-verify.sh
  25. 4
      t/t2005-checkout-index-symlinks.sh
  26. 4
      t/t2050-git-dir-relative.sh
  27. 2
      t/t2101-update-index-reupdate.sh
  28. 2
      t/t2102-update-index-symlinks.sh
  29. 12
      t/t2200-add-update.sh
  30. 2
      t/t3001-ls-files-others-exclude.sh
  31. 2
      t/t3020-ls-files-error-unmatch.sh
  32. 14
      t/t3030-merge-recursive.sh
  33. 58
      t/t3200-branch.sh
  34. 4
      t/t3210-pack-refs.sh
  35. 6
      t/t3400-rebase.sh
  36. 22
      t/t3401-rebase-partial.sh
  37. 2
      t/t3403-rebase-skip.sh
  38. 2
      t/t3404-rebase-interactive.sh
  39. 2
      t/t3407-rebase-abort.sh
  40. 12
      t/t3500-cherry.sh
  41. 4
      t/t3600-rm.sh
  42. 12
      t/t3800-mktag.sh
  43. 6
      t/t3900-i18n-commit.sh
  44. 16
      t/t3901-i18n-patch.sh
  45. 2
      t/t3903-stash.sh
  46. 4
      t/t4012-diff-binary.sh
  47. 26
      t/t4103-apply-binary.sh
  48. 2
      t/t4124-apply-ws-rule.sh
  49. 4
      t/t4127-apply-same-fn.sh
  50. 2
      t/t4150-am.sh
  51. 4
      t/t4151-am-abort.sh
  52. 16
      t/t5300-pack-object.sh
  53. 4
      t/t5301-sliding-window.sh
  54. 12
      t/t5302-pack-index.sh
  55. 2
      t/t5305-include-tag.sh
  56. 30
      t/t5400-send-pack.sh
  57. 4
      t/t5401-update-hooks.sh
  58. 4
      t/t5402-post-merge-hook.sh
  59. 4
      t/t5403-post-checkout-hook.sh
  60. 4
      t/t5500-fetch-pack.sh
  61. 2
      t/t5510-fetch.sh
  62. 4
      t/t5530-upload-pack-error.sh
  63. 12
      t/t5600-clone-fail-cleanup.sh
  64. 4
      t/t5602-clone-remote-exec.sh
  65. 6
      t/t6006-rev-list-format.sh
  66. 32
      t/t6025-merge-symlinks.sh
  67. 12
      t/t6026-merge-attr.sh
  68. 4
      t/t6030-bisect-porcelain.sh
  69. 30
      t/t6120-describe.sh
  70. 28
      t/t6300-for-each-ref.sh
  71. 12
      t/t7001-mv.sh
  72. 22
      t/t7003-filter-branch.sh
  73. 318
      t/t7004-tag.sh
  74. 8
      t/t7101-reset.sh
  75. 4
      t/t7102-reset.sh
  76. 2
      t/t7103-reset-bare.sh
  77. 2
      t/t7201-co.sh
  78. 72
      t/t7300-clean.sh
  79. 48
      t/t7400-submodule-basic.sh
  80. 2
      t/t7401-submodule-summary.sh
  81. 2
      t/t7500-commit.sh
  82. 48
      t/t7501-commit.sh
  83. 2
      t/t7502-status.sh
  84. 2
      t/t7505-prepare-commit-msg-hook.sh
  85. 2
      t/t7506-status-submodule.sh
  86. 2
      t/t7600-merge.sh
  87. 2
      t/t7601-merge-pull-config.sh
  88. 2
      t/t7602-merge-octopus-many.sh
  89. 2
      t/t7603-merge-reduce-heads.sh
  90. 2
      t/t7604-merge-custom-message.sh
  91. 2
      t/t7605-merge-resolve.sh
  92. 2
      t/t7610-mergetool.sh
  93. 2
      t/t7701-repack-unpack-unreachable.sh
  94. 2
      t/t9001-send-email.sh
  95. 2
      tree-diff.c
  96. 18
      upload-pack.c

8
builtin-apply.c

@ -274,7 +274,7 @@ static void say_patch_name(FILE *output, const char *pre, @@ -274,7 +274,7 @@ static void say_patch_name(FILE *output, const char *pre,
static void read_patch_file(struct strbuf *sb, int fd)
{
if (strbuf_read(sb, fd, 0) < 0)
die("git-apply: read returned %s", strerror(errno));
die("git apply: read returned %s", strerror(errno));

/*
* Make sure that we have some slop in the buffer
@ -506,17 +506,17 @@ static char *gitdiff_verify_name(const char *line, int isnull, char *orig_name, @@ -506,17 +506,17 @@ static char *gitdiff_verify_name(const char *line, int isnull, char *orig_name,
name = orig_name;
len = strlen(name);
if (isnull)
die("git-apply: bad git-diff - expected /dev/null, got %s on line %d", name, linenr);
die("git apply: bad git-diff - expected /dev/null, got %s on line %d", name, linenr);
another = find_name(line, NULL, p_value, TERM_TAB);
if (!another || memcmp(another, name, len))
die("git-apply: bad git-diff - inconsistent %s filename on line %d", oldnew, linenr);
die("git apply: bad git-diff - inconsistent %s filename on line %d", oldnew, linenr);
free(another);
return orig_name;
}
else {
/* expect "/dev/null" */
if (memcmp("/dev/null", line, 9) || line[9] != '\n')
die("git-apply: bad git-diff - expected /dev/null on line %d", linenr);
die("git apply: bad git-diff - expected /dev/null on line %d", linenr);
return NULL;
}
}

8
builtin-archive.c

@ -47,18 +47,18 @@ static int run_remote_archiver(const char *remote, int argc, @@ -47,18 +47,18 @@ static int run_remote_archiver(const char *remote, int argc,

len = packet_read_line(fd[0], buf, sizeof(buf));
if (!len)
die("git-archive: expected ACK/NAK, got EOF");
die("git archive: expected ACK/NAK, got EOF");
if (buf[len-1] == '\n')
buf[--len] = 0;
if (strcmp(buf, "ACK")) {
if (len > 5 && !prefixcmp(buf, "NACK "))
die("git-archive: NACK %s", buf + 5);
die("git-archive: protocol error");
die("git archive: NACK %s", buf + 5);
die("git archive: protocol error");
}

len = packet_read_line(fd[0], buf, sizeof(buf));
if (len)
die("git-archive: expected a flush");
die("git archive: expected a flush");

/* Now, start reading from fd[0] and spit it out to stdout */
rv = recv_sideband("archive", fd[0], 1, 2);

2
builtin-blame.c

@ -1791,7 +1791,7 @@ static int prepare_lines(struct scoreboard *sb) @@ -1791,7 +1791,7 @@ static int prepare_lines(struct scoreboard *sb)

/*
* Add phony grafts for use with -S; this is primarily to
* support git-cvsserver that wants to give a linear history
* support git's cvsserver that wants to give a linear history
* to its clients.
*/
static int read_ancestry(const char *graft_file)

4
builtin-bundle.c

@ -6,10 +6,10 @@ @@ -6,10 +6,10 @@
* Basic handler for bundle files to connect repositories via sneakernet.
* Invocation must include action.
* This function can create a bundle or provide information on an existing
* bundle supporting git-fetch, git-pull, and git-ls-remote
* bundle supporting "fetch", "pull", and "ls-remote".
*/

static const char *bundle_usage="git-bundle (create <bundle> <git-rev-list args> | verify <bundle> | list-heads <bundle> [refname]... | unbundle <bundle> [refname]... )";
static const char *bundle_usage="git bundle (create <bundle> <git rev-list args> | verify <bundle> | list-heads <bundle> [refname]... | unbundle <bundle> [refname]... )";

int cmd_bundle(int argc, const char **argv, const char *prefix)
{

4
builtin-cat-file.c

@ -137,11 +137,11 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name) @@ -137,11 +137,11 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
break;

default:
die("git-cat-file: unknown option: %s\n", exp_type);
die("git cat-file: unknown option: %s\n", exp_type);
}

if (!buf)
die("git-cat-file %s: bad file", obj_name);
die("git cat-file %s: bad file", obj_name);

write_or_die(1, buf, size);
return 0;

2
builtin-check-ref-format.c

@ -9,6 +9,6 @@ @@ -9,6 +9,6 @@
int cmd_check_ref_format(int argc, const char **argv, const char *prefix)
{
if (argc != 2)
usage("git-check-ref-format refname");
usage("git check-ref-format refname");
return !!check_ref_format(argv[1]);
}

6
builtin-checkout-index.c

@ -258,9 +258,9 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix) @@ -258,9 +258,9 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
const char *p;

if (all)
die("git-checkout-index: don't mix '--all' and explicit filenames");
die("git checkout-index: don't mix '--all' and explicit filenames");
if (read_from_stdin)
die("git-checkout-index: don't mix '--stdin' and explicit filenames");
die("git checkout-index: don't mix '--stdin' and explicit filenames");
p = prefix_path(prefix, prefix_length, arg);
checkout_file(p, prefix_length);
if (p < arg || p > arg + strlen(arg))
@ -271,7 +271,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix) @@ -271,7 +271,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
struct strbuf buf, nbuf;

if (all)
die("git-checkout-index: don't mix '--all' and '--stdin'");
die("git checkout-index: don't mix '--all' and '--stdin'");

strbuf_init(&buf, 0);
strbuf_init(&nbuf, 0);

2
builtin-commit-tree.c

@ -118,7 +118,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix) @@ -118,7 +118,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
}

if (strbuf_read(&buffer, 0, 0) < 0)
die("git-commit-tree: read returned %s", strerror(errno));
die("git commit-tree: read returned %s", strerror(errno));

if (!commit_tree(buffer.buf, tree_sha1, parents, commit_sha1)) {
printf("%s\n", sha1_to_hex(commit_sha1));

2
builtin-fetch-pack.c

@ -609,7 +609,7 @@ static struct ref *do_fetch_pack(int fd[2], @@ -609,7 +609,7 @@ static struct ref *do_fetch_pack(int fd[2],
fprintf(stderr, "warning: no common commits\n");

if (get_pack(fd, pack_lockfile))
die("git-fetch-pack: fetch failed.");
die("git fetch-pack: fetch failed.");

all_done:
return ref;

2
builtin-grep.c

@ -774,7 +774,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix) @@ -774,7 +774,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
/* Make sure we do not get outside of paths */
for (i = 0; paths[i]; i++)
if (strncmp(prefix, paths[i], opt.prefix_length))
die("git-grep: cannot generate relative filenames containing '..'");
die("git grep: cannot generate relative filenames containing '..'");
}
}
else if (prefix) {

6
builtin-ls-files.c

@ -78,7 +78,7 @@ static void show_dir_entry(const char *tag, struct dir_entry *ent) @@ -78,7 +78,7 @@ static void show_dir_entry(const char *tag, struct dir_entry *ent)
int offset = prefix_offset;

if (len >= ent->len)
die("git-ls-files: internal error - directory entry not superset of prefix");
die("git ls-files: internal error - directory entry not superset of prefix");

if (pathspec && !pathspec_match(pathspec, ps_matched, ent->name, len))
return;
@ -183,7 +183,7 @@ static void show_ce_entry(const char *tag, struct cache_entry *ce) @@ -183,7 +183,7 @@ static void show_ce_entry(const char *tag, struct cache_entry *ce)
int offset = prefix_offset;

if (len >= ce_namelen(ce))
die("git-ls-files: internal error - cache entry not superset of prefix");
die("git ls-files: internal error - cache entry not superset of prefix");

if (pathspec && !pathspec_match(pathspec, ps_matched, ce->name, len))
return;
@ -319,7 +319,7 @@ static const char *verify_pathspec(const char *prefix) @@ -319,7 +319,7 @@ static const char *verify_pathspec(const char *prefix)
}

if (prefix_offset > max || memcmp(prev, prefix, prefix_offset))
die("git-ls-files: cannot generate relative filenames containing '..'");
die("git ls-files: cannot generate relative filenames containing '..'");

prefix_len = max;
return max ? xmemdupz(prev, max) : NULL;

4
builtin-rm.c

@ -221,7 +221,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) @@ -221,7 +221,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
printf("rm '%s'\n", path);

if (remove_file_from_cache(path))
die("git-rm: unable to remove %s", path);
die("git rm: unable to remove %s", path);
}

if (show_only)
@ -244,7 +244,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) @@ -244,7 +244,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
continue;
}
if (!removed)
die("git-rm: %s: %s", path, strerror(errno));
die("git rm: %s: %s", path, strerror(errno));
}
}


6
builtin-show-ref.c

@ -62,7 +62,7 @@ match: @@ -62,7 +62,7 @@ match:
* ref points at a nonexistent object.
*/
if (!has_sha1_file(sha1))
die("git-show-ref: bad ref %s (%s)", refname,
die("git show-ref: bad ref %s (%s)", refname,
sha1_to_hex(sha1));

if (quiet)
@ -82,12 +82,12 @@ match: @@ -82,12 +82,12 @@ match:
else {
obj = parse_object(sha1);
if (!obj)
die("git-show-ref: bad ref %s (%s)", refname,
die("git show-ref: bad ref %s (%s)", refname,
sha1_to_hex(sha1));
if (obj->type == OBJ_TAG) {
obj = deref_tag(obj, refname, 0);
if (!obj)
die("git-show-ref: bad tag at ref %s (%s)", refname,
die("git show-ref: bad tag at ref %s (%s)", refname,
sha1_to_hex(sha1));
hex = find_unique_abbrev(obj->sha1, abbrev);
printf("%s %s^{}\n", hex, refname);

4
builtin-tar-tree.c

@ -76,7 +76,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix) @@ -76,7 +76,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)

n = read_in_full(0, buffer, HEADERSIZE);
if (n < HEADERSIZE)
die("git-get-tar-commit-id: read error");
die("git get-tar-commit-id: read error");
if (header->typeflag[0] != 'g')
return 1;
if (memcmp(content, "52 comment=", 11))
@ -84,7 +84,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix) @@ -84,7 +84,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)

n = write_in_full(1, content + 11, 41);
if (n < 41)
die("git-get-tar-commit-id: write error");
die("git get-tar-commit-id: write error");

return 0;
}

16
builtin-update-index.c

@ -262,7 +262,7 @@ static void chmod_path(int flip, const char *path) @@ -262,7 +262,7 @@ static void chmod_path(int flip, const char *path)
report("chmod %cx '%s'", flip, path);
return;
fail:
die("git-update-index: cannot chmod %cx '%s'", flip, path);
die("git update-index: cannot chmod %cx '%s'", flip, path);
}

static void update_one(const char *path, const char *prefix, int prefix_length)
@ -280,7 +280,7 @@ static void update_one(const char *path, const char *prefix, int prefix_length) @@ -280,7 +280,7 @@ static void update_one(const char *path, const char *prefix, int prefix_length)

if (force_remove) {
if (remove_file_from_cache(p))
die("git-update-index: unable to remove %s", path);
die("git update-index: unable to remove %s", path);
report("remove '%s'", path);
goto free_return;
}
@ -351,7 +351,7 @@ static void read_index_info(int line_termination) @@ -351,7 +351,7 @@ static void read_index_info(int line_termination)
if (line_termination && path_name[0] == '"') {
strbuf_reset(&uq);
if (unquote_c_style(&uq, path_name, NULL)) {
die("git-update-index: bad quoting of path name");
die("git update-index: bad quoting of path name");
}
path_name = uq.buf;
}
@ -364,7 +364,7 @@ static void read_index_info(int line_termination) @@ -364,7 +364,7 @@ static void read_index_info(int line_termination)
if (!mode) {
/* mode == 0 means there is no such path -- remove */
if (remove_file_from_cache(path_name))
die("git-update-index: unable to remove %s",
die("git update-index: unable to remove %s",
ptr);
}
else {
@ -374,7 +374,7 @@ static void read_index_info(int line_termination) @@ -374,7 +374,7 @@ static void read_index_info(int line_termination)
*/
ptr[-42] = ptr[-1] = 0;
if (add_cacheinfo(mode, sha1, path_name, stage))
die("git-update-index: unable to update %s",
die("git update-index: unable to update %s",
path_name);
}
continue;
@ -626,12 +626,12 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) @@ -626,12 +626,12 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
unsigned int mode;

if (i+3 >= argc)
die("git-update-index: --cacheinfo <mode> <sha1> <path>");
die("git update-index: --cacheinfo <mode> <sha1> <path>");

if (strtoul_ui(argv[i+1], 8, &mode) ||
get_sha1_hex(argv[i+2], sha1) ||
add_cacheinfo(mode, sha1, argv[i+3], 0))
die("git-update-index: --cacheinfo"
die("git update-index: --cacheinfo"
" cannot add %s", argv[i+3]);
i += 3;
continue;
@ -639,7 +639,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) @@ -639,7 +639,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
if (!strcmp(path, "--chmod=-x") ||
!strcmp(path, "--chmod=+x")) {
if (argc <= i+1)
die("git-update-index: %s <path>", path);
die("git update-index: %s <path>", path);
set_executable_bit = path[8];
continue;
}

4
connect.c

@ -97,7 +97,7 @@ int get_ack(int fd, unsigned char *result_sha1) @@ -97,7 +97,7 @@ int get_ack(int fd, unsigned char *result_sha1)
int len = packet_read_line(fd, line, sizeof(line));

if (!len)
die("git-fetch-pack: expected ACK/NAK, got EOF");
die("git fetch-pack: expected ACK/NAK, got EOF");
if (line[len-1] == '\n')
line[--len] = 0;
if (!strcmp(line, "NAK"))
@ -109,7 +109,7 @@ int get_ack(int fd, unsigned char *result_sha1) @@ -109,7 +109,7 @@ int get_ack(int fd, unsigned char *result_sha1)
return 1;
}
}
die("git-fetch_pack: expected ACK/NAK, got '%s'", line);
die("git fetch_pack: expected ACK/NAK, got '%s'", line);
}

int path_match(const char *path, int nr, char **match)

20
entry.c

@ -111,7 +111,7 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout @@ -111,7 +111,7 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout
case S_IFREG:
new = read_blob_entry(ce, path, &size);
if (!new)
return error("git-checkout-index: unable to read sha1 file of %s (%s)",
return error("git checkout-index: unable to read sha1 file of %s (%s)",
path, sha1_to_hex(ce->sha1));

/*
@ -132,7 +132,7 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout @@ -132,7 +132,7 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout
fd = create_file(path, ce->ce_mode);
if (fd < 0) {
free(new);
return error("git-checkout-index: unable to create file %s (%s)",
return error("git checkout-index: unable to create file %s (%s)",
path, strerror(errno));
}

@ -140,12 +140,12 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout @@ -140,12 +140,12 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout
close(fd);
free(new);
if (wrote != size)
return error("git-checkout-index: unable to write file %s", path);
return error("git checkout-index: unable to write file %s", path);
break;
case S_IFLNK:
new = read_blob_entry(ce, path, &size);
if (!new)
return error("git-checkout-index: unable to read sha1 file of %s (%s)",
return error("git checkout-index: unable to read sha1 file of %s (%s)",
path, sha1_to_hex(ce->sha1));
if (to_tempfile || !has_symlinks) {
if (to_tempfile) {
@ -155,31 +155,31 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout @@ -155,31 +155,31 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout
fd = create_file(path, 0666);
if (fd < 0) {
free(new);
return error("git-checkout-index: unable to create "
return error("git checkout-index: unable to create "
"file %s (%s)", path, strerror(errno));
}
wrote = write_in_full(fd, new, size);
close(fd);
free(new);
if (wrote != size)
return error("git-checkout-index: unable to write file %s",
return error("git checkout-index: unable to write file %s",
path);
} else {
wrote = symlink(new, path);
free(new);
if (wrote)
return error("git-checkout-index: unable to create "
return error("git checkout-index: unable to create "
"symlink %s (%s)", path, strerror(errno));
}
break;
case S_IFGITLINK:
if (to_tempfile)
return error("git-checkout-index: cannot create temporary subproject %s", path);
return error("git checkout-index: cannot create temporary subproject %s", path);
if (mkdir(path, 0777) < 0)
return error("git-checkout-index: cannot create subproject directory %s", path);
return error("git checkout-index: cannot create subproject directory %s", path);
break;
default:
return error("git-checkout-index: unknown file mode for %s", path);
return error("git checkout-index: unknown file mode for %s", path);
}

if (state->refresh_cache) {

6
merge-index.c

@ -27,7 +27,7 @@ static int merge_entry(int pos, const char *path) @@ -27,7 +27,7 @@ static int merge_entry(int pos, const char *path)
int found;

if (pos >= active_nr)
die("git-merge-index: %s not in the cache", path);
die("git merge-index: %s not in the cache", path);
arguments[0] = pgm;
arguments[1] = "";
arguments[2] = "";
@ -53,7 +53,7 @@ static int merge_entry(int pos, const char *path) @@ -53,7 +53,7 @@ static int merge_entry(int pos, const char *path)
arguments[stage + 4] = ownbuf[stage];
} while (++pos < active_nr);
if (!found)
die("git-merge-index: %s not in the cache", path);
die("git merge-index: %s not in the cache", path);
run_program();
return found;
}
@ -117,7 +117,7 @@ int main(int argc, char **argv) @@ -117,7 +117,7 @@ int main(int argc, char **argv)
merge_all();
continue;
}
die("git-merge-index: unknown option %s", arg);
die("git merge-index: unknown option %s", arg);
}
merge_file(arg);
}

2
t/t0050-filesystem.sh

@ -85,7 +85,7 @@ $test_case 'add (with different case)' ' @@ -85,7 +85,7 @@ $test_case 'add (with different case)' '
rm camelcase &&
echo 1 >CamelCase &&
git add CamelCase &&
test $(git-ls-files | grep -i camelcase | wc -l) = 1
test $(git ls-files | grep -i camelcase | wc -l) = 1

'


2
t/t1007-hash-object.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description="git-hash-object"
test_description="git hash-object"

. ./test-lib.sh


2
t/t1200-tutorial.sh

@ -78,7 +78,7 @@ test_expect_success 'git whatchanged -p --root' 'cmp whatchanged.expect whatchan @@ -78,7 +78,7 @@ test_expect_success 'git whatchanged -p --root' 'cmp whatchanged.expect whatchan
git tag my-first-tag
test_expect_success 'git tag my-first-tag' 'cmp .git/refs/heads/master .git/refs/tags/my-first-tag'

# TODO: test git-clone
# TODO: test git clone

git checkout -b mybranch
test_expect_success 'git checkout -b mybranch' 'cmp .git/refs/heads/master .git/refs/heads/mybranch'

2
t/t1303-wacky-config.sh

@ -35,7 +35,7 @@ test_expect_success 'add key in different section' ' @@ -35,7 +35,7 @@ test_expect_success 'add key in different section' '
'

SECTION="test.q\"s\\sq'sp e.key"
test_expect_success 'make sure git-config escapes section names properly' '
test_expect_success 'make sure git config escapes section names properly' '
git config "$SECTION" bar &&
check "$SECTION" bar
'

10
t/t1400-update-ref.sh

@ -228,21 +228,21 @@ test_expect_success \ @@ -228,21 +228,21 @@ test_expect_success \
'echo TEST >F &&
git add F &&
GIT_AUTHOR_DATE="2005-05-26 23:30" \
GIT_COMMITTER_DATE="2005-05-26 23:30" git-commit -m add -a &&
GIT_COMMITTER_DATE="2005-05-26 23:30" git commit -m add -a &&
h_TEST=$(git rev-parse --verify HEAD)
echo The other day this did not work. >M &&
echo And then Bob told me how to fix it. >>M &&
echo OTHER >F &&
GIT_AUTHOR_DATE="2005-05-26 23:41" \
GIT_COMMITTER_DATE="2005-05-26 23:41" git-commit -F M -a &&
GIT_COMMITTER_DATE="2005-05-26 23:41" git commit -F M -a &&
h_OTHER=$(git rev-parse --verify HEAD) &&
GIT_AUTHOR_DATE="2005-05-26 23:44" \
GIT_COMMITTER_DATE="2005-05-26 23:44" git-commit --amend &&
GIT_COMMITTER_DATE="2005-05-26 23:44" git commit --amend &&
h_FIXED=$(git rev-parse --verify HEAD) &&
echo Merged initial commit and a later commit. >M &&
echo $h_TEST >.git/MERGE_HEAD &&
GIT_AUTHOR_DATE="2005-05-26 23:45" \
GIT_COMMITTER_DATE="2005-05-26 23:45" git-commit -F M &&
GIT_COMMITTER_DATE="2005-05-26 23:45" git commit -F M &&
h_MERGED=$(git rev-parse --verify HEAD) &&
rm -f M'

@ -253,7 +253,7 @@ $h_OTHER $h_FIXED $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117151040 +0000 co @@ -253,7 +253,7 @@ $h_OTHER $h_FIXED $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117151040 +0000 co
$h_FIXED $h_MERGED $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117151100 +0000 commit (merge): Merged initial commit and a later commit.
EOF
test_expect_success \
'git-commit logged updates' \
'git commit logged updates' \
"diff expect .git/logs/$m"
unset h_TEST h_OTHER h_FIXED h_MERGED


2
t/t1503-rev-parse-verify.sh

@ -23,7 +23,7 @@ add_line_into_file() @@ -23,7 +23,7 @@ add_line_into_file()
fi

test_tick
git-commit --quiet -m "$MSG" $_file
git commit --quiet -m "$MSG" $_file
}

HASH1=

4
t/t2005-checkout-index-symlinks.sh

@ -13,7 +13,7 @@ file if core.symlinks is false.' @@ -13,7 +13,7 @@ file if core.symlinks is false.'
test_expect_success \
'preparation' '
git config core.symlinks false &&
l=$(echo -n file | git-hash-object -t blob -w --stdin) &&
l=$(echo -n file | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info'

test_expect_success \
@ -23,6 +23,6 @@ test -f symlink' @@ -23,6 +23,6 @@ test -f symlink'

test_expect_success \
'the file must be the blob we added during the setup' '
test "$(git-hash-object -t blob symlink)" = $l'
test "$(git hash-object -t blob symlink)" = $l'

test_done

4
t/t2050-git-dir-relative.sh

@ -26,8 +26,8 @@ chmod +x .git/hooks/post-commit' @@ -26,8 +26,8 @@ chmod +x .git/hooks/post-commit'

test_expect_success 'post-commit hook used ordinarily' '
echo initial >top &&
git-add top
git-commit -m initial &&
git add top
git commit -m initial &&
test -r "${COMMIT_FILE}"
'


2
t/t2101-update-index-reupdate.sh

@ -40,7 +40,7 @@ test_expect_success 'update-index --remove --again' \ @@ -40,7 +40,7 @@ test_expect_success 'update-index --remove --again' \
git ls-files -s >current &&
cmp current expected'

test_expect_success 'first commit' 'git-commit -m initial'
test_expect_success 'first commit' 'git commit -m initial'

cat > expected <<\EOF
100644 53ab446c3f4e42ce9bb728a0ccb283a101be4979 0 dir1/file3

2
t/t2102-update-index-symlinks.sh

@ -13,7 +13,7 @@ even if a plain file is in the working tree if core.symlinks is false.' @@ -13,7 +13,7 @@ even if a plain file is in the working tree if core.symlinks is false.'
test_expect_success \
'preparation' '
git config core.symlinks false &&
l=$(echo -n file | git-hash-object -t blob -w --stdin) &&
l=$(echo -n file | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info'

test_expect_success \

12
t/t2200-add-update.sh

@ -26,7 +26,7 @@ test_expect_success setup ' @@ -26,7 +26,7 @@ test_expect_success setup '
echo initial >dir2/sub3 &&
git add check dir1 dir2 top foo &&
test_tick
git-commit -m initial &&
git commit -m initial &&

echo changed >check &&
echo changed >top &&
@ -40,20 +40,20 @@ test_expect_success update ' @@ -40,20 +40,20 @@ test_expect_success update '
'

test_expect_success 'update noticed a removal' '
test "$(git-ls-files dir1/sub1)" = ""
test "$(git ls-files dir1/sub1)" = ""
'

test_expect_success 'update touched correct path' '
test "$(git-diff-files --name-status dir2/sub3)" = ""
test "$(git diff-files --name-status dir2/sub3)" = ""
'

test_expect_success 'update did not touch other tracked files' '
test "$(git-diff-files --name-status check)" = "M check" &&
test "$(git-diff-files --name-status top)" = "M top"
test "$(git diff-files --name-status check)" = "M check" &&
test "$(git diff-files --name-status top)" = "M top"
'

test_expect_success 'update did not touch untracked files' '
test "$(git-ls-files dir2/other)" = ""
test "$(git ls-files dir2/other)" = ""
'

test_expect_success 'cache tree has not been corrupted' '

2
t/t3001-ls-files-others-exclude.sh

@ -96,7 +96,7 @@ cat > expect << EOF @@ -96,7 +96,7 @@ cat > expect << EOF
# three/
EOF

test_expect_success 'git-status honours core.excludesfile' \
test_expect_success 'git status honors core.excludesfile' \
'test_cmp expect output'

test_expect_success 'trailing slash in exclude allows directory match(1)' '

2
t/t3020-ls-files-error-unmatch.sh

@ -13,7 +13,7 @@ line. @@ -13,7 +13,7 @@ line.

touch foo bar
git update-index --add foo bar
git-commit -m "add foo bar"
git commit -m "add foo bar"

test_expect_success \
'git ls-files --error-unmatch should fail with unmatched path.' \

14
t/t3030-merge-recursive.sh

@ -241,7 +241,7 @@ test_expect_success 'merge-recursive simple' ' @@ -241,7 +241,7 @@ test_expect_success 'merge-recursive simple' '
rm -fr [abcd] &&
git checkout -f "$c2" &&

git-merge-recursive "$c0" -- "$c2" "$c1"
git merge-recursive "$c0" -- "$c2" "$c1"
status=$?
case "$status" in
1)
@ -285,7 +285,7 @@ test_expect_success 'merge-recursive remove conflict' ' @@ -285,7 +285,7 @@ test_expect_success 'merge-recursive remove conflict' '
rm -fr [abcd] &&
git checkout -f "$c1" &&

git-merge-recursive "$c0" -- "$c1" "$c5"
git merge-recursive "$c0" -- "$c1" "$c5"
status=$?
case "$status" in
1)
@ -317,7 +317,7 @@ test_expect_success 'merge-recursive d/f simple' ' @@ -317,7 +317,7 @@ test_expect_success 'merge-recursive d/f simple' '
git reset --hard &&
git checkout -f "$c1" &&

git-merge-recursive "$c0" -- "$c1" "$c3"
git merge-recursive "$c0" -- "$c1" "$c3"
'

test_expect_success 'merge-recursive result' '
@ -339,7 +339,7 @@ test_expect_success 'merge-recursive d/f conflict' ' @@ -339,7 +339,7 @@ test_expect_success 'merge-recursive d/f conflict' '
git reset --hard &&
git checkout -f "$c1" &&

git-merge-recursive "$c0" -- "$c1" "$c4"
git merge-recursive "$c0" -- "$c1" "$c4"
status=$?
case "$status" in
1)
@ -373,7 +373,7 @@ test_expect_success 'merge-recursive d/f conflict the other way' ' @@ -373,7 +373,7 @@ test_expect_success 'merge-recursive d/f conflict the other way' '
git reset --hard &&
git checkout -f "$c4" &&

git-merge-recursive "$c0" -- "$c4" "$c1"
git merge-recursive "$c0" -- "$c4" "$c1"
status=$?
case "$status" in
1)
@ -407,7 +407,7 @@ test_expect_success 'merge-recursive d/f conflict' ' @@ -407,7 +407,7 @@ test_expect_success 'merge-recursive d/f conflict' '
git reset --hard &&
git checkout -f "$c1" &&

git-merge-recursive "$c0" -- "$c1" "$c6"
git merge-recursive "$c0" -- "$c1" "$c6"
status=$?
case "$status" in
1)
@ -441,7 +441,7 @@ test_expect_success 'merge-recursive d/f conflict' ' @@ -441,7 +441,7 @@ test_expect_success 'merge-recursive d/f conflict' '
git reset --hard &&
git checkout -f "$c6" &&

git-merge-recursive "$c0" -- "$c6" "$c1"
git merge-recursive "$c0" -- "$c6" "$c1"
status=$?
case "$status" in
1)

58
t/t3200-branch.sh

@ -14,10 +14,10 @@ test_expect_success \ @@ -14,10 +14,10 @@ test_expect_success \
'prepare a trivial repository' \
'echo Hello > A &&
git update-index --add A &&
git-commit -m "Initial commit." &&
git commit -m "Initial commit." &&
echo World >> A &&
git update-index --add A &&
git-commit -m "Second commit." &&
git commit -m "Second commit." &&
HEAD=$(git rev-parse --verify HEAD)'

test_expect_success \
@ -123,7 +123,7 @@ test_expect_success \ @@ -123,7 +123,7 @@ test_expect_success \
test_expect_success 'test tracking setup via --track' \
'git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track my1 local/master &&
test $(git config branch.my1.remote) = local &&
test $(git config branch.my1.merge) = refs/heads/master'
@ -131,7 +131,7 @@ test_expect_success 'test tracking setup via --track' \ @@ -131,7 +131,7 @@ test_expect_success 'test tracking setup via --track' \
test_expect_success 'test tracking setup (non-wildcard, matching)' \
'git config remote.local.url . &&
git config remote.local.fetch refs/heads/master:refs/remotes/local/master &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track my4 local/master &&
test $(git config branch.my4.remote) = local &&
test $(git config branch.my4.merge) = refs/heads/master'
@ -139,7 +139,7 @@ test_expect_success 'test tracking setup (non-wildcard, matching)' \ @@ -139,7 +139,7 @@ test_expect_success 'test tracking setup (non-wildcard, matching)' \
test_expect_success 'test tracking setup (non-wildcard, not matching)' \
'git config remote.local.url . &&
git config remote.local.fetch refs/heads/s:refs/remotes/local/s &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track my5 local/master &&
! test "$(git config branch.my5.remote)" = local &&
! test "$(git config branch.my5.merge)" = refs/heads/master'
@ -148,7 +148,7 @@ test_expect_success 'test tracking setup via config' \ @@ -148,7 +148,7 @@ test_expect_success 'test tracking setup via config' \
'git config branch.autosetupmerge true &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch my3 local/master &&
test $(git config branch.my3.remote) = local &&
test $(git config branch.my3.merge) = refs/heads/master'
@ -157,7 +157,7 @@ test_expect_success 'test overriding tracking setup via --no-track' \ @@ -157,7 +157,7 @@ test_expect_success 'test overriding tracking setup via --no-track' \
'git config branch.autosetupmerge true &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track my2 local/master &&
git config branch.autosetupmerge false &&
! test "$(git config branch.my2.remote)" = local &&
@ -173,7 +173,7 @@ test_expect_success 'no tracking without .fetch entries' \ @@ -173,7 +173,7 @@ test_expect_success 'no tracking without .fetch entries' \
test_expect_success 'test tracking setup via --track but deeper' \
'git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/o/o || git-fetch local) &&
(git show-ref -q refs/remotes/local/o/o || git fetch local) &&
git branch --track my7 local/o/o &&
test "$(git config branch.my7.remote)" = local &&
test "$(git config branch.my7.merge)" = refs/heads/o/o'
@ -209,7 +209,7 @@ EOF @@ -209,7 +209,7 @@ EOF
test_expect_success \
'git checkout -b g/h/i -l should create a branch and a log' \
'GIT_COMMITTER_DATE="2005-05-26 23:30" \
git-checkout -b g/h/i -l master &&
git checkout -b g/h/i -l master &&
test -f .git/refs/heads/g/h/i &&
test -f .git/logs/refs/heads/g/h/i &&
diff expect .git/logs/refs/heads/g/h/i'
@ -228,7 +228,7 @@ test_expect_success 'autosetuprebase local on a tracked local branch' ' @@ -228,7 +228,7 @@ test_expect_success 'autosetuprebase local on a tracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase local &&
(git show-ref -q refs/remotes/local/o || git-fetch local) &&
(git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase &&
git branch --track myr1 mybase &&
test "$(git config branch.myr1.remote)" = . &&
@ -240,7 +240,7 @@ test_expect_success 'autosetuprebase always on a tracked local branch' ' @@ -240,7 +240,7 @@ test_expect_success 'autosetuprebase always on a tracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase always &&
(git show-ref -q refs/remotes/local/o || git-fetch local) &&
(git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase2 &&
git branch --track myr2 mybase &&
test "$(git config branch.myr2.remote)" = . &&
@ -252,7 +252,7 @@ test_expect_success 'autosetuprebase remote on a tracked local branch' ' @@ -252,7 +252,7 @@ test_expect_success 'autosetuprebase remote on a tracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase remote &&
(git show-ref -q refs/remotes/local/o || git-fetch local) &&
(git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase3 &&
git branch --track myr3 mybase2 &&
test "$(git config branch.myr3.remote)" = . &&
@ -264,7 +264,7 @@ test_expect_success 'autosetuprebase never on a tracked local branch' ' @@ -264,7 +264,7 @@ test_expect_success 'autosetuprebase never on a tracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase never &&
(git show-ref -q refs/remotes/local/o || git-fetch local) &&
(git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase4 &&
git branch --track myr4 mybase2 &&
test "$(git config branch.myr4.remote)" = . &&
@ -276,7 +276,7 @@ test_expect_success 'autosetuprebase local on a tracked remote branch' ' @@ -276,7 +276,7 @@ test_expect_success 'autosetuprebase local on a tracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase local &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr5 local/master &&
test "$(git config branch.myr5.remote)" = local &&
test "$(git config branch.myr5.merge)" = refs/heads/master &&
@ -287,7 +287,7 @@ test_expect_success 'autosetuprebase never on a tracked remote branch' ' @@ -287,7 +287,7 @@ test_expect_success 'autosetuprebase never on a tracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase never &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr6 local/master &&
test "$(git config branch.myr6.remote)" = local &&
test "$(git config branch.myr6.merge)" = refs/heads/master &&
@ -298,7 +298,7 @@ test_expect_success 'autosetuprebase remote on a tracked remote branch' ' @@ -298,7 +298,7 @@ test_expect_success 'autosetuprebase remote on a tracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase remote &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr7 local/master &&
test "$(git config branch.myr7.remote)" = local &&
test "$(git config branch.myr7.merge)" = refs/heads/master &&
@ -309,7 +309,7 @@ test_expect_success 'autosetuprebase always on a tracked remote branch' ' @@ -309,7 +309,7 @@ test_expect_success 'autosetuprebase always on a tracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase remote &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr8 local/master &&
test "$(git config branch.myr8.remote)" = local &&
test "$(git config branch.myr8.merge)" = refs/heads/master &&
@ -320,7 +320,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked remote branch' ' @@ -320,7 +320,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked remote branch' '
git config --unset branch.autosetuprebase &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr9 local/master &&
test "$(git config branch.myr9.remote)" = local &&
test "$(git config branch.myr9.merge)" = refs/heads/master &&
@ -330,7 +330,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked remote branch' ' @@ -330,7 +330,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked remote branch' '
test_expect_success 'autosetuprebase unconfigured on a tracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/o || git-fetch local) &&
(git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase10 &&
git branch --track myr10 mybase2 &&
test "$(git config branch.myr10.remote)" = . &&
@ -341,7 +341,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked local branch' ' @@ -341,7 +341,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked local branch' '
test_expect_success 'autosetuprebase unconfigured on untracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr11 mybase2 &&
test "z$(git config branch.myr11.remote)" = z &&
test "z$(git config branch.myr11.merge)" = z &&
@ -351,7 +351,7 @@ test_expect_success 'autosetuprebase unconfigured on untracked local branch' ' @@ -351,7 +351,7 @@ test_expect_success 'autosetuprebase unconfigured on untracked local branch' '
test_expect_success 'autosetuprebase unconfigured on untracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr12 local/master &&
test "z$(git config branch.myr12.remote)" = z &&
test "z$(git config branch.myr12.merge)" = z &&
@ -362,7 +362,7 @@ test_expect_success 'autosetuprebase never on an untracked local branch' ' @@ -362,7 +362,7 @@ test_expect_success 'autosetuprebase never on an untracked local branch' '
git config branch.autosetuprebase never &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr13 mybase2 &&
test "z$(git config branch.myr13.remote)" = z &&
test "z$(git config branch.myr13.merge)" = z &&
@ -373,7 +373,7 @@ test_expect_success 'autosetuprebase local on an untracked local branch' ' @@ -373,7 +373,7 @@ test_expect_success 'autosetuprebase local on an untracked local branch' '
git config branch.autosetuprebase local &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr14 mybase2 &&
test "z$(git config branch.myr14.remote)" = z &&
test "z$(git config branch.myr14.merge)" = z &&
@ -384,7 +384,7 @@ test_expect_success 'autosetuprebase remote on an untracked local branch' ' @@ -384,7 +384,7 @@ test_expect_success 'autosetuprebase remote on an untracked local branch' '
git config branch.autosetuprebase remote &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr15 mybase2 &&
test "z$(git config branch.myr15.remote)" = z &&
test "z$(git config branch.myr15.merge)" = z &&
@ -395,7 +395,7 @@ test_expect_success 'autosetuprebase always on an untracked local branch' ' @@ -395,7 +395,7 @@ test_expect_success 'autosetuprebase always on an untracked local branch' '
git config branch.autosetuprebase always &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr16 mybase2 &&
test "z$(git config branch.myr16.remote)" = z &&
test "z$(git config branch.myr16.merge)" = z &&
@ -406,7 +406,7 @@ test_expect_success 'autosetuprebase never on an untracked remote branch' ' @@ -406,7 +406,7 @@ test_expect_success 'autosetuprebase never on an untracked remote branch' '
git config branch.autosetuprebase never &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr17 local/master &&
test "z$(git config branch.myr17.remote)" = z &&
test "z$(git config branch.myr17.merge)" = z &&
@ -417,7 +417,7 @@ test_expect_success 'autosetuprebase local on an untracked remote branch' ' @@ -417,7 +417,7 @@ test_expect_success 'autosetuprebase local on an untracked remote branch' '
git config branch.autosetuprebase local &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr18 local/master &&
test "z$(git config branch.myr18.remote)" = z &&
test "z$(git config branch.myr18.merge)" = z &&
@ -428,7 +428,7 @@ test_expect_success 'autosetuprebase remote on an untracked remote branch' ' @@ -428,7 +428,7 @@ test_expect_success 'autosetuprebase remote on an untracked remote branch' '
git config branch.autosetuprebase remote &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr19 local/master &&
test "z$(git config branch.myr19.remote)" = z &&
test "z$(git config branch.myr19.merge)" = z &&
@ -439,7 +439,7 @@ test_expect_success 'autosetuprebase always on an untracked remote branch' ' @@ -439,7 +439,7 @@ test_expect_success 'autosetuprebase always on an untracked remote branch' '
git config branch.autosetuprebase always &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git-fetch local) &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr20 local/master &&
test "z$(git config branch.myr20.remote)" = z &&
test "z$(git config branch.myr20.merge)" = z &&

4
t/t3210-pack-refs.sh

@ -17,7 +17,7 @@ test_expect_success \ @@ -17,7 +17,7 @@ test_expect_success \
'prepare a trivial repository' \
'echo Hello > A &&
git update-index --add A &&
git-commit -m "Initial commit." &&
git commit -m "Initial commit." &&
HEAD=$(git rev-parse --verify HEAD)'

SHA1=
@ -97,7 +97,7 @@ test_expect_success \ @@ -97,7 +97,7 @@ test_expect_success \
git branch n'

test_expect_success 'pack, prune and repack' '
git-tag foo &&
git tag foo &&
git pack-refs --all --prune &&
git show-ref >all-of-them &&
git pack-refs &&

6
t/t3400-rebase.sh

@ -16,15 +16,15 @@ test_expect_success \ @@ -16,15 +16,15 @@ test_expect_success \
'prepare repository with topic branches' \
'echo First > A &&
git update-index --add A &&
git-commit -m "Add A." &&
git commit -m "Add A." &&
git checkout -b my-topic-branch &&
echo Second > B &&
git update-index --add B &&
git-commit -m "Add B." &&
git commit -m "Add B." &&
git checkout -f master &&
echo Third >> A &&
git update-index A &&
git-commit -m "Modify A." &&
git commit -m "Modify A." &&
git checkout -b side my-topic-branch &&
echo Side >> C &&
git add C &&

22
t/t3401-rebase-partial.sh

@ -15,29 +15,29 @@ test_expect_success \ @@ -15,29 +15,29 @@ test_expect_success \
'prepare repository with topic branch' \
'echo First > A &&
git update-index --add A &&
git-commit -m "Add A." &&
git commit -m "Add A." &&

git-checkout -b my-topic-branch &&
git checkout -b my-topic-branch &&

echo Second > B &&
git update-index --add B &&
git-commit -m "Add B." &&
git commit -m "Add B." &&

echo AnotherSecond > C &&
git update-index --add C &&
git-commit -m "Add C." &&
git commit -m "Add C." &&

git-checkout -f master &&
git checkout -f master &&

echo Third >> A &&
git update-index A &&
git-commit -m "Modify A."
git commit -m "Modify A."
'

test_expect_success \
'pick top patch from topic branch into master' \
'git cherry-pick my-topic-branch^0 &&
git-checkout -f my-topic-branch &&
git checkout -f my-topic-branch &&
git branch master-merge master &&
git branch my-topic-branch-merge my-topic-branch
'
@ -49,13 +49,13 @@ test_debug \ @@ -49,13 +49,13 @@ test_debug \
'

test_expect_success \
'rebase topic branch against new master and check git-am did not get halted' \
'git-rebase master && test ! -d .git/rebase-apply'
'rebase topic branch against new master and check git am did not get halted' \
'git rebase master && test ! -d .git/rebase-apply'

test_expect_success \
'rebase --merge topic branch that was partially merged upstream' \
'git-checkout -f my-topic-branch-merge &&
git-rebase --merge master-merge &&
'git checkout -f my-topic-branch-merge &&
git rebase --merge master-merge &&
test ! -d .git/rebase-merge'

test_done

2
t/t3403-rebase-skip.sh

@ -7,7 +7,7 @@ test_description='git rebase --merge --skip tests' @@ -7,7 +7,7 @@ test_description='git rebase --merge --skip tests'

. ./test-lib.sh

# we assume the default git-am -3 --skip strategy is tested independently
# we assume the default git am -3 --skip strategy is tested independently
# and always works :)

test_expect_success setup '

2
t/t3404-rebase-interactive.sh

@ -161,7 +161,7 @@ test_expect_success 'stop on conflicting pick' ' @@ -161,7 +161,7 @@ test_expect_success 'stop on conflicting pick' '
test "$(git rev-parse HEAD~3)" = "$(git rev-parse master)" &&
test_cmp expect .git/rebase-merge/patch &&
test_cmp expect2 file1 &&
test "$(git-diff --name-status |
test "$(git diff --name-status |
sed -n -e "/^U/s/^U[^a-z]*//p")" = file1 &&
test 4 = $(grep -v "^#" < .git/rebase-merge/done | wc -l) &&
test 0 = $(grep -c "^[^#]" < .git/rebase-merge/git-rebase-todo)

2
t/t3407-rebase-abort.sh

@ -52,7 +52,7 @@ testrebase() { @@ -52,7 +52,7 @@ testrebase() {
test -d "$dotest" &&
test_must_fail git rebase --skip &&
test $(git rev-parse HEAD) = $(git rev-parse master) &&
git-rebase --abort &&
git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
test ! -d "$dotest"
'

12
t/t3500-cherry.sh

@ -17,25 +17,25 @@ test_expect_success \ @@ -17,25 +17,25 @@ test_expect_success \
'prepare repository with topic branch, and check cherry finds the 2 patches from there' \
'echo First > A &&
git update-index --add A &&
git-commit -m "Add A." &&
git commit -m "Add A." &&

git-checkout -b my-topic-branch &&
git checkout -b my-topic-branch &&

echo Second > B &&
git update-index --add B &&
git-commit -m "Add B." &&
git commit -m "Add B." &&

sleep 2 &&
echo AnotherSecond > C &&
git update-index --add C &&
git-commit -m "Add C." &&
git commit -m "Add C." &&

git-checkout -f master &&
git checkout -f master &&
rm -f B C &&

echo Third >> A &&
git update-index A &&
git-commit -m "Modify A." &&
git commit -m "Modify A." &&

expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* + .*"
'

4
t/t3600-rm.sh

@ -12,14 +12,14 @@ test_expect_success \ @@ -12,14 +12,14 @@ test_expect_success \
'Initialize test directory' \
"touch -- foo bar baz 'space embedded' -q &&
git add -- foo bar baz 'space embedded' -q &&
git-commit -m 'add normal files' &&
git commit -m 'add normal files' &&
test_tabs=y &&
if touch -- 'tab embedded' 'newline
embedded'
then
git add -- 'tab embedded' 'newline
embedded' &&
git-commit -m 'add files with tabs and newlines'
git commit -m 'add files with tabs and newlines'
else
say 'Your filesystem does not allow tabs in filenames.'
test_tabs=n

12
t/t3800-mktag.sh

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#
#

test_description='git-mktag: tag object verify test'
test_description='git mktag: tag object verify test'

. ./test-lib.sh

@ -14,7 +14,7 @@ test_description='git-mktag: tag object verify test' @@ -14,7 +14,7 @@ test_description='git-mktag: tag object verify test'
check_verify_failure () {
expect="$2"
test_expect_success "$1" '
( test_must_fail git-mktag <tag.sig 2>message ) &&
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
'
}
@ -24,7 +24,7 @@ check_verify_failure () { @@ -24,7 +24,7 @@ check_verify_failure () {
# for the tag.
echo Hello >A
git update-index --add A
git-commit -m "Initial commit"
git commit -m "Initial commit"
head=$(git rev-parse --verify HEAD)

############################################################
@ -222,7 +222,7 @@ EOF @@ -222,7 +222,7 @@ EOF

test_expect_success \
'allow empty tag email' \
'git-mktag <tag.sig >.git/refs/tags/mytag 2>message'
'git mktag <tag.sig >.git/refs/tags/mytag 2>message'

############################################################
# 16. disallow spaces in tag email
@ -350,14 +350,14 @@ EOF @@ -350,14 +350,14 @@ EOF

test_expect_success \
'create valid tag' \
'git-mktag <tag.sig >.git/refs/tags/mytag 2>message'
'git mktag <tag.sig >.git/refs/tags/mytag 2>message'

############################################################
# 25. check mytag

test_expect_success \
'check mytag' \
'git-tag -l | grep mytag'
'git tag -l | grep mytag'


test_done

6
t/t3900-i18n-commit.sh

@ -18,7 +18,7 @@ test_expect_success setup ' @@ -18,7 +18,7 @@ test_expect_success setup '
T=$(git write-tree) &&
C=$(git commit-tree $T <../t3900/1-UTF-8.txt) &&
git update-ref HEAD $C &&
git-tag C0
git tag C0
'

test_expect_success 'no encoding header for base case' '
@ -30,9 +30,9 @@ for H in ISO-8859-1 EUCJP ISO-2022-JP @@ -30,9 +30,9 @@ for H in ISO-8859-1 EUCJP ISO-2022-JP
do
test_expect_success "$H setup" '
git config i18n.commitencoding $H &&
git-checkout -b $H C0 &&
git checkout -b $H C0 &&
echo $H >F &&
git-commit -a -F ../t3900/$H.txt
git commit -a -F ../t3900/$H.txt
'
done


16
t/t3901-i18n-patch.sh

@ -103,7 +103,7 @@ test_expect_success 'rebase (U/U)' ' @@ -103,7 +103,7 @@ test_expect_success 'rebase (U/U)' '
# we want UTF-8 encoded name.
. ../t3901-utf8.txt &&
git checkout -b test &&
git-rebase master &&
git rebase master &&

check_encoding 2
'
@ -114,7 +114,7 @@ test_expect_success 'rebase (U/L)' ' @@ -114,7 +114,7 @@ test_expect_success 'rebase (U/L)' '
. ../t3901-utf8.txt &&

git reset --hard side &&
git-rebase master &&
git rebase master &&

check_encoding 2
'
@ -126,7 +126,7 @@ test_expect_success 'rebase (L/L)' ' @@ -126,7 +126,7 @@ test_expect_success 'rebase (L/L)' '
. ../t3901-8859-1.txt &&

git reset --hard side &&
git-rebase master &&
git rebase master &&

check_encoding 2 8859
'
@ -139,7 +139,7 @@ test_expect_success 'rebase (L/U)' ' @@ -139,7 +139,7 @@ test_expect_success 'rebase (L/U)' '
. ../t3901-8859-1.txt &&

git reset --hard side &&
git-rebase master &&
git rebase master &&

check_encoding 2 8859
'
@ -211,7 +211,7 @@ test_expect_success 'rebase --merge (U/U)' ' @@ -211,7 +211,7 @@ test_expect_success 'rebase --merge (U/U)' '
. ../t3901-utf8.txt &&

git reset --hard side &&
git-rebase --merge master &&
git rebase --merge master &&

check_encoding 2
'
@ -222,7 +222,7 @@ test_expect_success 'rebase --merge (U/L)' ' @@ -222,7 +222,7 @@ test_expect_success 'rebase --merge (U/L)' '
. ../t3901-utf8.txt &&

git reset --hard side &&
git-rebase --merge master &&
git rebase --merge master &&

check_encoding 2
'
@ -234,7 +234,7 @@ test_expect_success 'rebase --merge (L/L)' ' @@ -234,7 +234,7 @@ test_expect_success 'rebase --merge (L/L)' '
. ../t3901-8859-1.txt &&

git reset --hard side &&
git-rebase --merge master &&
git rebase --merge master &&

check_encoding 2 8859
'
@ -247,7 +247,7 @@ test_expect_success 'rebase --merge (L/U)' ' @@ -247,7 +247,7 @@ test_expect_success 'rebase --merge (L/U)' '
. ../t3901-8859-1.txt &&

git reset --hard side &&
git-rebase --merge master &&
git rebase --merge master &&

check_encoding 2 8859
'

2
t/t3903-stash.sh

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
# Copyright (c) 2007 Johannes E Schindelin
#

test_description='Test git-stash'
test_description='Test git stash'

. ./test-lib.sh


4
t/t4012-diff-binary.sh

@ -61,7 +61,7 @@ test_expect_success 'apply detecting corrupt patch correctly' \ @@ -61,7 +61,7 @@ test_expect_success 'apply detecting corrupt patch correctly' \
detected=`sed -ne "${detected}p" broken` &&
test "$detected" = xCIT'

test_expect_success 'initial commit' 'git-commit -a -m initial'
test_expect_success 'initial commit' 'git commit -a -m initial'

# Try removal (b), modification (d), and creation (e).
test_expect_success 'diff-index with --binary' \
@ -72,7 +72,7 @@ test_expect_success 'diff-index with --binary' \ @@ -72,7 +72,7 @@ test_expect_success 'diff-index with --binary' \
git apply --stat --summary current'

test_expect_success 'apply binary patch' \
'git-reset --hard &&
'git reset --hard &&
git apply --binary --index <current &&
tree1=`git write-tree` &&
test "$tree1" = "$tree0"'

26
t/t4103-apply-binary.sh

@ -21,16 +21,16 @@ cat file1 >file2 @@ -21,16 +21,16 @@ cat file1 >file2
cat file1 >file4

git update-index --add --remove file1 file2 file4
git-commit -m 'Initial Version' 2>/dev/null
git commit -m 'Initial Version' 2>/dev/null

git-checkout -b binary
git checkout -b binary
perl -pe 'y/x/\000/' <file1 >file3
cat file3 >file4
git add file2
perl -pe 'y/\000/v/' <file3 >file1
rm -f file2
git update-index --add --remove file1 file2 file3 file4
git-commit -m 'Second Version'
git commit -m 'Second Version'

git diff-tree -p master binary >B.diff
git diff-tree -p -C master binary >C.diff
@ -39,47 +39,47 @@ git diff-tree -p --binary master binary >BF.diff @@ -39,47 +39,47 @@ git diff-tree -p --binary master binary >BF.diff
git diff-tree -p --binary -C master binary >CF.diff

test_expect_success 'stat binary diff -- should not fail.' \
'git-checkout master
'git checkout master
git apply --stat --summary B.diff'

test_expect_success 'stat binary diff (copy) -- should not fail.' \
'git-checkout master
'git checkout master
git apply --stat --summary C.diff'

test_expect_success 'check binary diff -- should fail.' \
'git-checkout master &&
'git checkout master &&
test_must_fail git apply --check B.diff'

test_expect_success 'check binary diff (copy) -- should fail.' \
'git-checkout master &&
'git checkout master &&
test_must_fail git apply --check C.diff'

test_expect_success \
'check incomplete binary diff with replacement -- should fail.' '
git-checkout master &&
git checkout master &&
test_must_fail git apply --check --allow-binary-replacement B.diff
'

test_expect_success \
'check incomplete binary diff with replacement (copy) -- should fail.' '
git-checkout master &&
git checkout master &&
test_must_fail git apply --check --allow-binary-replacement C.diff
'

test_expect_success 'check binary diff with replacement.' \
'git-checkout master
'git checkout master
git apply --check --allow-binary-replacement BF.diff'

test_expect_success 'check binary diff with replacement (copy).' \
'git-checkout master
'git checkout master
git apply --check --allow-binary-replacement CF.diff'

# Now we start applying them.

do_reset () {
rm -f file? &&
git-reset --hard &&
git-checkout -f master
git reset --hard &&
git checkout -f master
}

test_expect_success 'apply binary diff -- should fail.' \

2
t/t4124-apply-ws-rule.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description='core.whitespace rules and git-apply'
test_description='core.whitespace rules and git apply'

. ./test-lib.sh


4
t/t4127-apply-same-fn.sh

@ -26,7 +26,7 @@ test_expect_success 'apply same filename with independent changes' ' @@ -26,7 +26,7 @@ test_expect_success 'apply same filename with independent changes' '
git diff >> patch0 &&
cp same_fn same_fn2 &&
git reset --hard &&
git-apply patch0 &&
git apply patch0 &&
diff same_fn same_fn2
'

@ -39,7 +39,7 @@ test_expect_success 'apply same filename with overlapping changes' ' @@ -39,7 +39,7 @@ test_expect_success 'apply same filename with overlapping changes' '
git diff >> patch0 &&
cp same_fn same_fn2 &&
git reset --hard &&
git-apply patch0 &&
git apply patch0 &&
diff same_fn same_fn2
'


2
t/t4150-am.sh

@ -164,7 +164,7 @@ test_expect_success 'am --keep really keeps the subject' ' @@ -164,7 +164,7 @@ test_expect_success 'am --keep really keeps the subject' '
git checkout HEAD^ &&
git am --keep patch4 &&
! test -d .git/rebase-apply &&
git-cat-file commit HEAD |
git cat-file commit HEAD |
grep -q -F "Re: Re: Re: [PATCH 1/5 v2] third"
'


4
t/t4151-am-abort.sh

@ -44,14 +44,14 @@ do @@ -44,14 +44,14 @@ do
'

test_expect_success "am$with3 --skip continue after failed am$with3" '
test_must_fail git-am$with3 --skip >output &&
test_must_fail git am$with3 --skip >output &&
test "$(grep "^Applying" output)" = "Applying: 6" &&
test_cmp file-2-expect file-2 &&
test ! -f .git/rr-cache/MERGE_RR
'

test_expect_success "am --abort goes back after failed am$with3" '
git-am --abort &&
git am --abort &&
git rev-parse HEAD >actual &&
git rev-parse initial >expect &&
test_cmp expect actual &&

16
t/t5300-pack-object.sh

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
# Copyright (c) 2005 Junio C Hamano
#

test_description='git-pack-object
test_description='git pack-object

'
. ./test-lib.sh
@ -242,24 +242,24 @@ test_expect_success \ @@ -242,24 +242,24 @@ test_expect_success \
test_expect_success \
'build pack index for an existing pack' \
'cat test-1-${packname_1}.pack >test-3.pack &&
git-index-pack -o tmp.idx test-3.pack &&
git index-pack -o tmp.idx test-3.pack &&
cmp tmp.idx test-1-${packname_1}.idx &&

git-index-pack test-3.pack &&
git index-pack test-3.pack &&
cmp test-3.idx test-1-${packname_1}.idx &&

cat test-2-${packname_2}.pack >test-3.pack &&
git-index-pack -o tmp.idx test-2-${packname_2}.pack &&
git index-pack -o tmp.idx test-2-${packname_2}.pack &&
cmp tmp.idx test-2-${packname_2}.idx &&

git-index-pack test-3.pack &&
git index-pack test-3.pack &&
cmp test-3.idx test-2-${packname_2}.idx &&

cat test-3-${packname_3}.pack >test-3.pack &&
git-index-pack -o tmp.idx test-3-${packname_3}.pack &&
git index-pack -o tmp.idx test-3-${packname_3}.pack &&
cmp tmp.idx test-3-${packname_3}.idx &&

git-index-pack test-3.pack &&
git index-pack test-3.pack &&
cmp test-3.idx test-3-${packname_3}.idx &&

:'
@ -272,7 +272,7 @@ test_expect_success \ @@ -272,7 +272,7 @@ test_expect_success \

test_expect_success \
'make sure index-pack detects the SHA1 collision' \
'test_must_fail git-index-pack -o bad.idx test-3.pack'
'test_must_fail git index-pack -o bad.idx test-3.pack'

test_expect_success \
'honor pack.packSizeLimit' \

4
t/t5301-sliding-window.sh

@ -19,7 +19,7 @@ test_expect_success \ @@ -19,7 +19,7 @@ test_expect_success \
tree=`git write-tree` &&
commit1=`git commit-tree $tree </dev/null` &&
git update-ref HEAD $commit1 &&
git-repack -a -d &&
git repack -a -d &&
test "`git count-objects`" = "0 objects, 0 kilobytes" &&
pack1=`ls .git/objects/pack/*.pack` &&
test -f "$pack1"'
@ -45,7 +45,7 @@ test_expect_success \ @@ -45,7 +45,7 @@ test_expect_success \
git config core.packedGitLimit 512 &&
commit2=`git commit-tree $tree -p $commit1 </dev/null` &&
git update-ref HEAD $commit2 &&
git-repack -a -d &&
git repack -a -d &&
test "`git count-objects`" = "0 objects, 0 kilobytes" &&
pack2=`ls .git/objects/pack/*.pack` &&
test -f "$pack2"

12
t/t5302-pack-index.sh

@ -48,11 +48,11 @@ test_expect_success \ @@ -48,11 +48,11 @@ test_expect_success \

test_expect_success \
'index-pack with index version 1' \
'git-index-pack --index-version=1 -o 1.idx "test-1-${pack1}.pack"'
'git index-pack --index-version=1 -o 1.idx "test-1-${pack1}.pack"'

test_expect_success \
'index-pack with index version 2' \
'git-index-pack --index-version=2 -o 2.idx "test-1-${pack1}.pack"'
'git index-pack --index-version=2 -o 2.idx "test-1-${pack1}.pack"'

test_expect_success \
'index-pack results should match pack-objects ones' \
@ -85,7 +85,7 @@ test_expect_success \ @@ -85,7 +85,7 @@ test_expect_success \
test "$have_64bits" &&
test_expect_success \
'index v2: force some 64-bit offsets with index-pack' \
'git-index-pack --index-version=2,0x40000 -o 3.idx "test-1-${pack1}.pack"'
'git index-pack --index-version=2,0x40000 -o 3.idx "test-1-${pack1}.pack"'

test "$have_64bits" &&
test_expect_success \
@ -94,7 +94,7 @@ test_expect_success \ @@ -94,7 +94,7 @@ test_expect_success \

test_expect_success \
'[index v1] 1) stream pack to repository' \
'git-index-pack --index-version=1 --stdin < "test-1-${pack1}.pack" &&
'git index-pack --index-version=1 --stdin < "test-1-${pack1}.pack" &&
git prune-packed &&
git count-objects | ( read nr rest && test "$nr" -eq 1 ) &&
cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&
@ -132,7 +132,7 @@ test_expect_success \ @@ -132,7 +132,7 @@ test_expect_success \
test_expect_success \
'[index v2] 1) stream pack to repository' \
'rm -f .git/objects/pack/* &&
git-index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
git index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
git prune-packed &&
git count-objects | ( read nr rest && test "$nr" -eq 1 ) &&
cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&
@ -165,7 +165,7 @@ test_expect_success \ @@ -165,7 +165,7 @@ test_expect_success \
test_expect_success \
'[index v2] 6) verify-pack detects CRC mismatch' \
'rm -f .git/objects/pack/* &&
git-index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
git index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
git verify-pack ".git/objects/pack/pack-${pack1}.pack" &&
chmod +w ".git/objects/pack/pack-${pack1}.idx" &&
dd if=/dev/zero of=".git/objects/pack/pack-${pack1}.idx" conv=notrunc \

2
t/t5305-include-tag.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description='git-pack-object --include-tag'
test_description='git pack-object --include-tag'
. ./test-lib.sh

TRASH=`pwd`

30
t/t5400-send-pack.sh

@ -31,7 +31,7 @@ test_expect_success setup ' @@ -31,7 +31,7 @@ test_expect_success setup '
parent=$commit || return 1
done &&
git update-ref HEAD "$commit" &&
git-clone ./. victim &&
git clone ./. victim &&
cd victim &&
git log &&
cd .. &&
@ -68,7 +68,7 @@ test_expect_success 'pack the destination repository' ' @@ -68,7 +68,7 @@ test_expect_success 'pack the destination repository' '
test_expect_success \
'pushing rewound head should not barf but require --force' '
# should not fail but refuse to update.
if git-send-pack ./victim/.git/ master
if git send-pack ./victim/.git/ master
then
# now it should fail with Pasky patch
echo >&2 Gaah, it should have failed.
@ -85,7 +85,7 @@ test_expect_success \ @@ -85,7 +85,7 @@ test_expect_success \
true
fi &&
# this should update
git-send-pack --force ./victim/.git/ master &&
git send-pack --force ./victim/.git/ master &&
cmp victim/.git/refs/heads/master .git/refs/heads/master
'

@ -95,7 +95,7 @@ test_expect_success \ @@ -95,7 +95,7 @@ test_expect_success \
git branch extra master &&
cd .. &&
test -f victim/.git/refs/heads/extra &&
git-send-pack ./victim/.git/ :extra master &&
git send-pack ./victim/.git/ :extra master &&
! test -f victim/.git/refs/heads/extra
'

@ -109,27 +109,27 @@ test_expect_success \ @@ -109,27 +109,27 @@ test_expect_success \
git config receive.denyNonFastforwards true &&
cd .. &&
git update-ref refs/heads/master master^ || return 1
git-send-pack --force ./victim/.git/ master && return 1
git send-pack --force ./victim/.git/ master && return 1
! test_cmp .git/refs/heads/master victim/.git/refs/heads/master
'

test_expect_success \
'pushing does not include non-head refs' '
mkdir parent && cd parent &&
git-init && touch file && git-add file && git-commit -m add &&
git init && touch file && git add file && git commit -m add &&
cd .. &&
git-clone parent child && cd child && git-push --all &&
git clone parent child && cd child && git push --all &&
cd ../parent &&
git-branch -a >branches && ! grep origin/master branches
git branch -a >branches && ! grep origin/master branches
'

rewound_push_setup() {
rm -rf parent child &&
mkdir parent && cd parent &&
git-init && echo one >file && git-add file && git-commit -m one &&
echo two >file && git-commit -a -m two &&
git init && echo one >file && git add file && git commit -m one &&
echo two >file && git commit -a -m two &&
cd .. &&
git-clone parent child && cd child && git-reset --hard HEAD^
git clone parent child && cd child && git reset --hard HEAD^
}

rewound_push_succeeded() {
@ -148,26 +148,26 @@ rewound_push_failed() { @@ -148,26 +148,26 @@ rewound_push_failed() {
test_expect_success \
'pushing explicit refspecs respects forcing' '
rewound_push_setup &&
if git-send-pack ../parent/.git refs/heads/master:refs/heads/master
if git send-pack ../parent/.git refs/heads/master:refs/heads/master
then
false
else
true
fi && rewound_push_failed &&
git-send-pack ../parent/.git +refs/heads/master:refs/heads/master &&
git send-pack ../parent/.git +refs/heads/master:refs/heads/master &&
rewound_push_succeeded
'

test_expect_success \
'pushing wildcard refspecs respects forcing' '
rewound_push_setup &&
if git-send-pack ../parent/.git refs/heads/*:refs/heads/*
if git send-pack ../parent/.git refs/heads/*:refs/heads/*
then
false
else
true
fi && rewound_push_failed &&
git-send-pack ../parent/.git +refs/heads/*:refs/heads/* &&
git send-pack ../parent/.git +refs/heads/*:refs/heads/* &&
rewound_push_succeeded
'


4
t/t5401-update-hooks.sh

@ -17,7 +17,7 @@ test_expect_success setup ' @@ -17,7 +17,7 @@ test_expect_success setup '
commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
git update-ref refs/heads/master $commit0 &&
git update-ref refs/heads/tofail $commit1 &&
git-clone ./. victim &&
git clone ./. victim &&
GIT_DIR=victim/.git git update-ref refs/heads/tofail $commit1 &&
git update-ref refs/heads/master $commit1 &&
git update-ref refs/heads/tofail $commit0
@ -61,7 +61,7 @@ EOF @@ -61,7 +61,7 @@ EOF
chmod u+x victim/.git/hooks/post-update

test_expect_success push '
test_must_fail git-send-pack --force ./victim/.git \
test_must_fail git send-pack --force ./victim/.git \
master tofail >send.out 2>send.err
'


4
t/t5402-post-merge-hook.sh

@ -16,9 +16,9 @@ test_expect_success setup ' @@ -16,9 +16,9 @@ test_expect_success setup '
tree1=$(git write-tree) &&
commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
git update-ref refs/heads/master $commit0 &&
git-clone ./. clone1 &&
git clone ./. clone1 &&
GIT_DIR=clone1/.git git update-index --add a &&
git-clone ./. clone2 &&
git clone ./. clone2 &&
GIT_DIR=clone2/.git git update-index --add a
'


4
t/t5403-post-checkout-hook.sh

@ -14,8 +14,8 @@ test_expect_success setup ' @@ -14,8 +14,8 @@ test_expect_success setup '
tree0=$(git write-tree) &&
commit0=$(echo setup | git commit-tree $tree0) &&
git update-ref refs/heads/master $commit0 &&
git-clone ./. clone1 &&
git-clone ./. clone2 &&
git clone ./. clone1 &&
git clone ./. clone2 &&
GIT_DIR=clone2/.git git branch -a new2 &&
echo Data for commit1. >clone2/b &&
GIT_DIR=clone2/.git git add clone2/b &&

4
t/t5500-fetch-pack.sh

@ -58,7 +58,7 @@ pull_to_client () { @@ -58,7 +58,7 @@ pull_to_client () {

cd client
test_expect_success "$number pull" \
"git-fetch-pack -k -v .. $heads"
"git fetch-pack -k -v .. $heads"
case "$heads" in *A*) echo $ATIP > .git/refs/heads/A;; esac
case "$heads" in *B*) echo $BTIP > .git/refs/heads/B;; esac
git symbolic-ref HEAD refs/heads/`echo $heads | sed -e 's/^\(.\).*$/\1/'`
@ -129,7 +129,7 @@ pull_to_client 2nd "B" $((64*3)) @@ -129,7 +129,7 @@ pull_to_client 2nd "B" $((64*3))

pull_to_client 3rd "A" $((1*3)) # old fails

test_expect_success "clone shallow" 'git-clone --depth 2 "file://$(pwd)/." shallow'
test_expect_success "clone shallow" 'git clone --depth 2 "file://$(pwd)/." shallow'

(cd shallow; git count-objects -v) > count.shallow


2
t/t5510-fetch.sh

@ -111,7 +111,7 @@ test_expect_success 'fetch must not resolve short tag name' ' @@ -111,7 +111,7 @@ test_expect_success 'fetch must not resolve short tag name' '
test_expect_success 'fetch must not resolve short remote name' '

cd "$D" &&
git-update-ref refs/remotes/six/HEAD HEAD
git update-ref refs/remotes/six/HEAD HEAD

mkdir six &&
cd six &&

4
t/t5530-upload-pack-error.sh

@ -34,7 +34,7 @@ test_expect_success 'upload-pack fails due to error in pack-objects' ' @@ -34,7 +34,7 @@ test_expect_success 'upload-pack fails due to error in pack-objects' '

! echo "0032want $(git rev-parse HEAD)
00000009done
0000" | git-upload-pack . > /dev/null 2> output.err &&
0000" | git upload-pack . > /dev/null 2> output.err &&
grep "pack-objects died" output.err
'

@ -52,7 +52,7 @@ test_expect_success 'upload-pack fails due to error in rev-list' ' @@ -52,7 +52,7 @@ test_expect_success 'upload-pack fails due to error in rev-list' '

! echo "0032want $(git rev-parse HEAD)
00000009done
0000" | git-upload-pack . > /dev/null 2> output.err &&
0000" | git upload-pack . > /dev/null 2> output.err &&
grep "waitpid (async) failed" output.err
'


12
t/t5600-clone-fail-cleanup.sh

@ -3,9 +3,9 @@ @@ -3,9 +3,9 @@
# Copyright (C) 2006 Carl D. Worth <cworth@cworth.org>
#

test_description='test git-clone to cleanup after failure
test_description='test git clone to cleanup after failure

This test covers the fact that if git-clone fails, it should remove
This test covers the fact that if git clone fails, it should remove
the directory it created, to avoid the user having to manually
remove the directory before attempting a clone again.'

@ -13,7 +13,7 @@ remove the directory before attempting a clone again.' @@ -13,7 +13,7 @@ remove the directory before attempting a clone again.'

test_expect_success \
'clone of non-existent source should fail' \
'test_must_fail git-clone foo bar'
'test_must_fail git clone foo bar'

test_expect_success \
'failed clone should not leave a directory' \
@ -25,15 +25,15 @@ test_create_repo foo @@ -25,15 +25,15 @@ test_create_repo foo
# clone doesn't like it if there is no HEAD. Is that a bug?
(cd foo && touch file && git add file && git commit -m 'add file' >/dev/null 2>&1)

# source repository given to git-clone should be relative to the
# source repository given to git clone should be relative to the
# current path not to the target dir
test_expect_success \
'clone of non-existent (relative to $PWD) source should fail' \
'test_must_fail git-clone ../foo baz'
'test_must_fail git clone ../foo baz'

test_expect_success \
'clone should work now that source exists' \
'git-clone foo bar'
'git clone foo bar'

test_expect_success \
'successful clone must leave the directory' \

4
t/t5602-clone-remote-exec.sh

@ -11,13 +11,13 @@ test_expect_success setup ' @@ -11,13 +11,13 @@ test_expect_success setup '
chmod +x not_ssh
'

test_expect_success 'clone calls git-upload-pack unqualified with no -u option' '
test_expect_success 'clone calls git upload-pack unqualified with no -u option' '
GIT_SSH=./not_ssh git clone localhost:/path/to/repo junk
echo "localhost git-upload-pack '\''/path/to/repo'\''" >expected
test_cmp expected not_ssh_output
'

test_expect_success 'clone calls specified git-upload-pack with -u option' '
test_expect_success 'clone calls specified git upload-pack with -u option' '
GIT_SSH=./not_ssh git clone -u /something/bin/git-upload-pack localhost:/path/to/repo junk
echo "localhost /something/bin/git-upload-pack '\''/path/to/repo'\''" >expected
test_cmp expected not_ssh_output

6
t/t6006-rev-list-format.sh

@ -6,8 +6,8 @@ test_description='git rev-list --pretty=format test' @@ -6,8 +6,8 @@ test_description='git rev-list --pretty=format test'

test_tick
test_expect_success 'setup' '
touch foo && git add foo && git-commit -m "added foo" &&
echo changed >foo && git-commit -a -m "changed foo"
touch foo && git add foo && git commit -m "added foo" &&
echo changed >foo && git commit -a -m "changed foo"
'

# usage: test_format name format_string <expected_output
@ -110,7 +110,7 @@ include an iso8859 character: ¡bueno! @@ -110,7 +110,7 @@ include an iso8859 character: ¡bueno!
EOF
test_expect_success 'setup complex body' '
git config i18n.commitencoding iso8859-1 &&
echo change2 >foo && git-commit -a -F commit-msg
echo change2 >foo && git commit -a -F commit-msg
'

test_format complex-encoding %e <<'EOF'

32
t/t6025-merge-symlinks.sh

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@

test_description='merging symlinks on filesystem w/o symlink support.

This tests that git-merge-recursive writes merge results as plain files
This tests that git merge-recursive writes merge results as plain files
if core.symlinks is false.'

. ./test-lib.sh
@ -15,25 +15,25 @@ test_expect_success \ @@ -15,25 +15,25 @@ test_expect_success \
git config core.symlinks false &&
> file &&
git add file &&
git-commit -m initial &&
git commit -m initial &&
git branch b-symlink &&
git branch b-file &&
l=$(echo -n file | git-hash-object -t blob -w --stdin) &&
l=$(echo -n file | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info &&
git-commit -m master &&
git-checkout b-symlink &&
l=$(echo -n file-different | git-hash-object -t blob -w --stdin) &&
git commit -m master &&
git checkout b-symlink &&
l=$(echo -n file-different | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info &&
git-commit -m b-symlink &&
git-checkout b-file &&
git commit -m b-symlink &&
git checkout b-file &&
echo plain-file > symlink &&
git add symlink &&
git-commit -m b-file'
git commit -m b-file'

test_expect_success \
'merge master into b-symlink, which has a different symbolic link' '
git-checkout b-symlink &&
test_must_fail git-merge master'
git checkout b-symlink &&
test_must_fail git merge master'

test_expect_success \
'the merge result must be a file' '
@ -41,8 +41,8 @@ test -f symlink' @@ -41,8 +41,8 @@ test -f symlink'

test_expect_success \
'merge master into b-file, which has a file instead of a symbolic link' '
git-reset --hard && git-checkout b-file &&
test_must_fail git-merge master'
git reset --hard && git checkout b-file &&
test_must_fail git merge master'

test_expect_success \
'the merge result must be a file' '
@ -50,9 +50,9 @@ test -f symlink' @@ -50,9 +50,9 @@ test -f symlink'

test_expect_success \
'merge b-file, which has a file instead of a symbolic link, into master' '
git-reset --hard &&
git-checkout master &&
test_must_fail git-merge b-file'
git reset --hard &&
git checkout master &&
test_must_fail git merge b-file'

test_expect_success \
'the merge result must be a file' '

12
t/t6026-merge-attr.sh

@ -106,9 +106,9 @@ test_expect_success 'custom merge backend' ' @@ -106,9 +106,9 @@ test_expect_success 'custom merge backend' '

cmp binary union &&
sed -e 1,3d text >check-1 &&
o=$(git-unpack-file master^:text) &&
a=$(git-unpack-file side^:text) &&
b=$(git-unpack-file master:text) &&
o=$(git unpack-file master^:text) &&
a=$(git unpack-file side^:text) &&
b=$(git unpack-file master:text) &&
sh -c "./custom-merge $o $a $b 0" &&
sed -e 1,3d $a >check-2 &&
cmp check-1 check-2 &&
@ -133,9 +133,9 @@ test_expect_success 'custom merge backend' ' @@ -133,9 +133,9 @@ test_expect_success 'custom merge backend' '

cmp binary union &&
sed -e 1,3d text >check-1 &&
o=$(git-unpack-file master^:text) &&
a=$(git-unpack-file anchor:text) &&
b=$(git-unpack-file master:text) &&
o=$(git unpack-file master^:text) &&
a=$(git unpack-file anchor:text) &&
b=$(git unpack-file master:text) &&
sh -c "./custom-merge $o $a $b 0" &&
sed -e 1,3d $a >check-2 &&
cmp check-1 check-2 &&

4
t/t6030-bisect-porcelain.sh

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#
# Copyright (c) 2007 Christian Couder
#
test_description='Tests git-bisect functionality'
test_description='Tests git bisect functionality'

exec </dev/null

@ -23,7 +23,7 @@ add_line_into_file() @@ -23,7 +23,7 @@ add_line_into_file()
fi

test_tick
git-commit --quiet -m "$MSG" $_file
git commit --quiet -m "$MSG" $_file
}

HASH1=

30
t/t6120-describe.sh

@ -31,57 +31,57 @@ check_describe () { @@ -31,57 +31,57 @@ check_describe () {
test_expect_success setup '

test_tick &&
echo one >file && git add file && git-commit -m initial &&
echo one >file && git add file && git commit -m initial &&
one=$(git rev-parse HEAD) &&

test_tick &&
echo two >file && git add file && git-commit -m second &&
echo two >file && git add file && git commit -m second &&
two=$(git rev-parse HEAD) &&

test_tick &&
echo three >file && git add file && git-commit -m third &&
echo three >file && git add file && git commit -m third &&

test_tick &&
echo A >file && git add file && git-commit -m A &&
echo A >file && git add file && git commit -m A &&
test_tick &&
git-tag -a -m A A &&
git tag -a -m A A &&

test_tick &&
echo c >file && git add file && git-commit -m c &&
echo c >file && git add file && git commit -m c &&
test_tick &&
git-tag c &&
git tag c &&

git reset --hard $two &&
test_tick &&
echo B >side && git add side && git-commit -m B &&
echo B >side && git add side && git commit -m B &&
test_tick &&
git-tag -a -m B B &&
git tag -a -m B B &&

test_tick &&
git-merge -m Merged c &&
git merge -m Merged c &&
merged=$(git rev-parse HEAD) &&

git reset --hard $two &&
test_tick &&
echo D >another && git add another && git-commit -m D &&
echo D >another && git add another && git commit -m D &&
test_tick &&
git-tag -a -m D D &&
git tag -a -m D D &&

test_tick &&
echo DD >another && git commit -a -m another &&

test_tick &&
git-tag e &&
git tag e &&

test_tick &&
echo DDD >another && git commit -a -m "yet another" &&

test_tick &&
git-merge -m Merged $merged &&
git merge -m Merged $merged &&

test_tick &&
echo X >file && echo X >side && git add file side &&
git-commit -m x
git commit -m x

'


28
t/t6300-for-each-ref.sh

@ -97,27 +97,27 @@ test_atom tag contents 'Tagging at 1151939927 @@ -97,27 +97,27 @@ test_atom tag contents 'Tagging at 1151939927
'

test_expect_success 'Check invalid atoms names are errors' '
test_must_fail git-for-each-ref --format="%(INVALID)" refs/heads
test_must_fail git for-each-ref --format="%(INVALID)" refs/heads
'

test_expect_success 'Check format specifiers are ignored in naming date atoms' '
git-for-each-ref --format="%(authordate)" refs/heads &&
git-for-each-ref --format="%(authordate:default) %(authordate)" refs/heads &&
git-for-each-ref --format="%(authordate) %(authordate:default)" refs/heads &&
git-for-each-ref --format="%(authordate:default) %(authordate:default)" refs/heads
git for-each-ref --format="%(authordate)" refs/heads &&
git for-each-ref --format="%(authordate:default) %(authordate)" refs/heads &&
git for-each-ref --format="%(authordate) %(authordate:default)" refs/heads &&
git for-each-ref --format="%(authordate:default) %(authordate:default)" refs/heads
'

test_expect_success 'Check valid format specifiers for date fields' '
git-for-each-ref --format="%(authordate:default)" refs/heads &&
git-for-each-ref --format="%(authordate:relative)" refs/heads &&
git-for-each-ref --format="%(authordate:short)" refs/heads &&
git-for-each-ref --format="%(authordate:local)" refs/heads &&
git-for-each-ref --format="%(authordate:iso8601)" refs/heads &&
git-for-each-ref --format="%(authordate:rfc2822)" refs/heads
git for-each-ref --format="%(authordate:default)" refs/heads &&
git for-each-ref --format="%(authordate:relative)" refs/heads &&
git for-each-ref --format="%(authordate:short)" refs/heads &&
git for-each-ref --format="%(authordate:local)" refs/heads &&
git for-each-ref --format="%(authordate:iso8601)" refs/heads &&
git for-each-ref --format="%(authordate:rfc2822)" refs/heads
'

test_expect_success 'Check invalid format specifiers are errors' '
test_must_fail git-for-each-ref --format="%(authordate:INVALID)" refs/heads
test_must_fail git for-each-ref --format="%(authordate:INVALID)" refs/heads
'

cat >expected <<\EOF
@ -207,7 +207,7 @@ refs/tags/testtag @@ -207,7 +207,7 @@ refs/tags/testtag
EOF

test_expect_success 'Verify ascending sort' '
git-for-each-ref --format="%(refname)" --sort=refname >actual &&
git for-each-ref --format="%(refname)" --sort=refname >actual &&
test_cmp expected actual
'

@ -218,7 +218,7 @@ refs/heads/master @@ -218,7 +218,7 @@ refs/heads/master
EOF

test_expect_success 'Verify descending sort' '
git-for-each-ref --format="%(refname)" --sort=-refname >actual &&
git for-each-ref --format="%(refname)" --sort=-refname >actual &&
test_cmp expected actual
'


12
t/t7001-mv.sh

@ -8,7 +8,7 @@ test_expect_success \ @@ -8,7 +8,7 @@ test_expect_success \
'mkdir path0 path1 &&
cp ../../COPYING path0/COPYING &&
git add path0/COPYING &&
git-commit -m add -a'
git commit -m add -a'

test_expect_success \
'moving the file out of subdirectory' \
@ -17,7 +17,7 @@ test_expect_success \ @@ -17,7 +17,7 @@ test_expect_success \
# in path0 currently
test_expect_success \
'commiting the change' \
'cd .. && git-commit -m move-out -a'
'cd .. && git commit -m move-out -a'

test_expect_success \
'checking the commit' \
@ -31,7 +31,7 @@ test_expect_success \ @@ -31,7 +31,7 @@ test_expect_success \
# in path0 currently
test_expect_success \
'commiting the change' \
'cd .. && git-commit -m move-in -a'
'cd .. && git commit -m move-in -a'

test_expect_success \
'checking the commit' \
@ -42,7 +42,7 @@ test_expect_success \ @@ -42,7 +42,7 @@ test_expect_success \
'adding another file' \
'cp ../../README path0/README &&
git add path0/README &&
git-commit -m add2 -a'
git commit -m add2 -a'

test_expect_success \
'moving whole subdirectory' \
@ -50,7 +50,7 @@ test_expect_success \ @@ -50,7 +50,7 @@ test_expect_success \

test_expect_success \
'commiting the change' \
'git-commit -m dir-move -a'
'git commit -m dir-move -a'

test_expect_success \
'checking the commit' \
@ -69,7 +69,7 @@ test_expect_success \ @@ -69,7 +69,7 @@ test_expect_success \

test_expect_success \
'commiting the change' \
'git-commit -m dir-move -a'
'git commit -m dir-move -a'

test_expect_success \
'checking the commit' \

22
t/t7003-filter-branch.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description='git-filter-branch'
test_description='git filter-branch'
. ./test-lib.sh

make_commit () {
@ -32,14 +32,14 @@ test_expect_success 'setup' ' @@ -32,14 +32,14 @@ test_expect_success 'setup' '
H=$(git rev-parse H)

test_expect_success 'rewrite identically' '
git-filter-branch branch
git filter-branch branch
'
test_expect_success 'result is really identical' '
test $H = $(git rev-parse HEAD)
'

test_expect_success 'rewrite bare repository identically' '
(git config core.bare true && cd .git && git-filter-branch branch)
(git config core.bare true && cd .git && git filter-branch branch)
'
git config core.bare false
test_expect_success 'result is really identical' '
@ -47,7 +47,7 @@ test_expect_success 'result is really identical' ' @@ -47,7 +47,7 @@ test_expect_success 'result is really identical' '
'

test_expect_success 'rewrite, renaming a specific file' '
git-filter-branch -f --tree-filter "mv d doh || :" HEAD
git filter-branch -f --tree-filter "mv d doh || :" HEAD
'

test_expect_success 'test that the file was renamed' '
@ -58,7 +58,7 @@ test_expect_success 'test that the file was renamed' ' @@ -58,7 +58,7 @@ test_expect_success 'test that the file was renamed' '
'

test_expect_success 'rewrite, renaming a specific directory' '
git-filter-branch -f --tree-filter "mv dir diroh || :" HEAD
git filter-branch -f --tree-filter "mv dir diroh || :" HEAD
'

test_expect_success 'test that the directory was renamed' '
@ -73,7 +73,7 @@ test_expect_success 'test that the directory was renamed' ' @@ -73,7 +73,7 @@ test_expect_success 'test that the directory was renamed' '
git tag oldD HEAD~4
test_expect_success 'rewrite one branch, keeping a side branch' '
git branch modD oldD &&
git-filter-branch -f --tree-filter "mv b boh || :" D..modD
git filter-branch -f --tree-filter "mv b boh || :" D..modD
'

test_expect_success 'common ancestor is still common (unchanged)' '
@ -96,7 +96,7 @@ test_expect_success 'filter subdirectory only' ' @@ -96,7 +96,7 @@ test_expect_success 'filter subdirectory only' '
test_tick &&
git commit -m "again not subdir" &&
git branch sub &&
git-filter-branch -f --subdirectory-filter subdir refs/heads/sub
git filter-branch -f --subdirectory-filter subdir refs/heads/sub
'

test_expect_success 'subdirectory filter result looks okay' '
@ -120,7 +120,7 @@ test_expect_success 'more setup' ' @@ -120,7 +120,7 @@ test_expect_success 'more setup' '

test_expect_success 'use index-filter to move into a subdirectory' '
git branch directorymoved &&
git-filter-branch -f --index-filter \
git filter-branch -f --index-filter \
"git ls-files -s | sed \"s-\\t-&newsubdir/-\" |
GIT_INDEX_FILE=\$GIT_INDEX_FILE.new \
git update-index --index-info &&
@ -129,7 +129,7 @@ test_expect_success 'use index-filter to move into a subdirectory' ' @@ -129,7 +129,7 @@ test_expect_success 'use index-filter to move into a subdirectory' '

test_expect_success 'stops when msg filter fails' '
old=$(git rev-parse HEAD) &&
test_must_fail git-filter-branch -f --msg-filter false HEAD &&
test_must_fail git filter-branch -f --msg-filter false HEAD &&
test $old = $(git rev-parse HEAD) &&
rm -rf .git-rewrite
'
@ -140,7 +140,7 @@ test_expect_success 'author information is preserved' ' @@ -140,7 +140,7 @@ test_expect_success 'author information is preserved' '
test_tick &&
GIT_AUTHOR_NAME="B V Uips" git commit -m bvuips &&
git branch preserved-author &&
git-filter-branch -f --msg-filter "cat; \
git filter-branch -f --msg-filter "cat; \
test \$GIT_COMMIT != $(git rev-parse master) || \
echo Hallo" \
preserved-author &&
@ -152,7 +152,7 @@ test_expect_success "remove a certain author's commits" ' @@ -152,7 +152,7 @@ test_expect_success "remove a certain author's commits" '
test_tick &&
git commit -m i i &&
git branch removed-author &&
git-filter-branch -f --commit-filter "\
git filter-branch -f --commit-filter "\
if [ \"\$GIT_AUTHOR_NAME\" = \"B V Uips\" ];\
then\
skip_commit \"\$@\";

318
t/t7004-tag.sh

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
# Copyright (c) 2007 Carlos Rica
#

test_description='git-tag
test_description='git tag

Tests for operations with tags.'

@ -22,25 +22,25 @@ test_expect_success 'listing all tags in an empty tree should succeed' ' @@ -22,25 +22,25 @@ test_expect_success 'listing all tags in an empty tree should succeed' '
'

test_expect_success 'listing all tags in an empty tree should output nothing' '
test `git-tag -l | wc -l` -eq 0 &&
test `git-tag | wc -l` -eq 0
test `git tag -l | wc -l` -eq 0 &&
test `git tag | wc -l` -eq 0
'

test_expect_success 'looking for a tag in an empty tree should fail' \
'! (tag_exists mytag)'

test_expect_success 'creating a tag in an empty tree should fail' '
test_must_fail git-tag mynotag &&
test_must_fail git tag mynotag &&
! tag_exists mynotag
'

test_expect_success 'creating a tag for HEAD in an empty tree should fail' '
test_must_fail git-tag mytaghead HEAD &&
test_must_fail git tag mytaghead HEAD &&
! tag_exists mytaghead
'

test_expect_success 'creating a tag for an unknown revision should fail' '
test_must_fail git-tag mytagnorev aaaaaaaaaaa &&
test_must_fail git tag mytagnorev aaaaaaaaaaa &&
! tag_exists mytagnorev
'

@ -54,32 +54,32 @@ test_expect_success 'creating a tag using default HEAD should succeed' ' @@ -54,32 +54,32 @@ test_expect_success 'creating a tag using default HEAD should succeed' '
'

test_expect_success 'listing all tags if one exists should succeed' '
git-tag -l &&
git-tag
git tag -l &&
git tag
'

test_expect_success 'listing all tags if one exists should output that tag' '
test `git-tag -l` = mytag &&
test `git-tag` = mytag
test `git tag -l` = mytag &&
test `git tag` = mytag
'

# pattern matching:

test_expect_success 'listing a tag using a matching pattern should succeed' \
'git-tag -l mytag'
'git tag -l mytag'

test_expect_success \
'listing a tag using a matching pattern should output that tag' \
'test `git-tag -l mytag` = mytag'
'test `git tag -l mytag` = mytag'

# todo: git tag -l now returns always zero, when fixed, change this test
test_expect_success \
'listing tags using a non-matching pattern should suceed' \
'git-tag -l xxx'
'git tag -l xxx'

test_expect_success \
'listing tags using a non-matching pattern should output nothing' \
'test `git-tag -l xxx | wc -l` -eq 0'
'test `git tag -l xxx | wc -l` -eq 0'

# special cases for creating tags:

@ -89,13 +89,13 @@ test_expect_success \ @@ -89,13 +89,13 @@ test_expect_success \

test_expect_success \
'trying to create a tag with a non-valid name should fail' '
test `git-tag -l | wc -l` -eq 1 &&
test `git tag -l | wc -l` -eq 1 &&
test_must_fail git tag "" &&
test_must_fail git tag .othertag &&
test_must_fail git tag "other tag" &&
test_must_fail git tag "othertag^" &&
test_must_fail git tag "other~tag" &&
test `git-tag -l | wc -l` -eq 1
test `git tag -l | wc -l` -eq 1
'

test_expect_success 'creating a tag using HEAD directly should succeed' '
@ -107,7 +107,7 @@ test_expect_success 'creating a tag using HEAD directly should succeed' ' @@ -107,7 +107,7 @@ test_expect_success 'creating a tag using HEAD directly should succeed' '

test_expect_success 'trying to delete an unknown tag should fail' '
! tag_exists unknown-tag &&
test_must_fail git-tag -d unknown-tag
test_must_fail git tag -d unknown-tag
'

cat >expect <<EOF
@ -117,7 +117,7 @@ EOF @@ -117,7 +117,7 @@ EOF
test_expect_success \
'trying to delete tags without params should succeed and do nothing' '
git tag -l > actual && test_cmp expect actual &&
git-tag -d &&
git tag -d &&
git tag -l > actual && test_cmp expect actual
'

@ -125,7 +125,7 @@ test_expect_success \ @@ -125,7 +125,7 @@ test_expect_success \
'deleting two existing tags in one command should succeed' '
tag_exists mytag &&
tag_exists myhead &&
git-tag -d mytag myhead &&
git tag -d mytag myhead &&
! tag_exists mytag &&
! tag_exists myhead
'
@ -133,7 +133,7 @@ test_expect_success \ @@ -133,7 +133,7 @@ test_expect_success \
test_expect_success \
'creating a tag with the name of another deleted one should succeed' '
! tag_exists mytag &&
git-tag mytag &&
git tag mytag &&
tag_exists mytag
'

@ -141,13 +141,13 @@ test_expect_success \ @@ -141,13 +141,13 @@ test_expect_success \
'trying to delete two tags, existing and not, should fail in the 2nd' '
tag_exists mytag &&
! tag_exists myhead &&
test_must_fail git-tag -d mytag anothertag &&
test_must_fail git tag -d mytag anothertag &&
! tag_exists mytag &&
! tag_exists myhead
'

test_expect_success 'trying to delete an already deleted tag should fail' \
'test_must_fail git-tag -d mytag'
'test_must_fail git tag -d mytag'

# listing various tags with pattern matching:

@ -185,7 +185,7 @@ cba @@ -185,7 +185,7 @@ cba
EOF
test_expect_success \
'listing tags with substring as pattern must print those matching' '
git-tag -l "*a*" > actual &&
git tag -l "*a*" > actual &&
test_cmp expect actual
'

@ -195,7 +195,7 @@ v1.0.1 @@ -195,7 +195,7 @@ v1.0.1
EOF
test_expect_success \
'listing tags with a suffix as pattern must print those matching' '
git-tag -l "*.1" > actual &&
git tag -l "*.1" > actual &&
test_cmp expect actual
'

@ -205,7 +205,7 @@ t211 @@ -205,7 +205,7 @@ t211
EOF
test_expect_success \
'listing tags with a prefix as pattern must print those matching' '
git-tag -l "t21*" > actual &&
git tag -l "t21*" > actual &&
test_cmp expect actual
'

@ -214,7 +214,7 @@ a1 @@ -214,7 +214,7 @@ a1
EOF
test_expect_success \
'listing tags using a name as pattern must print that one matching' '
git-tag -l a1 > actual &&
git tag -l a1 > actual &&
test_cmp expect actual
'

@ -223,7 +223,7 @@ v1.0 @@ -223,7 +223,7 @@ v1.0
EOF
test_expect_success \
'listing tags using a name as pattern must print that one matching' '
git-tag -l v1.0 > actual &&
git tag -l v1.0 > actual &&
test_cmp expect actual
'

@ -233,14 +233,14 @@ v1.1.3 @@ -233,14 +233,14 @@ v1.1.3
EOF
test_expect_success \
'listing tags with ? in the pattern should print those matching' '
git-tag -l "v1.?.?" > actual &&
git tag -l "v1.?.?" > actual &&
test_cmp expect actual
'

>expect
test_expect_success \
'listing tags using v.* should print nothing because none have v.' '
git-tag -l "v.*" > actual &&
git tag -l "v.*" > actual &&
test_cmp expect actual
'

@ -252,7 +252,7 @@ v1.1.3 @@ -252,7 +252,7 @@ v1.1.3
EOF
test_expect_success \
'listing tags using v* should print only those having v' '
git-tag -l "v*" > actual &&
git tag -l "v*" > actual &&
test_cmp expect actual
'

@ -260,21 +260,21 @@ test_expect_success \ @@ -260,21 +260,21 @@ test_expect_success \

test_expect_success \
'a non-annotated tag created without parameters should point to HEAD' '
git-tag non-annotated-tag &&
git tag non-annotated-tag &&
test $(git cat-file -t non-annotated-tag) = commit &&
test $(git rev-parse non-annotated-tag) = $(git rev-parse HEAD)
'

test_expect_success 'trying to verify an unknown tag should fail' \
'test_must_fail git-tag -v unknown-tag'
'test_must_fail git tag -v unknown-tag'

test_expect_success \
'trying to verify a non-annotated and non-signed tag should fail' \
'test_must_fail git-tag -v non-annotated-tag'
'test_must_fail git tag -v non-annotated-tag'

test_expect_success \
'trying to verify many non-annotated or unknown tags, should fail' \
'test_must_fail git-tag -v unknown-tag1 non-annotated-tag unknown-tag2'
'test_must_fail git tag -v unknown-tag1 non-annotated-tag unknown-tag2'

# creating annotated tags:

@ -300,7 +300,7 @@ get_tag_header annotated-tag $commit commit $time >expect @@ -300,7 +300,7 @@ get_tag_header annotated-tag $commit commit $time >expect
echo "A message" >>expect
test_expect_success \
'creating an annotated tag with -m message should succeed' '
git-tag -m "A message" annotated-tag &&
git tag -m "A message" annotated-tag &&
get_tag_msg annotated-tag >actual &&
test_cmp expect actual
'
@ -313,7 +313,7 @@ get_tag_header file-annotated-tag $commit commit $time >expect @@ -313,7 +313,7 @@ get_tag_header file-annotated-tag $commit commit $time >expect
cat msgfile >>expect
test_expect_success \
'creating an annotated tag with -F messagefile should succeed' '
git-tag -F msgfile file-annotated-tag &&
git tag -F msgfile file-annotated-tag &&
get_tag_msg file-annotated-tag >actual &&
test_cmp expect actual
'
@ -325,7 +325,7 @@ EOF @@ -325,7 +325,7 @@ EOF
get_tag_header stdin-annotated-tag $commit commit $time >expect
cat inputmsg >>expect
test_expect_success 'creating an annotated tag with -F - should succeed' '
git-tag -F - stdin-annotated-tag <inputmsg &&
git tag -F - stdin-annotated-tag <inputmsg &&
get_tag_msg stdin-annotated-tag >actual &&
test_cmp expect actual
'
@ -334,7 +334,7 @@ test_expect_success \ @@ -334,7 +334,7 @@ test_expect_success \
'trying to create a tag with a non-existing -F file should fail' '
! test -f nonexistingfile &&
! tag_exists notag &&
test_must_fail git-tag -F nonexistingfile notag &&
test_must_fail git tag -F nonexistingfile notag &&
! tag_exists notag
'

@ -343,11 +343,11 @@ test_expect_success \ @@ -343,11 +343,11 @@ test_expect_success \
echo "message file 1" >msgfile1 &&
echo "message file 2" >msgfile2 &&
! tag_exists msgtag &&
test_must_fail git-tag -m "message 1" -F msgfile1 msgtag &&
test_must_fail git tag -m "message 1" -F msgfile1 msgtag &&
! tag_exists msgtag &&
test_must_fail git-tag -F msgfile1 -m "message 1" msgtag &&
test_must_fail git tag -F msgfile1 -m "message 1" msgtag &&
! tag_exists msgtag &&
test_must_fail git-tag -m "message 1" -F msgfile1 \
test_must_fail git tag -m "message 1" -F msgfile1 \
-m "message 2" msgtag &&
! tag_exists msgtag
'
@ -357,7 +357,7 @@ test_expect_success \ @@ -357,7 +357,7 @@ test_expect_success \
get_tag_header empty-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with an empty -m message should succeed' '
git-tag -m "" empty-annotated-tag &&
git tag -m "" empty-annotated-tag &&
get_tag_msg empty-annotated-tag >actual &&
test_cmp expect actual
'
@ -366,7 +366,7 @@ test_expect_success \ @@ -366,7 +366,7 @@ test_expect_success \
get_tag_header emptyfile-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with an empty -F messagefile should succeed' '
git-tag -F emptyfile emptyfile-annotated-tag &&
git tag -F emptyfile emptyfile-annotated-tag &&
get_tag_msg emptyfile-annotated-tag >actual &&
test_cmp expect actual
'
@ -387,7 +387,7 @@ Trailing blank lines @@ -387,7 +387,7 @@ Trailing blank lines
EOF
test_expect_success \
'extra blanks in the message for an annotated tag should be removed' '
git-tag -F blanksfile blanks-annotated-tag &&
git tag -F blanksfile blanks-annotated-tag &&
get_tag_msg blanks-annotated-tag >actual &&
test_cmp expect actual
'
@ -395,7 +395,7 @@ test_expect_success \ @@ -395,7 +395,7 @@ test_expect_success \
get_tag_header blank-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with blank -m message with spaces should succeed' '
git-tag -m " " blank-annotated-tag &&
git tag -m " " blank-annotated-tag &&
get_tag_msg blank-annotated-tag >actual &&
test_cmp expect actual
'
@ -406,7 +406,7 @@ echo ' ' >>blankfile @@ -406,7 +406,7 @@ echo ' ' >>blankfile
get_tag_header blankfile-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with blank -F messagefile with spaces should succeed' '
git-tag -F blankfile blankfile-annotated-tag &&
git tag -F blankfile blankfile-annotated-tag &&
get_tag_msg blankfile-annotated-tag >actual &&
test_cmp expect actual
'
@ -415,7 +415,7 @@ printf ' ' >blanknonlfile @@ -415,7 +415,7 @@ printf ' ' >blanknonlfile
get_tag_header blanknonlfile-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with -F file of spaces and no newline should succeed' '
git-tag -F blanknonlfile blanknonlfile-annotated-tag &&
git tag -F blanknonlfile blanknonlfile-annotated-tag &&
get_tag_msg blanknonlfile-annotated-tag >actual &&
test_cmp expect actual
'
@ -450,7 +450,7 @@ Last line. @@ -450,7 +450,7 @@ Last line.
EOF
test_expect_success \
'creating a tag using a -F messagefile with #comments should succeed' '
git-tag -F commentsfile comments-annotated-tag &&
git tag -F commentsfile comments-annotated-tag &&
get_tag_msg comments-annotated-tag >actual &&
test_cmp expect actual
'
@ -458,7 +458,7 @@ test_expect_success \ @@ -458,7 +458,7 @@ test_expect_success \
get_tag_header comment-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with a #comment in the -m message should succeed' '
git-tag -m "#comment" comment-annotated-tag &&
git tag -m "#comment" comment-annotated-tag &&
get_tag_msg comment-annotated-tag >actual &&
test_cmp expect actual
'
@ -469,7 +469,7 @@ echo '####' >>commentfile @@ -469,7 +469,7 @@ echo '####' >>commentfile
get_tag_header commentfile-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with #comments in the -F messagefile should succeed' '
git-tag -F commentfile commentfile-annotated-tag &&
git tag -F commentfile commentfile-annotated-tag &&
get_tag_msg commentfile-annotated-tag >actual &&
test_cmp expect actual
'
@ -478,7 +478,7 @@ printf '#comment' >commentnonlfile @@ -478,7 +478,7 @@ printf '#comment' >commentnonlfile
get_tag_header commentnonlfile-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with a file of #comment and no newline should succeed' '
git-tag -F commentnonlfile commentnonlfile-annotated-tag &&
git tag -F commentnonlfile commentnonlfile-annotated-tag &&
get_tag_msg commentnonlfile-annotated-tag >actual &&
test_cmp expect actual
'
@ -487,51 +487,51 @@ test_expect_success \ @@ -487,51 +487,51 @@ test_expect_success \

test_expect_success \
'listing the one-line message of a non-signed tag should succeed' '
git-tag -m "A msg" tag-one-line &&
git tag -m "A msg" tag-one-line &&

echo "tag-one-line" >expect &&
git-tag -l | grep "^tag-one-line" >actual &&
git tag -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
git-tag -n0 -l | grep "^tag-one-line" >actual &&
git tag -n0 -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
git-tag -n0 -l tag-one-line >actual &&
git tag -n0 -l tag-one-line >actual &&
test_cmp expect actual &&

echo "tag-one-line A msg" >expect &&
git-tag -n1 -l | grep "^tag-one-line" >actual &&
git tag -n1 -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
git-tag -n -l | grep "^tag-one-line" >actual &&
git tag -n -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
git-tag -n1 -l tag-one-line >actual &&
git tag -n1 -l tag-one-line >actual &&
test_cmp expect actual &&
git-tag -n2 -l tag-one-line >actual &&
git tag -n2 -l tag-one-line >actual &&
test_cmp expect actual &&
git-tag -n999 -l tag-one-line >actual &&
git tag -n999 -l tag-one-line >actual &&
test_cmp expect actual
'

test_expect_success \
'listing the zero-lines message of a non-signed tag should succeed' '
git-tag -m "" tag-zero-lines &&
git tag -m "" tag-zero-lines &&

echo "tag-zero-lines" >expect &&
git-tag -l | grep "^tag-zero-lines" >actual &&
git tag -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
git-tag -n0 -l | grep "^tag-zero-lines" >actual &&
git tag -n0 -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
git-tag -n0 -l tag-zero-lines >actual &&
git tag -n0 -l tag-zero-lines >actual &&
test_cmp expect actual &&

echo "tag-zero-lines " >expect &&
git-tag -n1 -l | grep "^tag-zero-lines" >actual &&
git tag -n1 -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
git-tag -n -l | grep "^tag-zero-lines" >actual &&
git tag -n -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
git-tag -n1 -l tag-zero-lines >actual &&
git tag -n1 -l tag-zero-lines >actual &&
test_cmp expect actual &&
git-tag -n2 -l tag-zero-lines >actual &&
git tag -n2 -l tag-zero-lines >actual &&
test_cmp expect actual &&
git-tag -n999 -l tag-zero-lines >actual &&
git tag -n999 -l tag-zero-lines >actual &&
test_cmp expect actual
'

@ -540,42 +540,42 @@ echo 'tag line two' >>annotagmsg @@ -540,42 +540,42 @@ echo 'tag line two' >>annotagmsg
echo 'tag line three' >>annotagmsg
test_expect_success \
'listing many message lines of a non-signed tag should succeed' '
git-tag -F annotagmsg tag-lines &&
git tag -F annotagmsg tag-lines &&

echo "tag-lines" >expect &&
git-tag -l | grep "^tag-lines" >actual &&
git tag -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
git-tag -n0 -l | grep "^tag-lines" >actual &&
git tag -n0 -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
git-tag -n0 -l tag-lines >actual &&
git tag -n0 -l tag-lines >actual &&
test_cmp expect actual &&

echo "tag-lines tag line one" >expect &&
git-tag -n1 -l | grep "^tag-lines" >actual &&
git tag -n1 -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
git-tag -n -l | grep "^tag-lines" >actual &&
git tag -n -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
git-tag -n1 -l tag-lines >actual &&
git tag -n1 -l tag-lines >actual &&
test_cmp expect actual &&

echo " tag line two" >>expect &&
git-tag -n2 -l | grep "^ *tag.line" >actual &&
git tag -n2 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
git-tag -n2 -l tag-lines >actual &&
git tag -n2 -l tag-lines >actual &&
test_cmp expect actual &&

echo " tag line three" >>expect &&
git-tag -n3 -l | grep "^ *tag.line" >actual &&
git tag -n3 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
git-tag -n3 -l tag-lines >actual &&
git tag -n3 -l tag-lines >actual &&
test_cmp expect actual &&
git-tag -n4 -l | grep "^ *tag.line" >actual &&
git tag -n4 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
git-tag -n4 -l tag-lines >actual &&
git tag -n4 -l tag-lines >actual &&
test_cmp expect actual &&
git-tag -n99 -l | grep "^ *tag.line" >actual &&
git tag -n99 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
git-tag -n99 -l tag-lines >actual &&
git tag -n99 -l tag-lines >actual &&
test_cmp expect actual
'

@ -592,19 +592,19 @@ fi @@ -592,19 +592,19 @@ fi
test_expect_success \
'trying to verify an annotated non-signed tag should fail' '
tag_exists annotated-tag &&
test_must_fail git-tag -v annotated-tag
test_must_fail git tag -v annotated-tag
'

test_expect_success \
'trying to verify a file-annotated non-signed tag should fail' '
tag_exists file-annotated-tag &&
test_must_fail git-tag -v file-annotated-tag
test_must_fail git tag -v file-annotated-tag
'

test_expect_success \
'trying to verify two annotated non-signed tags should fail' '
tag_exists annotated-tag file-annotated-tag &&
test_must_fail git-tag -v annotated-tag file-annotated-tag
test_must_fail git tag -v annotated-tag file-annotated-tag
'

# creating and verifying signed tags:
@ -634,7 +634,7 @@ get_tag_header signed-tag $commit commit $time >expect @@ -634,7 +634,7 @@ get_tag_header signed-tag $commit commit $time >expect
echo 'A signed tag message' >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success 'creating a signed tag with -m message should succeed' '
git-tag -s -m "A signed tag message" signed-tag &&
git tag -s -m "A signed tag message" signed-tag &&
get_tag_msg signed-tag >actual &&
test_cmp expect actual
'
@ -675,7 +675,7 @@ get_tag_header implied-sign $commit commit $time >expect @@ -675,7 +675,7 @@ get_tag_header implied-sign $commit commit $time >expect
./fakeeditor >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success '-u implies signed tag' '
GIT_EDITOR=./fakeeditor git-tag -u CDDE430D implied-sign &&
GIT_EDITOR=./fakeeditor git tag -u CDDE430D implied-sign &&
get_tag_msg implied-sign >actual &&
test_cmp expect actual
'
@ -689,7 +689,7 @@ cat sigmsgfile >>expect @@ -689,7 +689,7 @@ cat sigmsgfile >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with -F messagefile should succeed' '
git-tag -s -F sigmsgfile file-signed-tag &&
git tag -s -F sigmsgfile file-signed-tag &&
get_tag_msg file-signed-tag >actual &&
test_cmp expect actual
'
@ -702,7 +702,7 @@ get_tag_header stdin-signed-tag $commit commit $time >expect @@ -702,7 +702,7 @@ get_tag_header stdin-signed-tag $commit commit $time >expect
cat siginputmsg >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success 'creating a signed tag with -F - should succeed' '
git-tag -s -F - stdin-signed-tag <siginputmsg &&
git tag -s -F - stdin-signed-tag <siginputmsg &&
get_tag_msg stdin-signed-tag >actual &&
test_cmp expect actual
'
@ -711,7 +711,7 @@ get_tag_header implied-annotate $commit commit $time >expect @@ -711,7 +711,7 @@ get_tag_header implied-annotate $commit commit $time >expect
./fakeeditor >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success '-s implies annotated tag' '
GIT_EDITOR=./fakeeditor git-tag -s implied-annotate &&
GIT_EDITOR=./fakeeditor git tag -s implied-annotate &&
get_tag_msg implied-annotate >actual &&
test_cmp expect actual
'
@ -720,23 +720,23 @@ test_expect_success \ @@ -720,23 +720,23 @@ test_expect_success \
'trying to create a signed tag with non-existing -F file should fail' '
! test -f nonexistingfile &&
! tag_exists nosigtag &&
test_must_fail git-tag -s -F nonexistingfile nosigtag &&
test_must_fail git tag -s -F nonexistingfile nosigtag &&
! tag_exists nosigtag
'

test_expect_success 'verifying a signed tag should succeed' \
'git-tag -v signed-tag'
'git tag -v signed-tag'

test_expect_success 'verifying two signed tags in one command should succeed' \
'git-tag -v signed-tag file-signed-tag'
'git tag -v signed-tag file-signed-tag'

test_expect_success \
'verifying many signed and non-signed tags should fail' '
test_must_fail git-tag -v signed-tag annotated-tag &&
test_must_fail git-tag -v file-annotated-tag file-signed-tag &&
test_must_fail git-tag -v annotated-tag \
test_must_fail git tag -v signed-tag annotated-tag &&
test_must_fail git tag -v file-annotated-tag file-signed-tag &&
test_must_fail git tag -v annotated-tag \
file-signed-tag file-annotated-tag &&
test_must_fail git-tag -v signed-tag annotated-tag file-signed-tag
test_must_fail git tag -v signed-tag annotated-tag file-signed-tag
'

test_expect_success 'verifying a forged tag should fail' '
@ -744,7 +744,7 @@ test_expect_success 'verifying a forged tag should fail' ' @@ -744,7 +744,7 @@ test_expect_success 'verifying a forged tag should fail' '
sed -e "s/signed-tag/forged-tag/" |
git mktag) &&
git tag forged-tag $forged &&
test_must_fail git-tag -v forged-tag
test_must_fail git tag -v forged-tag
'

# blank and empty messages for signed tags:
@ -753,10 +753,10 @@ get_tag_header empty-signed-tag $commit commit $time >expect @@ -753,10 +753,10 @@ get_tag_header empty-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with an empty -m message should succeed' '
git-tag -s -m "" empty-signed-tag &&
git tag -s -m "" empty-signed-tag &&
get_tag_msg empty-signed-tag >actual &&
test_cmp expect actual &&
git-tag -v empty-signed-tag
git tag -v empty-signed-tag
'

>sigemptyfile
@ -764,10 +764,10 @@ get_tag_header emptyfile-signed-tag $commit commit $time >expect @@ -764,10 +764,10 @@ get_tag_header emptyfile-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with an empty -F messagefile should succeed' '
git-tag -s -F sigemptyfile emptyfile-signed-tag &&
git tag -s -F sigemptyfile emptyfile-signed-tag &&
get_tag_msg emptyfile-signed-tag >actual &&
test_cmp expect actual &&
git-tag -v emptyfile-signed-tag
git tag -v emptyfile-signed-tag
'

printf '\n\n \n\t\nLeading blank lines\n' > sigblanksfile
@ -787,20 +787,20 @@ EOF @@ -787,20 +787,20 @@ EOF
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'extra blanks in the message for a signed tag should be removed' '
git-tag -s -F sigblanksfile blanks-signed-tag &&
git tag -s -F sigblanksfile blanks-signed-tag &&
get_tag_msg blanks-signed-tag >actual &&
test_cmp expect actual &&
git-tag -v blanks-signed-tag
git tag -v blanks-signed-tag
'

get_tag_header blank-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with a blank -m message should succeed' '
git-tag -s -m " " blank-signed-tag &&
git tag -s -m " " blank-signed-tag &&
get_tag_msg blank-signed-tag >actual &&
test_cmp expect actual &&
git-tag -v blank-signed-tag
git tag -v blank-signed-tag
'

echo ' ' >sigblankfile
@ -810,10 +810,10 @@ get_tag_header blankfile-signed-tag $commit commit $time >expect @@ -810,10 +810,10 @@ get_tag_header blankfile-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with blank -F file with spaces should succeed' '
git-tag -s -F sigblankfile blankfile-signed-tag &&
git tag -s -F sigblankfile blankfile-signed-tag &&
get_tag_msg blankfile-signed-tag >actual &&
test_cmp expect actual &&
git-tag -v blankfile-signed-tag
git tag -v blankfile-signed-tag
'

printf ' ' >sigblanknonlfile
@ -821,10 +821,10 @@ get_tag_header blanknonlfile-signed-tag $commit commit $time >expect @@ -821,10 +821,10 @@ get_tag_header blanknonlfile-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with spaces and no newline should succeed' '
git-tag -s -F sigblanknonlfile blanknonlfile-signed-tag &&
git tag -s -F sigblanknonlfile blanknonlfile-signed-tag &&
get_tag_msg blanknonlfile-signed-tag >actual &&
test_cmp expect actual &&
git-tag -v signed-tag
git tag -v signed-tag
'

# messages with commented lines for signed tags:
@ -858,20 +858,20 @@ EOF @@ -858,20 +858,20 @@ EOF
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with a -F file with #comments should succeed' '
git-tag -s -F sigcommentsfile comments-signed-tag &&
git tag -s -F sigcommentsfile comments-signed-tag &&
get_tag_msg comments-signed-tag >actual &&
test_cmp expect actual &&
git-tag -v comments-signed-tag
git tag -v comments-signed-tag
'

get_tag_header comment-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with #commented -m message should succeed' '
git-tag -s -m "#comment" comment-signed-tag &&
git tag -s -m "#comment" comment-signed-tag &&
get_tag_msg comment-signed-tag >actual &&
test_cmp expect actual &&
git-tag -v comment-signed-tag
git tag -v comment-signed-tag
'

echo '#comment' >sigcommentfile
@ -881,10 +881,10 @@ get_tag_header commentfile-signed-tag $commit commit $time >expect @@ -881,10 +881,10 @@ get_tag_header commentfile-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with #commented -F messagefile should succeed' '
git-tag -s -F sigcommentfile commentfile-signed-tag &&
git tag -s -F sigcommentfile commentfile-signed-tag &&
get_tag_msg commentfile-signed-tag >actual &&
test_cmp expect actual &&
git-tag -v commentfile-signed-tag
git tag -v commentfile-signed-tag
'

printf '#comment' >sigcommentnonlfile
@ -892,61 +892,61 @@ get_tag_header commentnonlfile-signed-tag $commit commit $time >expect @@ -892,61 +892,61 @@ get_tag_header commentnonlfile-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with a #comment and no newline should succeed' '
git-tag -s -F sigcommentnonlfile commentnonlfile-signed-tag &&
git tag -s -F sigcommentnonlfile commentnonlfile-signed-tag &&
get_tag_msg commentnonlfile-signed-tag >actual &&
test_cmp expect actual &&
git-tag -v commentnonlfile-signed-tag
git tag -v commentnonlfile-signed-tag
'

# listing messages for signed tags:

test_expect_success \
'listing the one-line message of a signed tag should succeed' '
git-tag -s -m "A message line signed" stag-one-line &&
git tag -s -m "A message line signed" stag-one-line &&

echo "stag-one-line" >expect &&
git-tag -l | grep "^stag-one-line" >actual &&
git tag -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
git-tag -n0 -l | grep "^stag-one-line" >actual &&
git tag -n0 -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
git-tag -n0 -l stag-one-line >actual &&
git tag -n0 -l stag-one-line >actual &&
test_cmp expect actual &&

echo "stag-one-line A message line signed" >expect &&
git-tag -n1 -l | grep "^stag-one-line" >actual &&
git tag -n1 -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
git-tag -n -l | grep "^stag-one-line" >actual &&
git tag -n -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
git-tag -n1 -l stag-one-line >actual &&
git tag -n1 -l stag-one-line >actual &&
test_cmp expect actual &&
git-tag -n2 -l stag-one-line >actual &&
git tag -n2 -l stag-one-line >actual &&
test_cmp expect actual &&
git-tag -n999 -l stag-one-line >actual &&
git tag -n999 -l stag-one-line >actual &&
test_cmp expect actual
'

test_expect_success \
'listing the zero-lines message of a signed tag should succeed' '
git-tag -s -m "" stag-zero-lines &&
git tag -s -m "" stag-zero-lines &&

echo "stag-zero-lines" >expect &&
git-tag -l | grep "^stag-zero-lines" >actual &&
git tag -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
git-tag -n0 -l | grep "^stag-zero-lines" >actual &&
git tag -n0 -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
git-tag -n0 -l stag-zero-lines >actual &&
git tag -n0 -l stag-zero-lines >actual &&
test_cmp expect actual &&

echo "stag-zero-lines " >expect &&
git-tag -n1 -l | grep "^stag-zero-lines" >actual &&
git tag -n1 -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
git-tag -n -l | grep "^stag-zero-lines" >actual &&
git tag -n -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
git-tag -n1 -l stag-zero-lines >actual &&
git tag -n1 -l stag-zero-lines >actual &&
test_cmp expect actual &&
git-tag -n2 -l stag-zero-lines >actual &&
git tag -n2 -l stag-zero-lines >actual &&
test_cmp expect actual &&
git-tag -n999 -l stag-zero-lines >actual &&
git tag -n999 -l stag-zero-lines >actual &&
test_cmp expect actual
'

@ -955,42 +955,42 @@ echo 'stag line two' >>sigtagmsg @@ -955,42 +955,42 @@ echo 'stag line two' >>sigtagmsg
echo 'stag line three' >>sigtagmsg
test_expect_success \
'listing many message lines of a signed tag should succeed' '
git-tag -s -F sigtagmsg stag-lines &&
git tag -s -F sigtagmsg stag-lines &&

echo "stag-lines" >expect &&
git-tag -l | grep "^stag-lines" >actual &&
git tag -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
git-tag -n0 -l | grep "^stag-lines" >actual &&
git tag -n0 -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
git-tag -n0 -l stag-lines >actual &&
git tag -n0 -l stag-lines >actual &&
test_cmp expect actual &&

echo "stag-lines stag line one" >expect &&
git-tag -n1 -l | grep "^stag-lines" >actual &&
git tag -n1 -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
git-tag -n -l | grep "^stag-lines" >actual &&
git tag -n -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
git-tag -n1 -l stag-lines >actual &&
git tag -n1 -l stag-lines >actual &&
test_cmp expect actual &&

echo " stag line two" >>expect &&
git-tag -n2 -l | grep "^ *stag.line" >actual &&
git tag -n2 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
git-tag -n2 -l stag-lines >actual &&
git tag -n2 -l stag-lines >actual &&
test_cmp expect actual &&

echo " stag line three" >>expect &&
git-tag -n3 -l | grep "^ *stag.line" >actual &&
git tag -n3 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
git-tag -n3 -l stag-lines >actual &&
git tag -n3 -l stag-lines >actual &&
test_cmp expect actual &&
git-tag -n4 -l | grep "^ *stag.line" >actual &&
git tag -n4 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
git-tag -n4 -l stag-lines >actual &&
git tag -n4 -l stag-lines >actual &&
test_cmp expect actual &&
git-tag -n99 -l | grep "^ *stag.line" >actual &&
git tag -n99 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
git-tag -n99 -l stag-lines >actual &&
git tag -n99 -l stag-lines >actual &&
test_cmp expect actual
'

@ -1005,7 +1005,7 @@ echo "A message for a tree" >>expect @@ -1005,7 +1005,7 @@ echo "A message for a tree" >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag pointing to a tree should succeed' '
git-tag -s -m "A message for a tree" tree-signed-tag HEAD^{tree} &&
git tag -s -m "A message for a tree" tree-signed-tag HEAD^{tree} &&
get_tag_msg tree-signed-tag >actual &&
test_cmp expect actual
'
@ -1015,7 +1015,7 @@ echo "A message for a blob" >>expect @@ -1015,7 +1015,7 @@ echo "A message for a blob" >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag pointing to a blob should succeed' '
git-tag -s -m "A message for a blob" blob-signed-tag HEAD:foo &&
git tag -s -m "A message for a blob" blob-signed-tag HEAD:foo &&
get_tag_msg blob-signed-tag >actual &&
test_cmp expect actual
'
@ -1025,7 +1025,7 @@ echo "A message for another tag" >>expect @@ -1025,7 +1025,7 @@ echo "A message for another tag" >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag pointing to another tag should succeed' '
git-tag -s -m "A message for another tag" tag-signed-tag signed-tag &&
git tag -s -m "A message for another tag" tag-signed-tag signed-tag &&
get_tag_msg tag-signed-tag >actual &&
test_cmp expect actual
'
@ -1033,7 +1033,7 @@ test_expect_success \ @@ -1033,7 +1033,7 @@ test_expect_success \
# try to sign with bad user.signingkey
git config user.signingkey BobTheMouse
test_expect_success \
'git-tag -s fails if gpg is misconfigured' \
'git tag -s fails if gpg is misconfigured' \
'test_must_fail git tag -s -m tail tag-gpg-failure'
git config --unset user.signingkey

@ -1042,10 +1042,10 @@ git config --unset user.signingkey @@ -1042,10 +1042,10 @@ git config --unset user.signingkey
rm -rf gpghome
test_expect_success \
'verify signed tag fails when public key is not present' \
'test_must_fail git-tag -v signed-tag'
'test_must_fail git tag -v signed-tag'

test_expect_success \
'git-tag -a fails if tag annotation is empty' '
'git tag -a fails if tag annotation is empty' '
! (GIT_EDITOR=cat git tag -a initial-comment)
'


8
t/t7101-reset.sh

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
# Copyright (c) 2006 Shawn Pearce
#

test_description='git-reset should cull empty subdirs'
test_description='git reset should cull empty subdirs'
. ./test-lib.sh

test_expect_success \
@ -11,7 +11,7 @@ test_expect_success \ @@ -11,7 +11,7 @@ test_expect_success \
'mkdir path0 &&
cp ../../COPYING path0/COPYING &&
git add path0/COPYING &&
git-commit -m add -a'
git commit -m add -a'

test_expect_success \
'creating second files' \
@ -25,11 +25,11 @@ test_expect_success \ @@ -25,11 +25,11 @@ test_expect_success \
git add path1/COPYING &&
git add COPYING &&
git add path0/COPYING-TOO &&
git-commit -m change -a'
git commit -m change -a'

test_expect_success \
'resetting tree HEAD^' \
'git-reset --hard HEAD^'
'git reset --hard HEAD^'

test_expect_success \
'checking initial files exist after rewind' \

4
t/t7102-reset.sh

@ -3,9 +3,9 @@ @@ -3,9 +3,9 @@
# Copyright (c) 2007 Carlos Rica
#

test_description='git-reset
test_description='git reset

Documented tests for git-reset'
Documented tests for git reset'

. ./test-lib.sh


2
t/t7103-reset-bare.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description='git-reset in a bare repository'
test_description='git reset in a bare repository'
. ./test-lib.sh

test_expect_success 'setup non-bare' '

2
t/t7201-co.sh

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
# Copyright (c) 2006 Junio C Hamano
#

test_description='git-checkout tests.
test_description='git checkout tests.

Creates master, forks renamer and side branches from it.
Test switching across them.

72
t/t7300-clean.sh

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
# Copyright (c) 2007 Michael Spang
#

test_description='git-clean basic tests'
test_description='git clean basic tests'

. ./test-lib.sh

@ -16,17 +16,17 @@ test_expect_success 'setup' ' @@ -16,17 +16,17 @@ test_expect_success 'setup' '
echo build >.gitignore &&
echo \*.o >>.gitignore &&
git add . &&
git-commit -m setup &&
git commit -m setup &&
touch src/part2.c README &&
git add .

'

test_expect_success 'git-clean' '
test_expect_success 'git clean' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean &&
git clean &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -39,11 +39,11 @@ test_expect_success 'git-clean' ' @@ -39,11 +39,11 @@ test_expect_success 'git-clean' '

'

test_expect_success 'git-clean src/' '
test_expect_success 'git clean src/' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean src/ &&
git clean src/ &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -56,11 +56,11 @@ test_expect_success 'git-clean src/' ' @@ -56,11 +56,11 @@ test_expect_success 'git-clean src/' '

'

test_expect_success 'git-clean src/ src/' '
test_expect_success 'git clean src/ src/' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean src/ src/ &&
git clean src/ src/ &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -73,11 +73,11 @@ test_expect_success 'git-clean src/ src/' ' @@ -73,11 +73,11 @@ test_expect_success 'git-clean src/ src/' '

'

test_expect_success 'git-clean with prefix' '
test_expect_success 'git clean with prefix' '

mkdir -p build docs src/test &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so src/test/1.c &&
(cd src/ && git-clean) &&
(cd src/ && git clean) &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -91,7 +91,7 @@ test_expect_success 'git-clean with prefix' ' @@ -91,7 +91,7 @@ test_expect_success 'git-clean with prefix' '

'

test_expect_success 'git-clean with relative prefix' '
test_expect_success 'git clean with relative prefix' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
@ -106,7 +106,7 @@ test_expect_success 'git-clean with relative prefix' ' @@ -106,7 +106,7 @@ test_expect_success 'git-clean with relative prefix' '
}
'

test_expect_success 'git-clean with absolute path' '
test_expect_success 'git clean with absolute path' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
@ -121,7 +121,7 @@ test_expect_success 'git-clean with absolute path' ' @@ -121,7 +121,7 @@ test_expect_success 'git-clean with absolute path' '
}
'

test_expect_success 'git-clean with out of work tree relative path' '
test_expect_success 'git clean with out of work tree relative path' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
@ -131,7 +131,7 @@ test_expect_success 'git-clean with out of work tree relative path' ' @@ -131,7 +131,7 @@ test_expect_success 'git-clean with out of work tree relative path' '
)
'

test_expect_success 'git-clean with out of work tree absolute path' '
test_expect_success 'git clean with out of work tree absolute path' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
@ -142,11 +142,11 @@ test_expect_success 'git-clean with out of work tree absolute path' ' @@ -142,11 +142,11 @@ test_expect_success 'git-clean with out of work tree absolute path' '
)
'

test_expect_success 'git-clean -d with prefix and path' '
test_expect_success 'git clean -d with prefix and path' '

mkdir -p build docs src/feature &&
touch a.out src/part3.c src/feature/file.c docs/manual.txt obj.o build/lib.so &&
(cd src/ && git-clean -d feature/) &&
(cd src/ && git clean -d feature/) &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -160,12 +160,12 @@ test_expect_success 'git-clean -d with prefix and path' ' @@ -160,12 +160,12 @@ test_expect_success 'git-clean -d with prefix and path' '

'

test_expect_success 'git-clean symbolic link' '
test_expect_success 'git clean symbolic link' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
ln -s docs/manual.txt src/part4.c
git-clean &&
git clean &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -179,10 +179,10 @@ test_expect_success 'git-clean symbolic link' ' @@ -179,10 +179,10 @@ test_expect_success 'git-clean symbolic link' '

'

test_expect_success 'git-clean with wildcard' '
test_expect_success 'git clean with wildcard' '

touch a.clean b.clean other.c &&
git-clean "*.clean" &&
git clean "*.clean" &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -193,11 +193,11 @@ test_expect_success 'git-clean with wildcard' ' @@ -193,11 +193,11 @@ test_expect_success 'git-clean with wildcard' '

'

test_expect_success 'git-clean -n' '
test_expect_success 'git clean -n' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -n &&
git clean -n &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -210,11 +210,11 @@ test_expect_success 'git-clean -n' ' @@ -210,11 +210,11 @@ test_expect_success 'git-clean -n' '

'

test_expect_success 'git-clean -d' '
test_expect_success 'git clean -d' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -d &&
git clean -d &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -227,11 +227,11 @@ test_expect_success 'git-clean -d' ' @@ -227,11 +227,11 @@ test_expect_success 'git-clean -d' '

'

test_expect_success 'git-clean -d src/ examples/' '
test_expect_success 'git clean -d src/ examples/' '

mkdir -p build docs examples &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so examples/1.c &&
git-clean -d src/ examples/ &&
git clean -d src/ examples/ &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -245,11 +245,11 @@ test_expect_success 'git-clean -d src/ examples/' ' @@ -245,11 +245,11 @@ test_expect_success 'git-clean -d src/ examples/' '

'

test_expect_success 'git-clean -x' '
test_expect_success 'git clean -x' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -x &&
git clean -x &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -262,11 +262,11 @@ test_expect_success 'git-clean -x' ' @@ -262,11 +262,11 @@ test_expect_success 'git-clean -x' '

'

test_expect_success 'git-clean -d -x' '
test_expect_success 'git clean -d -x' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -d -x &&
git clean -d -x &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -279,11 +279,11 @@ test_expect_success 'git-clean -d -x' ' @@ -279,11 +279,11 @@ test_expect_success 'git-clean -d -x' '

'

test_expect_success 'git-clean -X' '
test_expect_success 'git clean -X' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -X &&
git clean -X &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -296,11 +296,11 @@ test_expect_success 'git-clean -X' ' @@ -296,11 +296,11 @@ test_expect_success 'git-clean -X' '

'

test_expect_success 'git-clean -d -X' '
test_expect_success 'git clean -d -X' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -d -X &&
git clean -d -X &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -331,7 +331,7 @@ test_expect_success 'clean.requireForce and -n' ' @@ -331,7 +331,7 @@ test_expect_success 'clean.requireForce and -n' '

mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -n &&
git clean -n &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@ -346,7 +346,7 @@ test_expect_success 'clean.requireForce and -n' ' @@ -346,7 +346,7 @@ test_expect_success 'clean.requireForce and -n' '

test_expect_success 'clean.requireForce and -f' '

git-clean -f &&
git clean -f &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&

48
t/t7400-submodule-basic.sh

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
test_description='Basic porcelain support for submodules

This test tries to verify basic sanity of the init, update and status
subcommands of git-submodule.
subcommands of git submodule.
'

. ./test-lib.sh
@ -22,16 +22,16 @@ subcommands of git-submodule. @@ -22,16 +22,16 @@ subcommands of git-submodule.
#
test_expect_success 'Prepare submodule testing' '
: > t &&
git-add t &&
git-commit -m "initial commit" &&
git add t &&
git commit -m "initial commit" &&
git branch initial HEAD &&
mkdir init &&
cd init &&
git init &&
echo a >a &&
git add a &&
git-commit -m "submodule commit 1" &&
git-tag -a -m "rev-1" rev-1 &&
git commit -m "submodule commit 1" &&
git tag -a -m "rev-1" rev-1 &&
rev1=$(git rev-parse HEAD) &&
if test -z "$rev1"
then
@ -42,13 +42,13 @@ test_expect_success 'Prepare submodule testing' ' @@ -42,13 +42,13 @@ test_expect_success 'Prepare submodule testing' '
echo a >a &&
echo z >z &&
git add a init z &&
git-commit -m "super commit 1" &&
git commit -m "super commit 1" &&
mv init .subrepo &&
GIT_CONFIG=.gitmodules git config submodule.example.url git://example.com/init.git
'

test_expect_success 'status should fail for unmapped paths' '
if git-submodule status
if git submodule status
then
echo "[OOPS] submodule status succeeded"
false
@ -60,16 +60,16 @@ test_expect_success 'status should fail for unmapped paths' ' @@ -60,16 +60,16 @@ test_expect_success 'status should fail for unmapped paths' '
'

test_expect_success 'status should only print one line' '
lines=$(git-submodule status | wc -l) &&
lines=$(git submodule status | wc -l) &&
test $lines = 1
'

test_expect_success 'status should initially be "missing"' '
git-submodule status | grep "^-$rev1"
git submodule status | grep "^-$rev1"
'

test_expect_success 'init should register submodule url in .git/config' '
git-submodule init &&
git submodule init &&
url=$(git config submodule.example.url) &&
if test "$url" != "git://example.com/init.git"
then
@ -84,7 +84,7 @@ test_expect_success 'init should register submodule url in .git/config' ' @@ -84,7 +84,7 @@ test_expect_success 'init should register submodule url in .git/config' '

test_expect_success 'update should fail when path is used by a file' '
echo "hello" >init &&
if git-submodule update
if git submodule update
then
echo "[OOPS] update should have failed"
false
@ -100,7 +100,7 @@ test_expect_success 'update should fail when path is used by a file' ' @@ -100,7 +100,7 @@ test_expect_success 'update should fail when path is used by a file' '
test_expect_success 'update should fail when path is used by a nonempty directory' '
mkdir init &&
echo "hello" >init/a &&
if git-submodule update
if git submodule update
then
echo "[OOPS] update should have failed"
false
@ -116,7 +116,7 @@ test_expect_success 'update should fail when path is used by a nonempty director @@ -116,7 +116,7 @@ test_expect_success 'update should fail when path is used by a nonempty director
test_expect_success 'update should work when path is an empty dir' '
rm -rf init &&
mkdir init &&
git-submodule update &&
git submodule update &&
head=$(cd init && git rev-parse HEAD) &&
if test -z "$head"
then
@ -130,14 +130,14 @@ test_expect_success 'update should work when path is an empty dir' ' @@ -130,14 +130,14 @@ test_expect_success 'update should work when path is an empty dir' '
'

test_expect_success 'status should be "up-to-date" after update' '
git-submodule status | grep "^ $rev1"
git submodule status | grep "^ $rev1"
'

test_expect_success 'status should be "modified" after submodule commit' '
cd init &&
echo b >b &&
git add b &&
git-commit -m "submodule commit 2" &&
git commit -m "submodule commit 2" &&
rev2=$(git rev-parse HEAD) &&
cd .. &&
if test -z "$rev2"
@ -145,19 +145,19 @@ test_expect_success 'status should be "modified" after submodule commit' ' @@ -145,19 +145,19 @@ test_expect_success 'status should be "modified" after submodule commit' '
echo "[OOPS] submodule git rev-parse returned nothing"
false
fi &&
git-submodule status | grep "^+$rev2"
git submodule status | grep "^+$rev2"
'

test_expect_success 'the --cached sha1 should be rev1' '
git-submodule --cached status | grep "^+$rev1"
git submodule --cached status | grep "^+$rev1"
'

test_expect_success 'git diff should report the SHA1 of the new submodule commit' '
git-diff | grep "^+Subproject commit $rev2"
git diff | grep "^+Subproject commit $rev2"
'

test_expect_success 'update should checkout rev1' '
git-submodule update init &&
git submodule update init &&
head=$(cd init && git rev-parse HEAD) &&
if test -z "$head"
then
@ -171,12 +171,12 @@ test_expect_success 'update should checkout rev1' ' @@ -171,12 +171,12 @@ test_expect_success 'update should checkout rev1' '
'

test_expect_success 'status should be "up-to-date" after update' '
git-submodule status | grep "^ $rev1"
git submodule status | grep "^ $rev1"
'

test_expect_success 'checkout superproject with subproject already present' '
git-checkout initial &&
git-checkout master
git checkout initial &&
git checkout master
'

test_expect_success 'apply submodule diff' '
@ -188,8 +188,8 @@ test_expect_success 'apply submodule diff' ' @@ -188,8 +188,8 @@ test_expect_success 'apply submodule diff' '
git commit -m "change subproject"
) &&
git update-index --add init &&
git-commit -m "change init" &&
git-format-patch -1 --stdout >P.diff &&
git commit -m "change init" &&
git format-patch -1 --stdout >P.diff &&
git checkout second &&
git apply --index P.diff &&
D=$(git diff --cached master) &&

2
t/t7401-submodule-summary.sh

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@

test_description='Summary support for submodules

This test tries to verify the sanity of summary subcommand of git-submodule.
This test tries to verify the sanity of summary subcommand of git submodule.
'

. ./test-lib.sh

2
t/t7500-commit.sh

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
# Copyright (c) 2007 Steven Grimm
#

test_description='git-commit
test_description='git commit

Tests for selected commit options.'


48
t/t7501-commit.sh

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
# FIXME: Test the various index usages, -i and -o, test reflog,
# signoff

test_description='git-commit'
test_description='git commit'
. ./test-lib.sh

test_tick
@ -14,52 +14,52 @@ test_tick @@ -14,52 +14,52 @@ test_tick
test_expect_success \
"initial status" \
"echo 'bongo bongo' >file &&
git-add file && \
git-status | grep 'Initial commit'"
git add file && \
git status | grep 'Initial commit'"

test_expect_success \
"fail initial amend" \
"test_must_fail git-commit --amend"
"test_must_fail git commit --amend"

test_expect_success \
"initial commit" \
"git-commit -m initial"
"git commit -m initial"

test_expect_success \
"invalid options 1" \
"test_must_fail git-commit -m foo -m bar -F file"
"test_must_fail git commit -m foo -m bar -F file"

test_expect_success \
"invalid options 2" \
"test_must_fail git-commit -C HEAD -m illegal"
"test_must_fail git commit -C HEAD -m illegal"

test_expect_success \
"using paths with -a" \
"echo King of the bongo >file &&
test_must_fail git-commit -m foo -a file"
test_must_fail git commit -m foo -a file"

test_expect_success \
"using paths with --interactive" \
"echo bong-o-bong >file &&
! (echo 7 | git-commit -m foo --interactive file)"
! (echo 7 | git commit -m foo --interactive file)"

test_expect_success \
"using invalid commit with -C" \
"test_must_fail git-commit -C bogus"
"test_must_fail git commit -C bogus"

test_expect_success \
"testing nothing to commit" \
"test_must_fail git-commit -m initial"
"test_must_fail git commit -m initial"

test_expect_success \
"next commit" \
"echo 'bongo bongo bongo' >file \
git-commit -m next -a"
git commit -m next -a"

test_expect_success \
"commit message from non-existing file" \
"echo 'more bongo: bongo bongo bongo bongo' >file && \
test_must_fail git-commit -F gah -a"
test_must_fail git commit -F gah -a"

# Empty except stray tabs and spaces on a few lines.
sed -e 's/@$//' >msg <<EOF
@ -70,12 +70,12 @@ Signed-off-by: hula @@ -70,12 +70,12 @@ Signed-off-by: hula
EOF
test_expect_success \
"empty commit message" \
"test_must_fail git-commit -F msg -a"
"test_must_fail git commit -F msg -a"

test_expect_success \
"commit message from file" \
"echo 'this is the commit message, coming from a file' >msg && \
git-commit -F msg -a"
git commit -F msg -a"

cat >editor <<\EOF
#!/bin/sh
@ -86,16 +86,16 @@ chmod 755 editor @@ -86,16 +86,16 @@ chmod 755 editor

test_expect_success \
"amend commit" \
"VISUAL=./editor git-commit --amend"
"VISUAL=./editor git commit --amend"

test_expect_success \
"passing -m and -F" \
"echo 'enough with the bongos' >file && \
test_must_fail git-commit -F msg -m amending ."
test_must_fail git commit -F msg -m amending ."

test_expect_success \
"using message from other commit" \
"git-commit -C HEAD^ ."
"git commit -C HEAD^ ."

cat >editor <<\EOF
#!/bin/sh
@ -107,25 +107,25 @@ chmod 755 editor @@ -107,25 +107,25 @@ chmod 755 editor
test_expect_success \
"editing message from other commit" \
"echo 'hula hula' >file && \
VISUAL=./editor git-commit -c HEAD^ -a"
VISUAL=./editor git commit -c HEAD^ -a"

test_expect_success \
"message from stdin" \
"echo 'silly new contents' >file && \
echo commit message from stdin | git-commit -F - -a"
echo commit message from stdin | git commit -F - -a"

test_expect_success \
"overriding author from command line" \
"echo 'gak' >file && \
git-commit -m 'author' --author 'Rubber Duck <rduck@convoy.org>' -a"
git commit -m 'author' --author 'Rubber Duck <rduck@convoy.org>' -a"

test_expect_success \
"interactive add" \
"echo 7 | git-commit --interactive | grep 'What now'"
"echo 7 | git commit --interactive | grep 'What now'"

test_expect_success \
"showing committed revisions" \
"git-rev-list HEAD >current"
"git rev-list HEAD >current"

# We could just check the head sha1, but checking each commit makes it
# easier to isolate bugs.
@ -140,7 +140,7 @@ d381ac431806e53f3dd7ac2f1ae0534f36d738b9 @@ -140,7 +140,7 @@ d381ac431806e53f3dd7ac2f1ae0534f36d738b9
EOF

test_expect_success \
'validate git-rev-list output.' \
'validate git rev-list output.' \
'diff current expected'

test_expect_success 'partial commit that involves removal (1)' '

2
t/t7502-status.sh

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
# Copyright (c) 2007 Johannes E. Schindelin
#

test_description='git-status'
test_description='git status'

. ./test-lib.sh


2
t/t7505-prepare-commit-msg-hook.sh

@ -32,7 +32,7 @@ echo "#!$SHELL_PATH" > "$HOOK" @@ -32,7 +32,7 @@ echo "#!$SHELL_PATH" > "$HOOK"
cat >> "$HOOK" <<'EOF'

if test "$2" = commit; then
source=$(git-rev-parse "$3")
source=$(git rev-parse "$3")
else
source=${2-default}
fi

2
t/t7506-status-submodule.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description='git-status for submodule'
test_description='git status for submodule'

. ./test-lib.sh


2
t/t7600-merge.sh

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
# Copyright (c) 2007 Lars Hjemli
#

test_description='git-merge
test_description='git merge

Testing basic merge operations/option parsing.'


2
t/t7601-merge-pull-config.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description='git-merge
test_description='git merge

Testing pull.* configuration parsing.'


2
t/t7602-merge-octopus-many.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description='git-merge
test_description='git merge

Testing octopus merge with more than 25 refs.'


2
t/t7603-merge-reduce-heads.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description='git-merge
test_description='git merge

Testing octopus merge when reducing parents to independent branches.'


2
t/t7604-merge-custom-message.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description='git-merge
test_description='git merge

Testing merge when using a custom message for the merge commit.'


2
t/t7605-merge-resolve.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description='git-merge
test_description='git merge

Testing the resolve strategy.'


2
t/t7610-mergetool.sh

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
# Copyright (c) 2008 Charles Bailey
#

test_description='git-mergetool
test_description='git mergetool

Testing basic merge tool invocation'


2
t/t7701-repack-unpack-unreachable.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description='git-repack works correctly'
test_description='git repack works correctly'

. ./test-lib.sh


2
t/t9001-send-email.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh

test_description='git-send-email'
test_description='git send-email'
. ./test-lib.sh

PROG='git send-email'

2
tree-diff.c

@ -303,7 +303,7 @@ int diff_tree(struct tree_desc *t1, struct tree_desc *t2, const char *base, stru @@ -303,7 +303,7 @@ int diff_tree(struct tree_desc *t1, struct tree_desc *t2, const char *base, stru
update_tree_entry(t2);
continue;
}
die("git-diff-tree: internal error");
die("git diff-tree: internal error");
}
return 0;
}

18
upload-pack.c

@ -157,7 +157,7 @@ static void create_pack_file(void) @@ -157,7 +157,7 @@ static void create_pack_file(void)
/* .data is just a boolean: any non-NULL value will do */
rev_list.data = create_full_pack ? &rev_list : NULL;
if (start_async(&rev_list))
die("git-upload-pack: unable to fork git-rev-list");
die("git upload-pack: unable to fork git-rev-list");

argv[arg++] = "pack-objects";
argv[arg++] = "--stdout";
@ -177,7 +177,7 @@ static void create_pack_file(void) @@ -177,7 +177,7 @@ static void create_pack_file(void)
pack_objects.argv = argv;

if (start_command(&pack_objects))
die("git-upload-pack: unable to fork git-pack-objects");
die("git upload-pack: unable to fork git-pack-objects");

/* We read from pack_objects.err to capture stderr output for
* progress bar, and pack_objects.out to capture the pack data.
@ -271,7 +271,7 @@ static void create_pack_file(void) @@ -271,7 +271,7 @@ static void create_pack_file(void)
}

if (finish_command(&pack_objects)) {
error("git-upload-pack: git-pack-objects died with error.");
error("git upload-pack: git-pack-objects died with error.");
goto fail;
}
if (finish_async(&rev_list))
@ -291,7 +291,7 @@ static void create_pack_file(void) @@ -291,7 +291,7 @@ static void create_pack_file(void)

fail:
send_client_data(3, abort_msg, sizeof(abort_msg));
die("git-upload-pack: %s", abort_msg);
die("git upload-pack: %s", abort_msg);
}

static int got_sha1(char *hex, unsigned char *sha1)
@ -300,7 +300,7 @@ static int got_sha1(char *hex, unsigned char *sha1) @@ -300,7 +300,7 @@ static int got_sha1(char *hex, unsigned char *sha1)
int we_knew_they_have = 0;

if (get_sha1_hex(hex, sha1))
die("git-upload-pack: expected SHA1 object, got '%s'", hex);
die("git upload-pack: expected SHA1 object, got '%s'", hex);
if (!has_sha1_file(sha1))
return -1;

@ -440,7 +440,7 @@ static int get_common_commits(void) @@ -440,7 +440,7 @@ static int get_common_commits(void)
packet_write(1, "NAK\n");
return -1;
}
die("git-upload-pack: expected SHA1 list, got '%s'", line);
die("git upload-pack: expected SHA1 list, got '%s'", line);
}
}

@ -485,7 +485,7 @@ static void receive_needs(void) @@ -485,7 +485,7 @@ static void receive_needs(void)
}
if (prefixcmp(line, "want ") ||
get_sha1_hex(line+5, sha1_buf))
die("git-upload-pack: protocol error, "
die("git upload-pack: protocol error, "
"expected to get sha, not '%s'", line);
if (strstr(line+45, "multi_ack"))
multi_ack = 1;
@ -512,7 +512,7 @@ static void receive_needs(void) @@ -512,7 +512,7 @@ static void receive_needs(void)
*/
o = lookup_object(sha1_buf);
if (!o || !(o->flags & OUR_REF))
die("git-upload-pack: not our ref %s", line+5);
die("git upload-pack: not our ref %s", line+5);
if (!(o->flags & WANTED)) {
o->flags |= WANTED;
add_object_array(o, NULL, &want_obj);
@ -577,7 +577,7 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo @@ -577,7 +577,7 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo
struct object *o = parse_object(sha1);

if (!o)
die("git-upload-pack: cannot find object %s:", sha1_to_hex(sha1));
die("git upload-pack: cannot find object %s:", sha1_to_hex(sha1));

if (capabilities)
packet_write(1, "%s %s%c%s\n", sha1_to_hex(sha1), refname,

Loading…
Cancel
Save