Re: git-apply does not work in a sub-directory of a Git repository
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 23, 2016, 15:21 UTC
- Message-ID
- <xmqqbn65dxtl.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CACsJy8DCk5YintK3PoO1BWdNmsiSLpAcGL4pU7QgNEG6S41CsQ@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
> 1) add --no-index to force git-apply ignore .git, --git (or some other > name) to apply patches as if running from topdir, add a config key to > choose default behavior
I think we do have --no-index (which is why I am largely ignoring the rest of your message as uninformed speculation for now).
See
http://thread.gmane.org/gmane.comp.version-control.git/288316/focus=288321
I agree it is bad that it silently ignores the path outside the directory. When run with --verbose, we should say "Skipped X that is outside the directory." or something like that, just like we issue notices when we applied with offset, etc.