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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When using "git add -p" to selectively add hunks, I find
it hard to quickly see where the current hunk starts and
the previous stops, because the new hunk starts right
after the action prompt for the previous hunk.

Facilitate easy scanning for the beginning of the current
hunk by adding some blank lines and a line of equal
signs before the current hunk.

Signed-off-by: Björn Gustavsson <bgustavsson@xxxxxxxxx>
---
 git-add--interactive.perl |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

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);
-- 
1.7.0

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]