Repository navigation
Commit 4e50f63
committed
fast-import: fix lookup for new commits
Queries for commits created during the same 'git fast-import' session
result in a crash:
< reset refs/heads/newbranch
< from <new-commit-oid>
> fatal: not a valid commit: <new-commit-oid>
Getting file content for commit has no issue (working implementation):
< ls <new-commit-oid> file-in-new-commit.txt
> {file content}
During import, new objects may not (yet) be reachable via the ODB layer.
Try to resolve requested tag/commit via object cache first
to avoid crash and (eventually) improve lookup speed.
Signed-off-by: Marc Becker <becm@gmx.de>1 parent 6de20f6 commit 4e50f63
1 file changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
| 296 | + | |
295 | 297 | | |
296 | 298 | | |
297 | 299 | | |
| |||
2658 | 2660 | | |
2659 | 2661 | | |
2660 | 2662 | | |
2661 | | - | |
2662 | 2663 | | |
| 2664 | + | |
2663 | 2665 | | |
2664 | | - | |
2665 | | - | |
2666 | | - | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
2667 | 2677 | | |
2668 | 2678 | | |
2669 | 2679 | | |
| |||
0 commit comments