Skip to content

Commit 7ce7c76

Browse files
sprohaskagitster
authored andcommitted
convert: drop arguments other than 'path' from would_convert_to_git()
It is only the path that matters in the decision whether to filter or not. Clarify this by making path the only argument of would_convert_to_git(). Signed-off-by: Steffen Prohaska <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6c4ab27 commit 7ce7c76

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

convert.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ extern int convert_to_working_tree(const char *path, const char *src,
4040
size_t len, struct strbuf *dst);
4141
extern int renormalize_buffer(const char *path, const char *src, size_t len,
4242
struct strbuf *dst);
43-
static inline int would_convert_to_git(const char *path, const char *src,
44-
size_t len, enum safe_crlf checksafe)
43+
static inline int would_convert_to_git(const char *path)
4544
{
46-
return convert_to_git(path, src, len, NULL, checksafe);
45+
return convert_to_git(path, NULL, 0, NULL, 0);
4746
}
4847

4948
/*****************************************************************

sha1_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3144,7 +3144,7 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st,
31443144
if (!S_ISREG(st->st_mode))
31453145
ret = index_pipe(sha1, fd, type, path, flags);
31463146
else if (size <= big_file_threshold || type != OBJ_BLOB ||
3147-
(path && would_convert_to_git(path, NULL, 0, 0)))
3147+
(path && would_convert_to_git(path)))
31483148
ret = index_core(sha1, fd, size, type, path, flags);
31493149
else
31503150
ret = index_stream(sha1, fd, size, type, path, flags);

0 commit comments

Comments
 (0)