Thread (11 messages) flat view 11 messages, 5 authors, 2016-06-15

Re: [RFC/PATCH 2/4] textconv: make diff_options accessible from blame

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:54

Axel Bonnet [off-list ref] writes:
Diff_options specify whether conversion is activated or not. Blame needs
to access these options in order to concert files with external drivers

Signed-off-by: Diane Gasselin <redacted>
Signed-off-by: Clément Poulain <redacted>
Signed-off-by: Axel Bonnet <redacted>
The name of Clément is spelled correctly on the mail header while S-o-b
line is corrupt.  Perhaps you have recorded your commits in UTF-8 but
allowed your MUA to send in 8859-1?  This comment applies to all the
patches in the series.
quoted hunk ↗ jump to hunk
diff --git a/builtin/blame.c b/builtin/blame.c
index fc15863..63b497c 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -89,7 +89,8 @@ struct origin {
  * Given an origin, prepare mmfile_t structure to be used by the
  * diff machinery
  */
-static void fill_origin_blob(struct origin *o, mmfile_t *file)
+static void fill_origin_blob(struct diff_options opt,
+			     struct origin *o, mmfile_t *file)
 {
 	if (!o->file.ptr) {
 		enum object_type type;
Two points.

 * Generally we do not want to pass structures by value.  It is especially
   true when the structure is bigger than one word, and accesses to the
   variable in the callee is read-only.

 * The callee does not seem to use the new parameter yet.  You might want
   to defer this change until fill-origin-blob actually starts using it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help