summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 34baebc)
raw | patch | inline | side by side (parent: 34baebc)
author | Junio C Hamano <gitster@pobox.com> | |
Sun, 31 Aug 2008 16:39:19 +0000 (09:39 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 31 Aug 2008 16:39:19 +0000 (09:39 -0700) |
This is a mechanical conversion of all '*.c' files with:
s/((?:die|error|warning)\("git)-(\S+:)/$1 $2/;
The result was manually inspected and no false positive was found.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
s/((?:die|error|warning)\("git)-(\S+:)/$1 $2/;
The result was manually inspected and no false positive was found.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 files changed:
builtin-apply.c | patch | blob | history | |
builtin-checkout-index.c | patch | blob | history | |
builtin-commit-tree.c | patch | blob | history | |
builtin-fetch-pack.c | patch | blob | history | |
builtin-grep.c | patch | blob | history | |
builtin-ls-files.c | patch | blob | history | |
builtin-rm.c | patch | blob | history | |
builtin-show-ref.c | patch | blob | history | |
builtin-tar-tree.c | patch | blob | history | |
builtin-update-index.c | patch | blob | history | |
connect.c | patch | blob | history | |
entry.c | patch | blob | history | |
merge-index.c | patch | blob | history | |
tree-diff.c | patch | blob | history | |
upload-pack.c | patch | blob | history |
diff --git a/builtin-apply.c b/builtin-apply.c
index 40eeabb625a405e38f03d8cecb79b927d69d8bf9..4eb263ec5807a771b3a61c147b74a6f2f68dddee 100644 (file)
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -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;
}
}
index 71ebabf9903bd90b7da59c47f1c0819b5f25c538..90f8523eb5c92555637c99f0fe52925a3ef7d09e 100644 (file)
--- a/builtin-checkout-index.c
+++ b/builtin-checkout-index.c
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))
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);
diff --git a/builtin-commit-tree.c b/builtin-commit-tree.c
index 7a9a309be0543da7d27e7710ef82271f2582e0a9..291c43cf70d7906b770911a7bcb2cdff9c6182e7 100644 (file)
--- a/builtin-commit-tree.c
+++ b/builtin-commit-tree.c
}
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));
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 273239af3be61736ee4ff484d628950c4de7311a..6b37281a956892db676ad0b6e8c38b5d82316797 100644 (file)
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
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;
diff --git a/builtin-grep.c b/builtin-grep.c
index 631129ddfd0ffe06f919882d22cfc494d9553f50..f59f95f1758f891f8068f1d12222d415c6595957 100644 (file)
--- a/builtin-grep.c
+++ b/builtin-grep.c
/* 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) {
diff --git a/builtin-ls-files.c b/builtin-ls-files.c
index e8d568eed7ab700bc338af8f589d2f61e81f323c..068f424696864f3db1c1b78ef25a92a197ff5474 100644 (file)
--- a/builtin-ls-files.c
+++ b/builtin-ls-files.c
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;
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;
}
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;
diff --git a/builtin-rm.c b/builtin-rm.c
index 0ed26bb8f10062185b9476815f17c2902461e47d..6bd82111d25f669616653d655dd940f2bd5c99e7 100644 (file)
--- a/builtin-rm.c
+++ b/builtin-rm.c
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)
continue;
}
if (!removed)
- die("git-rm: %s: %s", path, strerror(errno));
+ die("git rm: %s: %s", path, strerror(errno));
}
}
diff --git a/builtin-show-ref.c b/builtin-show-ref.c
index add16004f11375b1ad2b97f9b1bf1ced5c437f81..572b114119db15f5f42dd79e3bc15e6d219f71db 100644 (file)
--- a/builtin-show-ref.c
+++ b/builtin-show-ref.c
* 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)
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);
diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c
index f4bea4a322c26a54734286073c5e67444555c2d9..cb7007e25f9f1752809e6f350c98d09b7fb9f7e7 100644 (file)
--- a/builtin-tar-tree.c
+++ b/builtin-tar-tree.c
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))
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;
}
diff --git a/builtin-update-index.c b/builtin-update-index.c
index 38eb53ccba2b97a0fccf50d6ba0b7424fe2d1bcb..e5bb2a03cbc047392b866ad1128cba58f98af5ba 100644 (file)
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
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)
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;
}
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;
}
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 {
*/
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;
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;
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;
}
diff --git a/connect.c b/connect.c
index 574f42fa47ffa69328217eb25afee6f85db9595e..dd96f8e0435ded892001783b69fba6a6fb3be288 100644 (file)
--- a/connect.c
+++ b/connect.c
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"))
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)
index 222aaa374b8268828e9d529a8afacb8830acc281..aa2ee46a84033585d8e07a585610c5a697af82c2 100644 (file)
--- a/entry.c
+++ b/entry.c
@@ -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
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
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
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) {
diff --git a/merge-index.c b/merge-index.c
index 7491c56ad25332fb4aae6a075bf0577a1d800c3b..7827e87a928586226570132fc8922991b1cb6c8a 100644 (file)
--- a/merge-index.c
+++ b/merge-index.c
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] = "";
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;
}
merge_all();
continue;
}
- die("git-merge-index: unknown option %s", arg);
+ die("git merge-index: unknown option %s", arg);
}
merge_file(arg);
}
diff --git a/tree-diff.c b/tree-diff.c
index bbb126fc46cfb28a0bc92cc0842c0dc72017751d..9f67af6c1fbb9130962cd373d8e2ebecf543c640 100644 (file)
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -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;
}
diff --git a/upload-pack.c b/upload-pack.c
index c911e70c9aa47b70dac41b7f4de2f0b4b6c1f948..e5adbc011e0ab71eeb06a42c4bd40cbea0bf3fa2 100644 (file)
--- a/upload-pack.c
+++ b/upload-pack.c
/* .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";
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.
}
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))
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)
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;
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);
}
}
}
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;
*/
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
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,