summaryrefslogtreecommitdiff
path: root/sideband.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-01-29 23:35:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-02-10 21:40:20 (GMT)
commitc536c0755f6450b7bcce499cfda171f8c6d1e593 (patch)
tree16e7272d8411592c0743e08182823d7084d42c36 /sideband.c
parent3d8a54eb37d298c251c0b6823dc06935a611bc33 (diff)
downloadgit-c536c0755f6450b7bcce499cfda171f8c6d1e593.zip
git-c536c0755f6450b7bcce499cfda171f8c6d1e593.tar.gz
git-c536c0755f6450b7bcce499cfda171f8c6d1e593.tar.bz2
apply: reject input that touches outside the working area
By default, a patch that affects outside the working area (either a Git controlled working tree, or the current working directory when "git apply" is used as a replacement of GNU patch) is rejected as a mistake (or a mischief). Git itself does not create such a patch, unless the user bends over backwards and specifies a non-standard prefix to "git diff" and friends. When `git apply` is used as a "better GNU patch", the user can pass the `--unsafe-paths` option to override this safety check. This option has no effect when `--index` or `--cached` is in use. The new test was stolen from Jeff King with slight enhancements. Note that a few new tests for touching outside the working area by following a symbolic link are still expected to fail at this step, but will be fixed in later steps. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sideband.c')
0 files changed, 0 insertions, 0 deletions