Commit 4045f65
branch: show "HEAD detached" first under reverse sort
Change the output of the likes of "git branch -l --sort=-objectsize"
to show the "(HEAD detached at <hash>)" message at the start of the
output. Before the compare_detached_head() function added in a
preceding commit we'd emit this output as an emergent effect.
It doesn't make any sense to consider the objectsize, type or other
non-attribute of the "(HEAD detached at <hash>)" message for the
purposes of sorting. Let's always emit it at the top instead. The only
reason it was sorted in the first place is because we're injecting it
into the ref-filter machinery so builtin/branch.c doesn't need to do
its own "am I detached?" detection.
Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 2708ce6 commit 4045f65
2 files changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2357 | 2357 | | |
2358 | 2358 | | |
2359 | 2359 | | |
| 2360 | + | |
2360 | 2361 | | |
2361 | 2362 | | |
2362 | 2363 | | |
| |||
2368 | 2369 | | |
2369 | 2370 | | |
2370 | 2371 | | |
| 2372 | + | |
2371 | 2373 | | |
2372 | 2374 | | |
2373 | 2375 | | |
| |||
2384 | 2386 | | |
2385 | 2387 | | |
2386 | 2388 | | |
2387 | | - | |
| 2389 | + | |
| 2390 | + | |
2388 | 2391 | | |
2389 | 2392 | | |
2390 | 2393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
227 | | - | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
247 | | - | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
267 | | - | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
0 commit comments