Commit ff4062c
committed
Change how getReferenceCommit() retrieves commits
If a tag is annotated, its target() will return a tag object instead
of the tag's underlying commit. This causes Repository's
getReferenceCommit() to not work as it will try to find a commit
based on the tag's oid. By replacing target() with peel(), the code
can now find the actual underlying commit regardless of whether a tag
is annotated or not.
Signed-off-by: Remy Suen <remy.suen@gmail.com>1 parent d3fcc53 commit ff4062c
2 files changed
+37
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1055 | 1055 | | |
1056 | 1056 | | |
1057 | 1057 | | |
1058 | | - | |
1059 | | - | |
1060 | 1058 | | |
1061 | | - | |
| 1059 | + | |
1062 | 1060 | | |
1063 | 1061 | | |
1064 | 1062 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
330 | 366 | | |
0 commit comments