{"thread":{"id":"26386","subject":"[BUG] \"git apply --index\" with missing --directory option silently does nothing","startedAt":"2011-02-02T09:24:45Z","lastAt":"2011-02-02T09:24:45Z","messageCount":1,"participants":["Yann Dirson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"160260","messageId":"20110202102445.6ff6c8e4@chalon.bertin.fr","threadId":"26386","inReplyTo":null,"subject":"[BUG] \"git apply --index\" with missing --directory option silently does nothing","fromName":"Yann Dirson","fromEmail":"dirson@bertin.fr","sentAt":"2011-02-02T09:24:45Z","receivedAt":"2011-02-02T09:24:45Z","isPatch":false,"sender":{"key":"dirson@bertin.fr","avatar":null},"body":"\nWhen applying a patch file for a subtree of a git repo, where was\nrequired is \"git apply --index --directory=...\", if the user forgets\nto add the --directory flag, then git should bomb out saying it cannot\napply the patch.\n\nBut what happens is that nothing happens, and git stays silent about\nhaving done nothing:\n\n~/softs/tmp/linux-2.6.32$ git rev-parse --git-dir\n/home/localadm/softs/tmp/.git\n~/softs/tmp/linux-2.6.32$ bzcat /home/localadm/Downloads/patch-2.6.32.28.bz2 | git apply --index --whitespace=nowarn\n~/softs/tmp/linux-2.6.32$ echo $?\n0\n~/softs/tmp/linux-2.6.32$ git status\n# On branch master\nnothing to commit (working directory clean)\n\n-- \nYann Dirson - Bertin Technologies\n"}]}