Skip to content

Commit

Permalink
Fix a typo in each_file_in_pack_dir_fn()'s declaration
Browse files Browse the repository at this point in the history
One parameter is called `file_pach`. On the face of it, this looks as if
it was supposed to talk about a `path` instead of a `pach`.

However, looking at the way this callback is called, it gets fed the
`d_name` from a directory entry, which provides just the file name, not
the full path. Therefore, let's fix this by calling the parameter
`file_name` instead.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Nov 17, 2023
1 parent cfb8a6e commit 457bc5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const char *pack_basename(struct packed_git *p);
struct packed_git *parse_pack_index(unsigned char *sha1, const char *idx_path);

typedef void each_file_in_pack_dir_fn(const char *full_path, size_t full_path_len,
const char *file_pach, void *data);
const char *file_name, void *data);
void for_each_file_in_pack_dir(const char *objdir,
each_file_in_pack_dir_fn fn,
void *data);
Expand Down

0 comments on commit 457bc5c

Please sign in to comment.