]> git.ipfire.org Git - thirdparty/git.git/commitdiff
pretty.h: move has_non_ascii() declaration from commit.h
authorElijah Newren <newren@gmail.com>
Fri, 24 Feb 2023 00:09:28 +0000 (00:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Feb 2023 01:25:29 +0000 (17:25 -0800)
The function is defined in pretty.c, so this moves the declaration to
a more logical place.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.h
diffcore-pickaxe.c
pretty.h

index cc2c5da7bdb8344e9dbe69ae16092fcbf004d544..06657b4c6e7494899b4e9671f6dd08d8c5c96db1 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -205,7 +205,6 @@ void free_commit_list(struct commit_list *list);
 
 struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */
 
-int has_non_ascii(const char *text);
 const char *logmsg_reencode(const struct commit *commit,
                            char **commit_encoding,
                            const char *output_encoding);
index 03fcbcb40ba6ab42037d1c429658ed48ee40982f..13c98a7b5e7751c8db6a9d78575a9b76e0313f92 100644 (file)
@@ -2,12 +2,12 @@
  * Copyright (C) 2005 Junio C Hamano
  * Copyright (C) 2010 Google Inc.
  */
-#include "cache.h"
+#include "git-compat-util.h"
 #include "diff.h"
 #include "diffcore.h"
 #include "xdiff-interface.h"
 #include "kwset.h"
-#include "commit.h"
+#include "pretty.h"
 #include "quote.h"
 
 typedef int (*pickaxe_fn)(mmfile_t *one, mmfile_t *two,
index 9508c22f03060f47db11b0969e41e94d388cd70c..921dd6e0cae3dde8a0e2520d607fdeabad8a759a 100644 (file)
--- a/pretty.h
+++ b/pretty.h
@@ -153,6 +153,8 @@ int commit_format_is_empty(enum cmit_fmt);
 /* Make subject of commit message suitable for filename */
 void format_sanitized_subject(struct strbuf *sb, const char *msg, size_t len);
 
+int has_non_ascii(const char *text);
+
 /*
  * Set values of fields in "struct process_trailer_options"
  * according to trailers arguments.