From: Junio C Hamano Date: Thu, 19 Mar 2026 17:24:00 GMT Subject: Re: git grep failure? Message-ID: In-Reply-To: <7e8159fb-f7ff-41f0-8955-5ed2dd5dc7fe@infradead.org> Randy Dunlap writes: > (/me notes that git am and git apply are different in this regard.) Yup, consider that "git apply" without "--index" is a mere "make goodness invented for Git available outside Git, as a replacement for 'patch'", just like "git diff --no-index" is a mere "make goodness invented for git-diff available outside Git, as a replacement for 'diff'". Their primary value is that they work outside the context of Git without relying on a Git repository, but they have limitations for not relying on a Git repository and data. There are better alternatives (i.e., "apply" with "--index", or "am"; "diff" without "--no-index") if you are working with Git.