diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2017-10-28 09:27:15 +0200 |
---|---|---|
committer | Michael Haggerty <mhagger@alum.mit.edu> | 2017-10-28 09:27:15 +0200 |
commit | ff08e56cde739152a59a86f5aa996954a2ec0614 (patch) | |
tree | 9c7bc94151c5a082377ecb438e66aea140924edb /builtin/update-index.c | |
parent | 2f899857a9f425cb59f8a15c2ea7a52100c51a23 (diff) | |
parent | 4f01e5080c4a7eee69da47c958888358e6127584 (diff) | |
download | git-ff08e56cde739152a59a86f5aa996954a2ec0614.tar.gz git-ff08e56cde739152a59a86f5aa996954a2ec0614.tar.xz |
Merge branch 'bc/object-id' into base
Diffstat (limited to 'builtin/update-index.c')
-rw-r--r-- | builtin/update-index.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c index bf7420b80..fefbe6016 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -328,7 +328,7 @@ static int process_directory(const char *path, int len, struct stat *st) if (S_ISGITLINK(ce->ce_mode)) { /* Do nothing to the index if there is no HEAD! */ - if (resolve_gitlink_ref(path, "HEAD", oid.hash) < 0) + if (resolve_gitlink_ref(path, "HEAD", &oid) < 0) return 0; return add_one_path(ce, path, len, st); @@ -354,7 +354,7 @@ static int process_directory(const char *path, int len, struct stat *st) } /* No match - should we add it as a gitlink? */ - if (!resolve_gitlink_ref(path, "HEAD", oid.hash)) + if (!resolve_gitlink_ref(path, "HEAD", &oid)) return add_one_path(NULL, path, len, st); /* Error out. */ @@ -679,9 +679,9 @@ static int unresolve_one(const char *path) static void read_head_pointers(void) { - if (read_ref("HEAD", head_oid.hash)) + if (read_ref("HEAD", &head_oid)) die("No HEAD -- no initial commit yet?"); - if (read_ref("MERGE_HEAD", merge_head_oid.hash)) { + if (read_ref("MERGE_HEAD", &merge_head_oid)) { fprintf(stderr, "Not in the middle of a merge.\n"); exit(0); } @@ -721,7 +721,7 @@ static int do_reupdate(int ac, const char **av, PATHSPEC_PREFER_CWD, prefix, av + 1); - if (read_ref("HEAD", head_oid.hash)) + if (read_ref("HEAD", &head_oid)) /* If there is no HEAD, that means it is an initial * commit. Update everything in the index. */ |