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. :)