@matheusbsbs / matheus-bagliano / commits / 00ae82895e
Fork 0

errors: "strict subset" -> "ancestor"

The term "ancestor" is a bit more intuitive (and more consistent with the documentation) than the term "strict subset". Also, remove superfluous "ref", capitalize, and add some carriage returns, changing: error: remote 'refs/heads/master' is not a strict subset of local ref 'refs/heads/master'. maybe you are not up-to-date and need to pull first? error: failed to push to 'ssh://linux-nfs.org/~bfields/exports/git.git' to: error: remote 'refs/heads/master' is not an ancestor of local 'refs/heads/master'. Maybe you are not up-to-date and need to pull first? error: failed to push to 'ssh://linux-nfs.org/~bfields/exports/git.git' Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

J. Bruce Fields committed Nov 2, 2007 at 22:39 UTC 00ae82895e7f30e52ff12edc1076409c7c53d99e
3 files changed +14 -9
builtin-branch.c
+1 -1
@@ -148,7 +148,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
148
149 if (!force &&
150 !in_merge_bases(rev, &head_rev, 1)) {
151 - error("The branch '%s' is not a strict subset of "
151 + error("The branch '%s' is not an ancestor of "
152 "your current HEAD.\n"
153 "If you are sure you want to delete it, "
154 "run 'git branch -D %s'.", argv[i], argv[i]);
http-push.c
+10 -5
@@ -2241,7 +2241,11 @@ static int delete_remote_branch(char *pattern, int force)
2241
2242 /* Remote branch must be an ancestor of remote HEAD */
2243 if (!verify_merge_base(head_sha1, remote_ref->old_sha1)) {
2244 - return error("The branch '%s' is not a strict subset of your current HEAD.\nIf you are sure you want to delete it, run:\n\t'git http-push -D %s %s'", remote_ref->name, remote->url, pattern);
2244 + return error("The branch '%s' is not an ancestor "
2245 + "of your current HEAD.\n"
2246 + "If you are sure you want to delete it,"
2247 + " run:\n\t'git http-push -D %s %s'",
2248 + remote_ref->name, remote->url, pattern);
2249 }
2250 }
2251
@@ -2417,16 +2421,17 @@ int main(int argc, char **argv)
2421 if (!has_sha1_file(ref->old_sha1) ||
2422 !ref_newer(ref->peer_ref->new_sha1,
2423 ref->old_sha1)) {
2420 - /* We do not have the remote ref, or
2424 + /*
2425 + * We do not have the remote ref, or
2426 * we know that the remote ref is not
2427 * an ancestor of what we are trying to
2428 * push. Either way this can be losing
2429 * commits at the remote end and likely
2430 * we were not up to date to begin with.
2431 */
2427 - error("remote '%s' is not a strict "
2428 - "subset of local ref '%s'. "
2429 - "maybe you are not up-to-date and "
2432 + error("remote '%s' is not an ancestor of\n"
2433 + "local '%s'.\n"
2434 + "Maybe you are not up-to-date and "
2435 "need to pull first?",
2436 ref->name,
2437 ref->peer_ref->name);
send-pack.c
+3 -3
@@ -297,9 +297,9 @@ static int send_pack(int in, int out, struct remote *remote, int nr_refspec, cha
297 * commits at the remote end and likely
298 * we were not up to date to begin with.
299 */
300 - error("remote '%s' is not a strict "
301 - "subset of local ref '%s'. "
302 - "maybe you are not up-to-date and "
300 + error("remote '%s' is not an ancestor of\n"
301 + " local '%s'.\n"
302 + " Maybe you are not up-to-date and "
303 "need to pull first?",
304 ref->name,
305 ref->peer_ref->name);