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:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-10-16 01:06:56 +0300
committerJunio C Hamano <gitster@pobox.com>2017-10-16 05:05:50 +0300
commit34c290a6fc8b1f6705d2646d726df2260927da0f (patch)
tree669c6569783ec61850be600dcd1b8496cabbf66d /builtin/update-index.c
parent0f2dc722dd01097d1e1c1dac43b2f57924594457 (diff)
refs: convert read_ref and read_ref_full to object_id
All but two of the call sites already have parameters using the hash parameter of struct object_id, so convert them to take a pointer to the struct directly. Also convert refs_read_refs_full, the underlying implementation. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/update-index.c')
-rw-r--r--builtin/update-index.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c
index bf7420b808..24f4b28951 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -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.
*/