Show 24 quoted lines
> All callers use oid_to_hex to convert the desired oid to a string before
> calling submodule_move_head. Defer the conversion to the
> submodule_move_head as it will turn out to be useful in a bit.
>
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
> entry.c | 6 +++---
> submodule.c | 12 ++++++------
> submodule.h | 2 +-
> unpack-trees.c | 13 +++++--------
> 4 files changed, 15 insertions(+), 18 deletions(-)
>
> diff --git a/entry.c b/entry.c
> index b5d1d3cf231..4b34dfd30df 100644
> --- a/entry.c
> +++ b/entry.c
> @@ -358,7 +358,7 @@ static int write_entry(struct cache_entry *ce,
> sub = submodule_from_ce(ce);
> if (sub)
> return submodule_move_head(ce->name,
> - NULL, oid_to_hex(&ce->oid),
> + NULL, &ce->oid,
> state->force ? SUBMODULE_MOVE_HEAD_FORCE : 0);
> break;