path: root/git-apply-patch-script
AgeCommit message (Collapse)Author
2005-05-07Fix thinko in the logic to refuse unmerged path fed to git-apply-patch-script.Junio C Hamano
An unmerged path is given as the sole parameter to the script, so it should check against $# being 1, not 2. Signed-off-by: Junio C Hamano <>
2005-05-05Update git-apply-patch-script for symbolic links.Junio C Hamano
This patch updates the git-apply-patch-script for the symbolic links in the cache, recently added by Kay Sievers. It currently is very anal about symbolic link changes. It refuses to change between a regular file and a symbolic link, and only allows symbolic link changes if the patch is based on the same original. Signed-off-by: Junio C Hamano <>
2005-05-04When the patch tries to create a new file and the file exists, abort.Junio C Hamano
This fixes an error introduced to git-apply-patch-script in the previous round. We do not invoke patch for create/delete case, so we need to be a bit careful about detecting conflicts like this. Signed-off-by: Junio C Hamano <>
2005-05-04Terminate diff-* on non-zero exit from GIT_EXTERNAL_DIFFJunio C Hamano
(slightly updated from the version posted to the GIT mailing list with small bugfixes). This patch changes the git-apply-patch-script to exit non-zero when the patch cannot be applied. Previously, the external diff driver deliberately ignored the exit status of GIT_EXTERNAL_DIFF command, which was a design mistake. It now stops the processing when GIT_EXTERNAL_DIFF exits non-zero, so the damages from running git-diff-* with git-apply-patch-script between two wrong trees can be contained. The "diff" command line generated by the built-in driver is changed to always exit 0 in order to match this new behaviour. I know Pasky does not use GIT_EXTERNAL_DIFF yet, so this change should not break Cogito, either. Signed-off-by: Junio C Hamano <>
2005-05-02Make git-apply-patch-script executable.Junio C Hamano
2005-05-02[PATCH] typo fixes to git-apply-patch-scriptJunio C Hamano
When git-apply-patch-script creates a new file without executable mode set, a typo caused it not to report that activity to the user. Also it was mistakenly running git-update-cache twice for newly created or deleted paths. This patch fixes these problems. Signed-off-by: Junio C Hamano <> Signed-off-by: Linus Torvalds <>
2005-05-01[PATCH] Add git-apply-patch-script.Junio C Hamano
I said: - Stop attempting to be compatible with cg-patch, and drop (mode:XXXXXX) bits from the diff. - Do keep the /dev/null change for created and deleted case. - No "Index:" line, no "Mode change:" line, anywhere in the output. Anything that wants the mode bits and sha1 hash can do things from GIT_EXTERNAL_DIFF mechanism. Maybe document suggested usage better. This adds an example script git-apply-patch-script, that can be used as the GIT_EXTERNAL_DIFF to apply changes between two trees directly on the current work tree, like this: GIT_EXTERNAL_DIFF=git-apply-patch-script git-diff-tree -p <tree> <tree> Signed-off-by: Junio C Hamano <> Signed-off-by: Linus Torvalds <>