git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] grep: add --blame so grep can show blame result at the  same time
       [not found] ` <1b29507a0903030427y15ad89d7y9f55a945612f0e20@mail.gmail.com>
@ 2009-03-03 15:33   ` Junio C Hamano
  0 siblings, 0 replies; only message in thread
From: Junio C Hamano @ 2009-03-03 15:33 UTC (permalink / raw)
  To: pi.songs; +Cc: git

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.

@@ -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;
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-03 15:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1b29507a0903030425j7723e7f4wb46f5adf5a3c7c91@mail.gmail.com>
     [not found] ` <1b29507a0903030427y15ad89d7y9f55a945612f0e20@mail.gmail.com>
2009-03-03 15:33   ` [PATCH] grep: add --blame so grep can show blame result at the same time Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).