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
path: root/dir.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-10-16 01:07:07 +0300
committerJunio C Hamano <gitster@pobox.com>2017-10-16 05:05:51 +0300
commita98e6101f01b6991e780fc0b75f2937615fa84a9 (patch)
tree50035adb93a84ce2468f44027e1620c5253a76ec /dir.c
parent1053fe829c037c5a725786bac35d05a113c91f55 (diff)
refs: convert resolve_gitlink_ref to struct object_id
Convert the declaration and definition of resolve_gitlink_ref to use struct object_id and apply the following semantic patch: @@ expression E1, E2, E3; @@ - resolve_gitlink_ref(E1, E2, E3.hash) + resolve_gitlink_ref(E1, E2, &E3) @@ expression E1, E2, E3; @@ - resolve_gitlink_ref(E1, E2, E3->hash) + resolve_gitlink_ref(E1, E2, E3) Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index a4198ba7fd..f09a31e102 100644
--- a/dir.c
+++ b/dir.c
@@ -1391,7 +1391,7 @@ static enum path_treatment treat_directory(struct dir_struct *dir,
break;
if (!(dir->flags & DIR_NO_GITLINKS)) {
struct object_id oid;
- if (resolve_gitlink_ref(dirname, "HEAD", oid.hash) == 0)
+ if (resolve_gitlink_ref(dirname, "HEAD", &oid) == 0)
return path_untracked;
}
return path_recurse;
@@ -2282,7 +2282,7 @@ static int remove_dir_recurse(struct strbuf *path, int flag, int *kept_up)
struct object_id submodule_head;
if ((flag & REMOVE_DIR_KEEP_NESTED_GIT) &&
- !resolve_gitlink_ref(path->buf, "HEAD", submodule_head.hash)) {
+ !resolve_gitlink_ref(path->buf, "HEAD", &submodule_head)) {
/* Do not descend and nuke a nested git work tree. */
if (kept_up)
*kept_up = 1;