From: Martin Ågren Date: Sat, 9 Sep 2017 06:57:18 +0000 (+0200) Subject: refs/files-backend: add `refname`, not "HEAD", to list X-Git-Tag: v2.15.0-rc0~93^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/276d0e35c0c9cadaf38247f7a9ff716e293b2acb?hp=276d0e35c0c9cadaf38247f7a9ff716e293b2acb refs/files-backend: add `refname`, not "HEAD", to list An earlier patch rewrote `split_symref_update()` to add a copy of a string to a string list instead of adding the original string. That was so that the original string could be freed in a later patch, but it is also conceptually cleaner, since now all calls to `string_list_insert()` and `string_list_append()` add `update->refname`. --- Except a literal "HEAD" is added in `split_head_update()`. Restructure `split_head_update()` in the same way as the earlier patch did for `split_symref_update()`. This does not correct any practical problem, but makes things conceptually cleaner. The downside is a call to `string_list_has_string()`, which should be relatively cheap. Signed-off-by: Jeff King Signed-off-by: Martin Ågren Reviewed-by: Jeff King Signed-off-by: Junio C Hamano ---