@@ -61,11 +61,6 @@ static int path_hashmap_cmp(const void *cmp_data,
6161 return strcmp (a -> path , key ? key : b -> path );
6262}
6363
64- static unsigned int path_hash (const char * path )
65- {
66- return ignore_case ? strihash (path ) : strhash (path );
67- }
68-
6964/*
7065 * For dir_rename_entry, directory names are stored as a full path from the
7166 * toplevel of the repository and do not include a trailing '/'. Also:
@@ -463,7 +458,7 @@ static int save_files_dirs(const struct object_id *oid,
463458 strbuf_addstr (base , path );
464459
465460 FLEX_ALLOC_MEM (entry , path , base -> buf , base -> len );
466- hashmap_entry_init (& entry -> e , path_hash (entry -> path ));
461+ hashmap_entry_init (& entry -> e , fspathhash (entry -> path ));
467462 hashmap_add (& opt -> priv -> current_file_dir_set , & entry -> e );
468463
469464 strbuf_setlen (base , baselen );
@@ -737,14 +732,14 @@ static char *unique_path(struct merge_options *opt,
737732
738733 base_len = newpath .len ;
739734 while (hashmap_get_from_hash (& opt -> priv -> current_file_dir_set ,
740- path_hash (newpath .buf ), newpath .buf ) ||
735+ fspathhash (newpath .buf ), newpath .buf ) ||
741736 (!opt -> priv -> call_depth && file_exists (newpath .buf ))) {
742737 strbuf_setlen (& newpath , base_len );
743738 strbuf_addf (& newpath , "_%d" , suffix ++ );
744739 }
745740
746741 FLEX_ALLOC_MEM (entry , path , newpath .buf , newpath .len );
747- hashmap_entry_init (& entry -> e , path_hash (entry -> path ));
742+ hashmap_entry_init (& entry -> e , fspathhash (entry -> path ));
748743 hashmap_add (& opt -> priv -> current_file_dir_set , & entry -> e );
749744 return strbuf_detach (& newpath , NULL );
750745}
0 commit comments