diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-10-15 22:07:06 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-16 11:05:51 +0900 |
commit | 1053fe829c037c5a725786bac35d05a113c91f55 (patch) | |
tree | e8abb9e7099dc3b76c1ea63c5a6c1401338feb78 /dir.c | |
parent | bcd29864737099ff78de3db8b1d518f2aea51bc9 (diff) | |
download | git-1053fe829c037c5a725786bac35d05a113c91f55.tar.gz |
Convert remaining callers of resolve_gitlink_ref to object_id
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1390,8 +1390,8 @@ static enum path_treatment treat_directory(struct dir_struct *dir, if (dir->flags & DIR_SHOW_OTHER_DIRECTORIES) break; if (!(dir->flags & DIR_NO_GITLINKS)) { - unsigned char sha1[20]; - if (resolve_gitlink_ref(dirname, "HEAD", sha1) == 0) + struct object_id oid; + if (resolve_gitlink_ref(dirname, "HEAD", oid.hash) == 0) return path_untracked; } return path_recurse; @@ -2279,10 +2279,10 @@ static int remove_dir_recurse(struct strbuf *path, int flag, int *kept_up) int ret = 0, original_len = path->len, len, kept_down = 0; int only_empty = (flag & REMOVE_DIR_EMPTY_ONLY); int keep_toplevel = (flag & REMOVE_DIR_KEEP_TOPLEVEL); - unsigned char submodule_head[20]; + struct object_id submodule_head; if ((flag & REMOVE_DIR_KEEP_NESTED_GIT) && - !resolve_gitlink_ref(path->buf, "HEAD", submodule_head)) { + !resolve_gitlink_ref(path->buf, "HEAD", submodule_head.hash)) { /* Do not descend and nuke a nested git work tree. */ if (kept_up) *kept_up = 1; |