[PATCH] diff: mark some file local symbols as static

Subsystems: the rest

STALE3436d

2 messages, 2 authors, 2017-05-22 · open the first message on its own page

[PATCH] diff: mark some file local symbols as static

From: Ramsay Jones <hidden>
Date: 2017-05-20 23:37:54

Signed-off-by: Ramsay Jones <redacted>
---

Hi Stefan,

If you need to re-roll your 'sb/diff-color-move' branch, could you
please squash this into to the relevant patches. (Each hunk would
be squashed into a separate commit, thus:
  - commit 9b68d54c11, "diff: buffer all output if asked to"
  - commit 4b71ba47ab, "submodule.c: convert show_submodule_summary to use emit_line_fmt"
  - commit 703d25581d, "diff.c: convert show_stats to use emit_line_*"
).

Thanks!

ATB,
Ramsay Jones

 diff.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/diff.c b/diff.c
index ba23c5862..15f389676 100644
--- a/diff.c
+++ b/diff.c
@@ -810,10 +810,10 @@ static void append_buffered_patch_line(struct diff_options *o,
 	f->line = e->line ? xmemdupz(e->line, e->len) : NULL;
 }
 
-void emit_line(struct diff_options *o,
-	       const char *set, const char *reset,
-	       int add_line_prefix, int markup_ws,
-	       int sign, const char *line, int len)
+static void emit_line(struct diff_options *o,
+		      const char *set, const char *reset,
+		      int add_line_prefix, int markup_ws,
+		      int sign, const char *line, int len)
 {
 	struct buffered_patch_line e = {set, reset, line,
 		len, sign, add_line_prefix,
@@ -825,10 +825,10 @@ void emit_line(struct diff_options *o,
 		emit_buffered_patch_line(o, &e);
 }
 
-void emit_line_fmt(struct diff_options *o,
-		   const char *set, const char *reset,
-		   int add_line_prefix,
-		   const char *fmt, ...)
+static void emit_line_fmt(struct diff_options *o,
+			  const char *set, const char *reset,
+			  int add_line_prefix,
+			  const char *fmt, ...)
 {
 	struct strbuf sb = STRBUF_INIT;
 	va_list ap;
@@ -1862,8 +1862,8 @@ static void fill_print_name(struct diffstat_file *file)
 	file->print_name = pname;
 }
 
-void print_stat_summary_0(struct diff_options *options, int files,
-			  int insertions, int deletions)
+static void print_stat_summary_0(struct diff_options *options, int files,
+				 int insertions, int deletions)
 {
 	struct strbuf sb = STRBUF_INIT;
 
-- 
2.13.0

Re: [PATCH] diff: mark some file local symbols as static

From: Stefan Beller <hidden>
Date: 2017-05-22 16:43:35

On Sat, May 20, 2017 at 4:37 PM, Ramsay Jones
[off-list ref] wrote:
Signed-off-by: Ramsay Jones <redacted>
---

Hi Stefan,

If you need to re-roll your 'sb/diff-color-move' branch, could you
please squash this into to the relevant patches. (Each hunk would
be squashed into a separate commit, thus:
  - commit 9b68d54c11, "diff: buffer all output if asked to"
  - commit 4b71ba47ab, "submodule.c: convert show_submodule_summary to use emit_line_fmt"
  - commit 703d25581d, "diff.c: convert show_stats to use emit_line_*"
).

Thanks!
Will do, thanks!
Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help