Convert find_unique_abbrev* to struct object_id
Convert find_unique_abbrev and find_unique_abbrev_r to each take a pointer to struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
40f5555ca3
commit
aab9583f7b
@ -1350,7 +1350,7 @@ static void show_cherry_pick_in_progress(struct wt_status *s,
|
||||
const char *color)
|
||||
{
|
||||
status_printf_ln(s, color, _("You are currently cherry-picking commit %s."),
|
||||
find_unique_abbrev(state->cherry_pick_head_oid.hash, DEFAULT_ABBREV));
|
||||
find_unique_abbrev(&state->cherry_pick_head_oid, DEFAULT_ABBREV));
|
||||
if (s->hints) {
|
||||
if (has_unmerged(s))
|
||||
status_printf_ln(s, color,
|
||||
@ -1369,7 +1369,7 @@ static void show_revert_in_progress(struct wt_status *s,
|
||||
const char *color)
|
||||
{
|
||||
status_printf_ln(s, color, _("You are currently reverting commit %s."),
|
||||
find_unique_abbrev(state->revert_head_oid.hash, DEFAULT_ABBREV));
|
||||
find_unique_abbrev(&state->revert_head_oid, DEFAULT_ABBREV));
|
||||
if (s->hints) {
|
||||
if (has_unmerged(s))
|
||||
status_printf_ln(s, color,
|
||||
@ -1489,7 +1489,7 @@ static void wt_status_get_detached_from(struct wt_status_state *state)
|
||||
state->detached_from = xstrdup(from);
|
||||
} else
|
||||
state->detached_from =
|
||||
xstrdup(find_unique_abbrev(cb.noid.hash, DEFAULT_ABBREV));
|
||||
xstrdup(find_unique_abbrev(&cb.noid, DEFAULT_ABBREV));
|
||||
oidcpy(&state->detached_oid, &cb.noid);
|
||||
state->detached_at = !get_oid("HEAD", &oid) &&
|
||||
!oidcmp(&oid, &state->detached_oid);
|
||||
|
||||
Reference in New Issue
Block a user