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

Re: [PATCH 04/17] builtin_diff_tree(): make it obvious that function wants two entries

From: Michael Haggerty <hidden>
Date: 2016-06-15 22:57:25

On 05/21/2013 07:27 PM, Junio C Hamano wrote:
Michael Haggerty [off-list ref] writes:
quoted
Instead of accepting an array and using exactly two elements from the
array, take two single (struct object_array_entry *) arguments.

Signed-off-by: Michael Haggerty <redacted>
---
 builtin/diff.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/builtin/diff.c b/builtin/diff.c
index 8c2af6c..ba68c6c 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -153,7 +153,8 @@ static int builtin_diff_index(struct rev_info *revs,
 
 static int builtin_diff_tree(struct rev_info *revs,
 			     int argc, const char **argv,
-			     struct object_array_entry *ent)
+			     struct object_array_entry *ent0,
+			     struct object_array_entry *ent1)
 {
 	const unsigned char *(sha1[2]);
 	int swap = 0;
@@ -161,13 +162,13 @@ static int builtin_diff_tree(struct rev_info *revs,
 	if (argc > 1)
 		usage(builtin_diff_usage);
 
-	/* We saw two trees, ent[0] and ent[1].
-	 * if ent[1] is uninteresting, they are swapped
+	/* We saw two trees, ent0 and ent1.
+	 * if ent1 is uninteresting, they are swapped
 	 */
"While you are touching this comment" is a perfect time to fix the
existing style violation.
Yes.  Will fix in next version.

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help