diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-07-22 12:55:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-07-22 12:55:07 -0700 |
commit | 0958a24d7360759902f802744c0839c8029659d7 (patch) | |
tree | f22a0b0f2cb4dc8e7c4e0b5a053d0bac01c445bf /setup.c | |
parent | 9a0231b395cb9720365b7066312eeaa86e37ed31 (diff) | |
parent | 31ffd0c0c1255cb7e9ba76192a70ae294faf95bf (diff) | |
download | git-0958a24d7360759902f802744c0839c8029659d7.tar.gz |
Merge branch 'jc/sha1-name-more'
Teaches the object name parser things like a "git describe" output
is always a commit object, "A" in "git log A" must be a committish,
and "A" and "B" in "git log A...B" both must be committish, etc., to
prolong the lifetime of abbreviated object names.
* jc/sha1-name-more: (27 commits)
t1512: match the "other" object names
t1512: ignore whitespaces in wc -l output
rev-parse --disambiguate=<prefix>
rev-parse: A and B in "rev-parse A..B" refer to committish
reset: the command takes committish
commit-tree: the command wants a tree and commits
apply: --build-fake-ancestor expects blobs
sha1_name.c: add support for disambiguating other types
revision.c: the "log" family, except for "show", takes committish
revision.c: allow handle_revision_arg() to take other flags
sha1_name.c: introduce get_sha1_committish()
sha1_name.c: teach lookup context to get_sha1_with_context()
sha1_name.c: many short names can only be committish
sha1_name.c: get_sha1_1() takes lookup flags
sha1_name.c: get_describe_name() by definition groks only commits
sha1_name.c: teach get_short_sha1() a commit-only option
sha1_name.c: allow get_short_sha1() to take other flags
get_sha1(): fix error status regression
sha1_name.c: restructure disambiguation of short names
sha1_name.c: correct misnamed "canonical" and "res"
...
Diffstat (limited to 'setup.c')
-rw-r--r-- | setup.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -77,9 +77,6 @@ static void NORETURN die_verify_filename(const char *prefix, const char *arg, int diagnose_misspelt_rev) { - unsigned char sha1[20]; - unsigned mode; - if (!diagnose_misspelt_rev) die("%s: no such path in the working tree.\n" "Use '-- <path>...' to specify paths that do not exist locally.", @@ -88,11 +85,10 @@ static void NORETURN die_verify_filename(const char *prefix, * Saying "'(icase)foo' does not exist in the index" when the * user gave us ":(icase)foo" is just stupid. A magic pathspec * begins with a colon and is followed by a non-alnum; do not - * let get_sha1_with_mode_1(only_to_die=1) to even trigger. + * let maybe_die_on_misspelt_object_name() even trigger. */ if (!(arg[0] == ':' && !isalnum(arg[1]))) - /* try a detailed diagnostic ... */ - get_sha1_with_mode_1(arg, sha1, &mode, 1, prefix); + maybe_die_on_misspelt_object_name(arg, prefix); /* ... or fall back the most general message. */ die("ambiguous argument '%s': unknown revision or path not in the working tree.\n" |