Commit e264361
committed
sha1_name.c: many short names can only be committish
We know that the token "$name" that appear in "$name^{commit}",
"$name^4", "$name~4" etc. can only name a committish (either a
commit or a tag that peels to a commit). Teach get_short_sha1() to
take advantage of that knowledge when disambiguating an abbreviated
SHA-1 given as an object name.
Signed-off-by: Junio C Hamano <[email protected]>1 parent e48ba20 commit e264361
3 files changed
+30
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
| 816 | + | |
816 | 817 | | |
817 | 818 | | |
818 | 819 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
227 | 245 | | |
228 | 246 | | |
229 | 247 | | |
| |||
261 | 279 | | |
262 | 280 | | |
263 | 281 | | |
| 282 | + | |
| 283 | + | |
264 | 284 | | |
265 | 285 | | |
266 | 286 | | |
| |||
440 | 460 | | |
441 | 461 | | |
442 | 462 | | |
443 | | - | |
| 463 | + | |
444 | 464 | | |
445 | 465 | | |
446 | 466 | | |
| |||
473 | 493 | | |
474 | 494 | | |
475 | 495 | | |
476 | | - | |
| 496 | + | |
477 | 497 | | |
478 | 498 | | |
479 | 499 | | |
| |||
519 | 539 | | |
520 | 540 | | |
521 | 541 | | |
| 542 | + | |
522 | 543 | | |
523 | 544 | | |
524 | 545 | | |
| |||
554 | 575 | | |
555 | 576 | | |
556 | 577 | | |
557 | | - | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
558 | 582 | | |
559 | 583 | | |
560 | 584 | | |
| |||
666 | 690 | | |
667 | 691 | | |
668 | 692 | | |
669 | | - | |
| 693 | + | |
670 | 694 | | |
671 | 695 | | |
672 | 696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments