commit - f298ae0fb8ef2fb3645ac256d8e968d564be275e
commit + d7b899ab022b3f7c7a42ed1338efa4ad6be626c8
blob - df306d5d03225bb3a1a0991de83bb445533c95be
blob + 5286f89210b64f38fc36e7dde5d75328f4e4834f
--- include/got_reference.h
+++ include/got_reference.h
/* Change the reference name a symbolic reference points to. */
const struct got_error *got_ref_change_symref(struct got_reference *,
- char *);
+ const char *);
/*
* Change a symbolic reference into a regular reference which points to
blob - 03550871081f6ba952a7e6ee214c45a6e3b023b3
blob + a4aa416aa740d7f102a9b038776457ef3096c1e4
--- lib/reference.c
+++ lib/reference.c
}
const struct got_error *
-got_ref_change_symref(struct got_reference *ref, char *refname)
+got_ref_change_symref(struct got_reference *ref, const char *refname)
{
char *new_name;
if (new_name == NULL)
return got_error_from_errno("strdup");
- free(ref->ref.symref.name);
- ref->ref.symref.name = new_name;
+ free(ref->ref.symref.ref);
+ ref->ref.symref.ref = new_name;
return NULL;
}