Commit 929d044
fetch: use strbuf to format FETCH_HEAD updates
This commit refactors `append_fetch_head()` to use a `struct strbuf` for
formatting the update which we're about to append to the FETCH_HEAD
file. While the refactoring doesn't have much of a benefit right now, it
serves as a preparatory step to implement atomic fetches where we need
to buffer all updates to FETCH_HEAD and only flush them out if all
reference updates succeeded.
No change in behaviour is expected from this commit.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 58a646a commit 929d044
1 file changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
899 | 899 | | |
900 | 900 | | |
901 | 901 | | |
| 902 | + | |
902 | 903 | | |
903 | 904 | | |
904 | 905 | | |
| |||
909 | 910 | | |
910 | 911 | | |
911 | 912 | | |
| 913 | + | |
912 | 914 | | |
913 | 915 | | |
914 | 916 | | |
| |||
941 | 943 | | |
942 | 944 | | |
943 | 945 | | |
944 | | - | |
945 | | - | |
| 946 | + | |
| 947 | + | |
946 | 948 | | |
947 | 949 | | |
948 | | - | |
| 950 | + | |
949 | 951 | | |
950 | | - | |
951 | | - | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
952 | 957 | | |
953 | 958 | | |
954 | 959 | | |
| |||
962 | 967 | | |
963 | 968 | | |
964 | 969 | | |
| 970 | + | |
965 | 971 | | |
966 | 972 | | |
967 | 973 | | |
| |||
0 commit comments