mirror of
https://github.com/git/git.git
synced 2026-01-10 01:56:42 +00:00
convert: convert convert_to_git to take an index
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
d6c41c20e6
commit
82b474e025
@@ -41,15 +41,17 @@ extern const char *get_wt_convert_stats_ascii(const char *path);
|
||||
extern const char *get_convert_attr_ascii(const char *path);
|
||||
|
||||
/* returns 1 if *dst was used */
|
||||
extern int convert_to_git(const char *path, const char *src, size_t len,
|
||||
extern int convert_to_git(const struct index_state *istate,
|
||||
const char *path, const char *src, size_t len,
|
||||
struct strbuf *dst, enum safe_crlf checksafe);
|
||||
extern int convert_to_working_tree(const char *path, const char *src,
|
||||
size_t len, struct strbuf *dst);
|
||||
extern int renormalize_buffer(const char *path, const char *src, size_t len,
|
||||
struct strbuf *dst);
|
||||
static inline int would_convert_to_git(const char *path)
|
||||
static inline int would_convert_to_git(const struct index_state *istate,
|
||||
const char *path)
|
||||
{
|
||||
return convert_to_git(path, NULL, 0, NULL, 0);
|
||||
return convert_to_git(istate, path, NULL, 0, NULL, 0);
|
||||
}
|
||||
/* Precondition: would_convert_to_git_filter_fd(path) == true */
|
||||
extern void convert_to_git_filter_fd(const struct index_state *istate,
|
||||
|
||||
Reference in New Issue
Block a user