diff options
author | Martin Ågren <martin.agren@gmail.com> | 2017-09-09 08:57:18 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-10 16:36:58 +0900 |
commit | 276d0e35c0c9cadaf38247f7a9ff716e293b2acb (patch) | |
tree | 395ea8c19d20de7ac9aae1d9f418b558619485f4 /t/helper | |
parent | refs/files-backend: correct return value in lock_ref_for_update (diff) | |
download | tgif-276d0e35c0c9cadaf38247f7a9ff716e293b2acb.tar.xz |
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 <peff@peff.net>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper')
0 files changed, 0 insertions, 0 deletions