git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[BUG] "git apply --index" with missing --directory option silently does nothing

From
YDYann Dirson <dirson@bertin.fr>
Date
Feb 2, 2011, 09:24 UTC
Message-ID
<20110202102445.6ff6c8e4@chalon.bertin.fr>

When applying a patch file for a subtree of a git repo, where was required is "git apply --index --directory=...", if the user forgets to add the --directory flag, then git should bomb out saying it cannot apply the patch.

But what happens is that nothing happens, and git stays silent about having done nothing:

~/softs/tmp/linux-2.6.32$ git rev-parse --git-dir /home/localadm/softs/tmp/.git ~/softs/tmp/linux-2.6.32$ bzcat /home/localadm/Downloads/patch-2.6.32.28.bz2 | git apply --index --whitespace=nowarn ~/softs/tmp/linux-2.6.32$ echo $? 0 ~/softs/tmp/linux-2.6.32$ git status # On branch master nothing to commit (working directory clean)

-- 
Yann Dirson - Bertin Technologies
Message 1 of 1 in “[BUG] "git apply --index" with missing --directory option silently does nothing”
  1. Yann DirsonFeb 2, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.