summaryrefslogtreecommitdiff
path: root/convert.h
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-06-12 22:13:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-13 18:40:51 (GMT)
commit82b474e025e89cfa294e81611c81355a73dc23a2 (patch)
tree7e0114fa1a11212629ff9c47a95a59fdb69222bd /convert.h
parentd6c41c20e688a1b284b92d92320ba56f639688de (diff)
downloadgit-82b474e025e89cfa294e81611c81355a73dc23a2.zip
git-82b474e025e89cfa294e81611c81355a73dc23a2.tar.gz
git-82b474e025e89cfa294e81611c81355a73dc23a2.tar.bz2
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>
Diffstat (limited to 'convert.h')
-rw-r--r--convert.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/convert.h b/convert.h
index 3a813a7..60cb41d 100644
--- a/convert.h
+++ b/convert.h
@@ -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,