git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH] Make 'rerere forget' work from a subdirectory.
Date: Thu, 21 Jan 2010 09:23:48 +0100	[thread overview]
Message-ID: <4B580F14.5060105@viscovery.net> (raw)
In-Reply-To: <4B56F916.7090503@viscovery.net>

From: Johannes Sixt <j6t@kdbg.org>

It forgot to apply the prefix to the paths given on the command line.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 Johannes Sixt schrieb:
 > Junio C Hamano schrieb:
 >> * jc/cache-unmerge (2009-12-25) 9 commits
 >>   (merged to 'next' on 2010-01-13 at 2290c44)
 >>  + rerere forget path: forget recorded resolution
 >
 > Heads up: there is something fishy with the pathspec on Windows (foo\bar
 > is not recognized as foo/bar, but it should be). Will investigate.

 A call get_pathspec is necessary, which applies the prefix and also
 converts Windows's backslashes to forward-slashes.

 -- Hannes

 builtin-rerere.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/builtin-rerere.c b/builtin-rerere.c
index 25f507a..34f9ace 100644
--- a/builtin-rerere.c
+++ b/builtin-rerere.c
@@ -120,8 +120,10 @@ int cmd_rerere(int argc, const char **argv, const char *prefix)
 	if (argc < 2)
 		return rerere(flags);

-	if (!strcmp(argv[1], "forget"))
-		return rerere_forget(argv + 2);
+	if (!strcmp(argv[1], "forget")) {
+		const char **pathspec = get_pathspec(prefix, argv + 2);
+		return rerere_forget(pathspec);
+	}

 	fd = setup_rerere(&merge_rr, flags);
 	if (fd < 0)
-- 
1.6.6.1.1388.g96b4

  reply	other threads:[~2010-01-21  8:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-20 10:24 What's cooking in git.git (Jan 2010, #06 draft) Junio C Hamano
2010-01-20 12:37 ` Johannes Sixt
2010-01-21  8:23   ` Johannes Sixt [this message]
2010-01-21  8:42     ` [PATCH] Make 'rerere forget' work from a subdirectory Junio C Hamano
2010-01-21  9:31       ` Johannes Sixt

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=4B580F14.5060105@viscovery.net \
    --to=j.sixt@viscovery.net \
    --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).