Commit 4df4aed
wt-status: also abbreviate 'merge' and 'fixup -C' lines during rebase
When "git status" is invoked during a rebase, we print the last commands
done and the next commands to do, and abbreviate commit hashes found in
those lines. However, we only abbreviate hashes in 'pick', 'squash' and
plain 'fixup' lines, not those in 'merge -C' and 'fixup -C' lines, as
the parsing done in wt-status.c::abbrev_oid_in_line is not prepared for
such lines.
Improve the parsing done by this function by special casing 'fixup' and
'merge' such that the hash to abbreviate is the string found in the
third field of 'split', instead of the second one for other commands.
Introduce a 'hash' strbuf pointer to point to the correct field in all
cases.
Signed-off-by: Philippe Blain <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 0c088a0 commit 4df4aed
1 file changed
+22
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1342 | 1342 | | |
1343 | 1343 | | |
1344 | 1344 | | |
1345 | | - | |
| 1345 | + | |
| 1346 | + | |
1346 | 1347 | | |
1347 | | - | |
| 1348 | + | |
| 1349 | + | |
1348 | 1350 | | |
1349 | 1351 | | |
1350 | 1352 | | |
| |||
1360 | 1362 | | |
1361 | 1363 | | |
1362 | 1364 | | |
1363 | | - | |
| 1365 | + | |
1364 | 1366 | | |
1365 | 1367 | | |
1366 | | - | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
1367 | 1380 | | |
1368 | 1381 | | |
1369 | 1382 | | |
1370 | 1383 | | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
1375 | 1388 | | |
1376 | | - | |
| 1389 | + | |
1377 | 1390 | | |
1378 | 1391 | | |
1379 | 1392 | | |
| |||
0 commit comments