Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-04 02:04:49 +0300
committerJunio C Hamano <gitster@pobox.com>2021-02-04 02:04:49 +0300
commit973e20b83f38d0a640d4e0478ddbd50dfa98daf1 (patch)
tree6cf89c7e061f25e00153b64af2dc1736c98337f9 /builtin
parent6cd7f9dc297d096e5b7787db8d0ad8ca05a1b296 (diff)
parent36a317929b8f0c67d77d54235f2d20751c576cbb (diff)
Merge branch 'jk/peel-iterated-oid'
The peel_ref() API has been replaced with peel_iterated_oid(). * jk/peel-iterated-oid: refs: switch peel_ref() to peel_iterated_oid()
Diffstat (limited to 'builtin')
-rw-r--r--builtin/describe.c2
-rw-r--r--builtin/gc.c2
-rw-r--r--builtin/pack-objects.c4
-rw-r--r--builtin/show-ref.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/builtin/describe.c b/builtin/describe.c
index 7668591d57..40482d8e9f 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -194,7 +194,7 @@ static int get_name(const char *path, const struct object_id *oid, int flag, voi
}
/* Is it annotated? */
- if (!peel_ref(path, &peeled)) {
+ if (!peel_iterated_oid(oid, &peeled)) {
is_annotated = !oideq(oid, &peeled);
} else {
oidcpy(&peeled, oid);
diff --git a/builtin/gc.c b/builtin/gc.c
index ef7a155479..4c40594d66 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -769,7 +769,7 @@ static int dfs_on_ref(const char *refname,
struct commit_list *stack = NULL;
struct commit *commit;
- if (!peel_ref(refname, &peeled))
+ if (!peel_iterated_oid(oid, &peeled))
oid = &peeled;
if (oid_object_info(the_repository, oid, NULL) != OBJ_COMMIT)
return 0;
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 5b0c4489e2..57f0bc28b8 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -634,7 +634,7 @@ static int mark_tagged(const char *path, const struct object_id *oid, int flag,
if (entry)
entry->tagged = 1;
- if (!peel_ref(path, &peeled)) {
+ if (!peel_iterated_oid(oid, &peeled)) {
entry = packlist_find(&to_pack, &peeled);
if (entry)
entry->tagged = 1;
@@ -2819,7 +2819,7 @@ static int add_ref_tag(const char *path, const struct object_id *oid, int flag,
struct object_id peeled;
if (starts_with(path, "refs/tags/") && /* is a tag? */
- !peel_ref(path, &peeled) && /* peelable? */
+ !peel_iterated_oid(oid, &peeled) && /* peelable? */
obj_is_packed(&peeled)) /* object packed? */
add_tag_chain(oid);
return 0;
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index ae60b4acf2..7f8a5332f8 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -40,7 +40,7 @@ static void show_one(const char *refname, const struct object_id *oid)
if (!deref_tags)
return;
- if (!peel_ref(refname, &peeled)) {
+ if (!peel_iterated_oid(oid, &peeled)) {
hex = find_unique_abbrev(&peeled, abbrev);
printf("%s %s^{}\n", hex, refname);
}