Commit f9356f9
fetch: make set_head() call easier to read
We ignore any error returned from set_head(), but 638060d (fetch
set_head: refactor to use remote directly, 2025-01-26) left its call in
a noop "if" conditional as a sort of note-to-self.
When c834d1a (fetch: only respect followRemoteHEAD with configured
refspecs, 2025-03-18) added a "do_set_head" flag, it was rolled into the
same conditional, putting set_head() on the right-hand side of a
short-circuit AND.
That's not wrong, but it really hides the point of the line, which
is (maybe) calling the function.
Instead, let's have a full if() block for the flag, and then our comment
(with some rewording) will be sufficient to clarify the error handling.
Signed-off-by: Jeff King <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent aab0f89 commit f9356f9
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1903 | 1903 | | |
1904 | 1904 | | |
1905 | 1905 | | |
1906 | | - | |
1907 | | - | |
| 1906 | + | |
1908 | 1907 | | |
1909 | | - | |
1910 | | - | |
| 1908 | + | |
| 1909 | + | |
1911 | 1910 | | |
| 1911 | + | |
| 1912 | + | |
1912 | 1913 | | |
1913 | 1914 | | |
1914 | 1915 | | |
| |||
0 commit comments