git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Make 'rerere forget' work from a subdirectory.

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jan 21, 2010, 08:23 UTC
Message-ID
<4B580F14.5060105@viscovery.net>
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
Previous: Johannes SixtNext: Junio C Hamano
Message 3 of 5 in “What's cooking in git.git (Jan 2010, #06 draft)”
  1. Junio C HamanoJan 20, 2010
  2. Johannes SixtJan 20, 2010
  3. Make 'rerere forget' work from a subdirectory.Johannes Sixt, Jan 21, 2010
  4. Junio C HamanoJan 21, 2010
  5. Johannes SixtJan 21, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.