git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Gustavsson" <bgustavsson@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] add -p: make the beginning of the hunk easier to see
Date: Sat, 13 Feb 2010 12:07:51 +0100	[thread overview]
Message-ID: <4B768807.3030003@gmail.com> (raw)

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@gmail.com>
---
 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

             reply	other threads:[~2010-02-13 11:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-13 11:07 Björn Gustavsson [this message]
2010-02-13 11:23 ` [PATCH] add -p: make the beginning of the hunk easier to see Jeff King
2010-02-13 11:25   ` Jeff King
2010-02-13 11:36     ` Björn Gustavsson
2010-02-13 11:33   ` Björn Gustavsson
2010-02-13 11:42     ` Björn Gustavsson
2010-02-13 11:55       ` Jeff King
2010-02-13 14:34         ` Björn Gustavsson
2010-02-13 15:04           ` Julian Phillips
2010-02-13 16:01             ` Björn Gustavsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B768807.3030003@gmail.com \
    --to=bgustavsson@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).