threads / patch / 18112

patchRe: [PATCH] grep: add --blame so grep can show blame result at the same time

Subject: Re: [PATCH] grep: add --blame so grep can show blame result at the same time

## tl;dr

One message between Mar 3, 2009 and Mar 3, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Junio C Hamano· Mar 3, 2009, 15:33 UTC · lore
pi song <pi.songs@gmail.com> writes:
> My god, this is too big. I cannot attach or paste in email. What should I
> do?

For a starter, try removing hunks that record only unwarranted changes, such as the following. They are all style regressions.

Show changes to diff +6 −0
@@ -517,6 +563,8 @@ static int grep_buffer_1(struct grep_opt *opt, const char *name,
 				show_name(opt, name);
 				return 1;
 			}
+
+                        
 			/* Hit at this line.  If we haven't shown the
 			 * pre-context lines, we would need to show them.
 			 * When asked to do "count", this still show
@@ -524,7 +572,9 @@ static int grep_buffer_1(struct grep_opt *opt, const char *name,
 			 * deserves to get that ;-).
 			 */
 			if (opt->pre_context) {
+                            
 				unsigned from;
+
 				if (opt->pre_context < lno)
 					from = lno - opt->pre_context;
 				else
@@ -590,8 +664,10 @@ static int grep_buffer_1(struct grep_opt *opt, const char *name,
 	 * make it another option?  For now suppress them.
 	 */
 	if (opt->count && count)
+        {
 		printf("%s%c%u\n", name,
 		       opt->null_following_name ? '\0' : ':', count);
+        }
 	return !!last_hit;
 }
 

← back to recent threads