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

Re: [PATCH] add -p: make the beginning of the hunk easier to see

From: Jeff King <hidden>
Date: 2016-06-15 22:48:14

On Sat, Feb 13, 2010 at 06:23:43AM -0500, Jeff King wrote:
On Sat, Feb 13, 2010 at 12:07:51PM +0100, Björn Gustavsson wrote:
quoted
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index cd43c34..4eb7c7c 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -1439,6 +1439,8 @@ sub patch_update_file {
 					 !defined $hunk[$ix]{USE});
 			}
 		}
+	} continue {
+		print "\n" x 4, '=' x 72, "\n";
 	}
 
 	@hunk = coalesce_overlapping_hunks(@hunk);
Wow, I find this terrifically ugly. I guess you don't use
Side note. Even if we did want to do something like this, your
implementation is probably not the right way. It will print the huge
"===" separator even after the last hunk. You would want to keep a
"$shown_any" variable and output the separator before showing a hunk
instead.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help