Thread (30 messages) flat view 30 messages, 5 authors, 2016-06-15

Re: [PATCH 06/12] apply: run setup_git_directory_gently() sooner

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:19

Nguyen Thai Ngoc Duy wrote:
The patch loses prefix and git-apply couldn't find files on disk. This
patch may fix it. I'm running tests now.
Oh, good catch.  Thanks!
quoted hunk ↗ jump to hunk
diff --git a/builtin/apply.c b/builtin/apply.c
index 6c4b747..29f4194 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -3779,7 +3779,7 @@ static int option_parse_directory(const struct
option *opt,
 	return 0;
 }

-int cmd_apply(int argc, const char **argv, const char *unused_prefix)
+int cmd_apply(int argc, const char **argv, const char *prefix_)
 {
 	int i;
 	int errs = 0;
@@ -3856,6 +3856,7 @@ int cmd_apply(int argc, const char **argv, const
char *unused_prefix)
 		OPT_END()
 	};

+	prefix = prefix_;
This is why we shouldn’t be using globals so cavalierly. :)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help