Re: [PATCH 06/12] apply: run setup_git_directory_gently() sooner
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Aug 15, 2010, 22:34 UTC
- Message-ID
- <AANLkTim6E8JFyjM=gdhbobm4sOskCJyHvT5oGj9fhoAd@mail.gmail.com>
- In-Reply-To
- <AANLkTi=pAvJ=R9XVvo9fJqo6RPa+hn3dMfj2UGqTFCbU@mail.gmail.com>
On Mon, Aug 16, 2010 at 6:13 AM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 15 quoted lines
> 2010/8/6 Jonathan Nieder <jrnieder@gmail.com>: >> From: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> >> >> As v1.7.2~16^2 (2010-07-14) explains, without this change, >> “git --paginate apply” can ignore the repository-local >> “[core] pager” configuration. > > Applying this patch broke the following tests: > > ./t4119-apply-config.sh ./t4111-apply-subdir.sh > ./t4131-apply-fake-ancestor.sh > > I didn't look into why, they're breaking in pu now at 6ea3604. I > didn't look into why, see the smoke report at > http://smoke.git.nix.is/app/projects/report_details/33
The patch loses prefix and git-apply couldn't find files on disk. This patch may fix it. I'm running tests now.
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_; prefix_length = prefix ? strlen(prefix) : 0; git_config(git_apply_config, NULL); if (apply_default_whitespace)
-- Duy