Merge branch 'ds/midx-normalize-pathname-before-comparison'

The path taken by "git multi-pack-index" command from the end user
was compared with path internally prepared by the tool withut first
normalizing, which lead to duplicated paths not being noticed,
which has been corrected.

* ds/midx-normalize-pathname-before-comparison:
  cache: use const char * for get_object_directory()
  multi-pack-index: use --object-dir real path
  midx: use real paths in lookup_multi_pack_index()
This commit is contained in:
Junio C Hamano
2022-05-04 09:51:29 -07:00
4 changed files with 49 additions and 17 deletions

View File

@ -273,7 +273,7 @@ const char *get_git_work_tree(void)
return the_repository->worktree;
}
char *get_object_directory(void)
const char *get_object_directory(void)
{
if (!the_repository->objects->odb)
BUG("git environment hasn't been setup");