All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: git@vger.kernel.org
Cc: Eric Wong <normalperson@yhbt.net>
Subject: [PATCH 2/5] status: show files that would have resolutions recorded by rerere
Date: Fri,  8 Dec 2006 02:49:27 -0800	[thread overview]
Message-ID: <11655749732181-git-send-email-normalperson@yhbt.net> (raw)
In-Reply-To: <20061205092126.GE27236@soma>

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-commit.sh   |   17 ++++++++++++++++-
 git-rerere.perl |   18 ++++++++++++------
 2 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/git-commit.sh b/git-commit.sh
index 81c3a0c..9f6d1ef 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -48,7 +48,22 @@ run_status () {
 		GIT_INDEX_FILE="$NEXT_INDEX"
 		export GIT_INDEX_FILE
 	fi
-
+	if test -d "$GIT_DIR/rr-cache"
+	then
+	    rr_shown=
+	    git-rerere status | while read line; do
+		if [ -z "$rr_shown" ]; then
+		    echo '#'
+		    echo '# Resolutions to be recorded for files:'
+		    echo '#   (git-rerere will automatically record' \
+			 'conflict resolutions'
+		    echo '#    when these files are committed)'
+		    echo '#'
+		    rr_shown=1
+		fi
+		echo  "#	$line"
+	    done
+	fi
 	case "$status_only" in
 	t) color= ;;
 	*) color=--nocolor ;;
diff --git a/git-rerere.perl b/git-rerere.perl
index dd86577..b78194a 100755
--- a/git-rerere.perl
+++ b/git-rerere.perl
@@ -173,14 +173,20 @@ sub merge {
 
 read_rr();
 
-if (@ARGV && $ARGV[0] eq 'clear') {
-	for my $path (keys %merge_rr) {
-		my $name = $merge_rr{$path};
-		if (-d "$rr_dir/$name") {
-			rmtree(["$rr_dir/$name"]);
+if (my $arg = shift @ARGV) {
+	if ($arg eq 'clear') {
+		for my $path (keys %merge_rr) {
+			my $name = $merge_rr{$path};
+			if (-d "$rr_dir/$name") {
+				rmtree(["$rr_dir/$name"]);
+			}
+		}
+		unlink $merge_rr;
+	} elsif ($arg eq 'status') {
+		for my $path (keys %merge_rr) {
+			print $path, "\n";
 		}
 	}
-	unlink $merge_rr;
 	exit 0;
 }
 
-- 
1.4.4.2.g860f4

  parent reply	other threads:[~2006-12-08 10:49 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-03 17:01 Some advanced index playing Alan Chandler
2006-12-03 18:24 ` Linus Torvalds
2006-12-03 19:36   ` Junio C Hamano
2006-12-03 20:11   ` Alan Chandler
2006-12-03 20:19     ` Jakub Narebski
2006-12-03 20:29       ` Alan Chandler
2006-12-03 20:40     ` Linus Torvalds
2006-12-04 10:41   ` Junio C Hamano
2006-12-03 18:31 ` Jakub Narebski
2006-12-03 18:34 ` Linus Torvalds
2006-12-03 20:26   ` Junio C Hamano
2006-12-05  3:48     ` [PATCH] git-explain Junio C Hamano
2006-12-05  3:55       ` Nicolas Pitre
2006-12-05  3:57         ` J. Bruce Fields
2006-12-05  6:09           ` Junio C Hamano
2006-12-05  7:26             ` Jeff King
2006-12-05  9:21               ` Eric Wong
2006-12-08 10:49                 ` [RFC/PATCH 0/5] WIP status/rerere reporting Eric Wong
2006-12-08 10:49                 ` [PATCH 1/5] rerere: avoid misrecording on a skipped or aborted rebase/am Eric Wong
2006-12-08 19:33                   ` Junio C Hamano
2006-12-08 20:04                     ` [PATCH 6/5] git-rerere: document the 'clear' and 'diff' commands Eric Wong
2006-12-08 20:43                   ` [PATCH 1/5] rerere: avoid misrecording on a skipped or aborted rebase/am Junio C Hamano
2006-12-08 21:28                     ` Eric Wong
2006-12-08 21:29                       ` [PATCH] rerere: add clear, diff, and status commands Eric Wong
2006-12-08 21:29                         ` [PATCH] rerere: record (or avoid misrecording) resolved, skipped or aborted rebase/am Eric Wong
2006-12-08 21:44                           ` Jakub Narebski
2006-12-08 21:50                             ` Eric Wong
2006-12-09 20:08                           ` Junio C Hamano
2006-12-08 10:49                 ` Eric Wong [this message]
2006-12-08 10:49                 ` [PATCH 3/5] am and rebase resolve states get picked up by status/commit Eric Wong
2006-12-08 10:49                 ` [PATCH 4/5] am: run git rerere to record resolution on successful --resolved Eric Wong
2006-12-08 10:49                 ` [PATCH 5/5] rerere: add the diff command Eric Wong
2006-12-08 12:07                   ` Jakub Narebski
2006-12-05 17:34               ` [PATCH] git-explain Horst H. von Brand
2006-12-05  8:58             ` Johannes Schindelin
2006-12-05 21:00               ` J. Bruce Fields
2006-12-05  9:11             ` Raimund Bauer
2006-12-05 10:43       ` Jakub Narebski
2006-12-05 23:00         ` Martin Langhoff
2006-12-05 23:07           ` Junio C Hamano
2006-12-05 23:37             ` Johannes Schindelin
2006-12-05 23:57               ` Junio C Hamano
2006-12-06  0:07                 ` Carl Worth
2006-12-06  0:27                 ` Johannes Schindelin
2006-12-06  1:50                   ` Nicolas Pitre
2006-12-03 20:40   ` Some advanced index playing Alan Chandler

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=11655749732181-git-send-email-normalperson@yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.