diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-07-13 23:49:29 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-17 13:54:51 -0700 |
commit | 321c89bf5fa937b19800fa97cfe93199b817d34f (patch) | |
tree | 367e0ab590a1f182a42db30f8bd14316cef0322f /builtin | |
parent | sha1_name: convert get_sha1* to get_oid* (diff) | |
download | tgif-321c89bf5fa937b19800fa97cfe93199b817d34f.tar.xz |
sha1_name: convert GET_SHA1* flags to GET_OID*
Convert the flags for get_oid_with_context and friends to use "OID"
instead of "SHA1" in their names.
This transform was made by running the following one-liner on the
affected files:
perl -pi -e 's/GET_SHA1/GET_OID/g'
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/cat-file.c | 4 | ||||
-rw-r--r-- | builtin/grep.c | 2 | ||||
-rw-r--r-- | builtin/log.c | 2 | ||||
-rw-r--r-- | builtin/rev-parse.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 1f035fb550..62c8cf0ebf 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -63,7 +63,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name, if (unknown_type) flags |= OBJECT_INFO_ALLOW_UNKNOWN_TYPE; - if (get_oid_with_context(obj_name, GET_SHA1_RECORD_PATH, + if (get_oid_with_context(obj_name, GET_OID_RECORD_PATH, &oid, &obj_context)) die("Not a valid object name %s", obj_name); @@ -361,7 +361,7 @@ static void batch_one_object(const char *obj_name, struct batch_options *opt, struct expand_data *data) { struct object_context ctx; - int flags = opt->follow_symlinks ? GET_SHA1_FOLLOW_SYMLINKS : 0; + int flags = opt->follow_symlinks ? GET_OID_FOLLOW_SYMLINKS : 0; enum follow_symlinks_result result; result = get_oid_with_context(obj_name, flags, &data->oid, &ctx); diff --git a/builtin/grep.c b/builtin/grep.c index f339567e66..9124450163 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -1207,7 +1207,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix) break; } - if (get_oid_with_context(arg, GET_SHA1_RECORD_PATH, + if (get_oid_with_context(arg, GET_OID_RECORD_PATH, &oid, &oc)) { if (seen_dashdash) die(_("unable to resolve revision: %s"), arg); diff --git a/builtin/log.c b/builtin/log.c index 413b760771..cb7e0e61d7 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -484,7 +484,7 @@ static int show_blob_object(const struct object_id *oid, struct rev_info *rev, c !DIFF_OPT_TST(&rev->diffopt, ALLOW_TEXTCONV)) return stream_blob_to_fd(1, oid, NULL, 0); - if (get_oid_with_context(obj_name, GET_SHA1_RECORD_PATH, + if (get_oid_with_context(obj_name, GET_OID_RECORD_PATH, &oidc, &obj_context)) die(_("Not a valid object name %s"), obj_name); if (!obj_context.path || diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 041b7898c4..2bd28d3c08 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -702,7 +702,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) } if (!strcmp(arg, "--quiet") || !strcmp(arg, "-q")) { quiet = 1; - flags |= GET_SHA1_QUIETLY; + flags |= GET_OID_QUIETLY; continue; } if (opt_with_value(arg, "--short", &arg)) { |