File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1212#include "packfile.h"
1313#include "object-store.h"
1414#include "repository.h"
15+ #include "submodule.h"
1516#include "midx.h"
1617#include "commit-reach.h"
1718
@@ -1797,7 +1798,7 @@ static enum get_oid_result get_oid_with_context_1(struct repository *repo,
17971798 oc -> path = xstrdup (cp );
17981799
17991800 if (!repo -> index -> cache )
1800- repo_read_index (the_repository );
1801+ repo_read_index (repo );
18011802 pos = index_name_pos (repo -> index , cp , namelen );
18021803 if (pos < 0 )
18031804 pos = - pos - 1 ;
@@ -1842,6 +1843,14 @@ static enum get_oid_result get_oid_with_context_1(struct repository *repo,
18421843 new_filename = resolve_relative_path (repo , filename );
18431844 if (new_filename )
18441845 filename = new_filename ;
1846+ /*
1847+ * NEEDSWORK: Eventually get_tree_entry*() should
1848+ * learn to take struct repository directly and we
1849+ * would not need to inject submodule odb to the
1850+ * in-core odb.
1851+ */
1852+ if (repo != the_repository )
1853+ add_to_alternates_memory (repo -> objects -> odb -> path );
18451854 if (flags & GET_OID_FOLLOW_SYMLINKS ) {
18461855 ret = get_tree_entry_follow_symlinks (& tree_oid ,
18471856 filename , oid , & oc -> symlink_path ,
You can’t perform that action at this time.
0 commit comments