{"thread":{"id":"1667","subject":"[PATCH] Remove git-apply-patch-script.","startedAt":"2005-08-27T01:19:07Z","lastAt":"2005-08-27T01:19:07Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"7827","messageId":"7v4q9c89dg.fsf@assigned-by-dhcp.cox.net","threadId":"1667","inReplyTo":null,"subject":"[PATCH] Remove git-apply-patch-script.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-08-27T01:19:07Z","receivedAt":"2005-08-27T01:19:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Now the rebase is rewritten to use git cherry-pick, there is no user\nfor that ancient script.  I've checked Cogito and StGIT to make sure\nthey do not use it.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\n\n Documentation/git-apply-patch-script.txt           |   32 ----\n Documentation/git.txt                              |    3 \n .../howto/rebase-from-internal-branch.txt          |    2 \n Makefile                                           |    2 \n git-apply-patch-script                             |  144 --------------------\n git-cherry                                         |   14 --\n 6 files changed, 4 insertions(+), 193 deletions(-)\n delete mode 100644 Documentation/git-apply-patch-script.txt\n delete mode 100755 git-apply-patch-script\n\nad3f5eb30999095f276f8d4664f3e7884296c797\ndiff --git a/Documentation/git-apply-patch-script.txt b/Documentation/git-apply-patch-script.txt\ndeleted file mode 100644\n--- a/Documentation/git-apply-patch-script.txt\n+++ /dev/null\n@@ -1,32 +0,0 @@\n-git-apply-patch-script(1)\n-=========================\n-v0.99.4, May 2005\n-\n-NAME\n-----\n-git-apply-patch-script - Sample script to apply the diffs from git-diff-*\n-\n-\n-SYNOPSIS\n---------\n-'git-apply-patch-script'\n-\n-DESCRIPTION\n------------\n-This is a sample script to be used via the 'GIT_EXTERNAL_DIFF'\n-environment variable to apply the differences that the \"git-diff-*\"\n-family of commands report to the current work tree.\n-\n-\n-Author\n-------\n-Written by Junio C Hamano <junkio@cox.net>\n-\n-Documentation\n---------------\n-Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.\n-\n-GIT\n----\n-Part of the link:git.html[git] suite\n-\ndiff --git a/Documentation/git.txt b/Documentation/git.txt\n--- a/Documentation/git.txt\n+++ b/Documentation/git.txt\n@@ -242,9 +242,6 @@ Ancillary Commands\n ------------------\n Manipulators:\n \n-link:git-apply-patch-script.html[git-apply-patch-script]::\n-\tSample script to apply the diffs from git-diff-*\n-\n link:git-convert-cache.html[git-convert-cache]::\n \tConverts old-style GIT repository\n \ndiff --git a/Documentation/howto/rebase-from-internal-branch.txt b/Documentation/howto/rebase-from-internal-branch.txt\n--- a/Documentation/howto/rebase-from-internal-branch.txt\n+++ b/Documentation/howto/rebase-from-internal-branch.txt\n@@ -38,7 +38,7 @@ ancestry graph looked like this:\n So I started from master, made a bunch of edits, and committed:\n \n     $ git checkout master\n-    $ cd Documentation; ed git.txt git-apply-patch-script.txt ...\n+    $ cd Documentation; ed git.txt ...\n     $ cd ..; git add Documentation/*.txt\n     $ git commit -s -v\n \ndiff --git a/Makefile b/Makefile\n--- a/Makefile\n+++ b/Makefile\n@@ -57,7 +57,7 @@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powe\n \n \n \n-SCRIPTS=git git-apply-patch-script git-merge-one-file-script git-prune-script \\\n+SCRIPTS=git git-merge-one-file-script git-prune-script \\\n \tgit-pull-script git-tag-script git-resolve-script git-whatchanged \\\n \tgit-fetch-script git-status-script git-commit-script \\\n \tgit-log-script git-shortlog git-cvsimport-script git-diff-script \\\ndiff --git a/git-apply-patch-script b/git-apply-patch-script\ndeleted file mode 100755\n--- a/git-apply-patch-script\n+++ /dev/null\n@@ -1,144 +0,0 @@\n-#!/bin/sh\n-# Copyright (C) 2005 Junio C Hamano\n-#\n-# Applying diff between two trees to the work tree can be\n-# done with the following single command:\n-#\n-# GIT_EXTERNAL_DIFF=git-apply-patch-script git-diff-tree -p $tree1 $tree2\n-#\n-\n-case \"$#\" in\n-1)\n-    echo >&2 \"cannot handle unmerged diff on path $1.\"\n-    exit 1 ;;\n-8 | 9)\n-    echo >&2 \"cannot handle rename diff between $1 and $8 yet.\"\n-    exit 1 ;;\n-esac\n-name=\"$1\" tmp1=\"$2\" hex1=\"$3\" mode1=\"$4\" tmp2=\"$5\" hex2=\"$6\" mode2=\"$7\"\n-\n-type1=f\n-case \"$mode1\" in\n-*120???) type1=l  ;;\n-*1007??) mode1=+x ;;\n-*1006??) mode1=-x ;;\n-.)       type1=-  ;; \n-esac\n-\n-type2=f\n-case \"$mode2\" in\n-*120???) type2=l  ;;\n-*1007??) mode2=+x ;;\n-*1006??) mode2=-x ;;\n-.)       type2=-  ;; \n-esac\n-\n-case \"$type1,$type2\" in\n-\n--,?)\n-    dir=$(dirname \"$name\")\n-    case \"$dir\" in '' | .) ;; *) mkdir -p \"$dir\" ;; esac || {\n-\techo >&2 \"cannot create leading path for $name.\"\n-\texit 1\n-    }\n-    if test -e \"$name\"\n-    then\n-\techo >&2 \"path $name to be created already exists.\"\n-\texit 1\n-    fi\n-    case \"$type2\" in\n-    f)\n-        # creating a regular file\n-\tcat \"$tmp2\" >\"$name\" || {\n-\t    echo >&2 \"cannot create a regular file $name.\"\n-\t    exit 1\n-\t} \n-\tcase \"$mode2\" in\n-\t+x)\n-\t    echo >&2 \"created a regular file $name with mode +x.\"\n-\t    chmod \"$mode2\" \"$name\"\n-\t    ;;\n-\t-x)\n-\t    echo >&2 \"created a regular file $name.\"\n-            ;;\n-        esac\n-\t;;\n-    l)\n-        # creating a symlink\n-        ln -s \"$(cat \"$tmp2\")\" \"$name\" || {\n-\t    echo >&2 \"cannot create a symbolic link $name.\"\n-\t    exit 1\n-\t}\n-\techo >&2 \"created a symbolic link $name.\"\n-        ;;\n-    *)\n-        echo >&2 \"do not know how to create $name of type $type2.\"\n-\texit 1\n-    esac\n-    git-update-cache --add -- \"$name\" ;;\n-\n-?,-)\n-    rm -f \"$name\" || {\n-\techo >&2 \"cannot remove $name\"\n-\texit 1\n-    }\n-    echo >&2 \"deleted $name.\"\n-    git-update-cache --remove -- \"$name\" ;;\n-\n-l,f|f,l)\n-    echo >&2 \"cannot change a regular file $name and a symbolic link $name.\"\n-    exit 1 ;;\n-\n-l,l)\n-    # symlink to symlink\n-    current=$(readlink \"$name\") || {\n-\techo >&2 \"cannot read the target of the symbolic link $name.\"\n-\texit 1\n-    }\n-    original=$(cat \"$tmp1\")\n-    next=$(cat \"$tmp2\")\n-    test \"$original\" != \"$current\" || {\n-\techo >&2 \"cannot apply symbolic link target change ($original->$next) to $name which points to $current.\"\n-\texit 1\n-    }\n-    if test \"$next\" != \"$current\"\n-    then\n-\trm -f \"$name\" && ln -s \"$next\" \"$name\" || {\n-\t    echo >&2 \"cannot create symbolic link $name.\"\n-\t    exit 1\n-\t}\n-\techo >&2 \"changed symbolic target of $name.\"\n-        git-update-cache -- \"$name\"\n-    fi ;;\n-\n-f,f)\n-    # changed\n-    test -e \"$name\" || {\n-\techo >&2 \"regular file $name to be patched does not exist.\"\n-\texit 1\n-    }\n-    dir=$(dirname \"$name\")\n-    case \"$dir\" in '' | .) ;; *) mkdir -p \"$dir\";; esac || {\n-\techo >&2 \"cannot create leading path for $name.\"\n-\texit 1\n-    }\n-    tmp=.git-apply-patch-$$\n-    trap \"rm -f $tmp-*\" 0 1 2 3 15\n-\n-    # Be careful, in case \"$tmp2\" is borrowed path from the work tree\n-    # we are looking at...\n-    diff -u -L \"a/$name\" -L \"b/$name\" \"$tmp1\" \"$tmp2\" >$tmp-patch\n-\n-    # This will say \"patching ...\" so we do not say anything outselves.\n-    patch -p1 <$tmp-patch || exit\n-    rm -f $tmp-patch\n-    case \"$mode1,$mode2\" in\n-    \"$mode2,$mode1\") ;;\n-    *)\n-\tchmod \"$mode2\" \"$name\"\n-\techo >&2 \"changed mode from $mode1 to $mode2.\"\n-\t;;\n-    esac\n-    git-update-cache -- \"$name\"\n-\n-esac\ndiff --git a/git-cherry b/git-cherry\n--- a/git-cherry\n+++ b/git-cherry\n@@ -15,18 +15,8 @@ usage=\"usage: $0 \"'[-v] <upstream> [<hea\n Each commit between the fork-point and <head> is examined, and\n compared against the change each commit between the fork-point and\n <upstream> introduces.  If the change does not seem to be in the\n-upstream, it is shown on the standard output.\n-\n-The output is intended to be used as:\n-\n-    OLD_HEAD=$(git-rev-parse HEAD)\n-    git-rev-parse upstream >${GIT_DIR-.}/HEAD\n-    git-cherry upstream $OLD_HEAD |\n-    while read commit\n-    do\n-        GIT_EXTERNAL_DIFF=git-apply-patch-script git-diff-tree -p \"$commit\" &&\n-\tgit-commit-script -C \"$commit\"\n-    done\n+upstream, it is shown on the standard output with prefix \"+\".  Otherwise\n+it is shown with prefix \"-\".\n '\n \n case \"$1\" in -v) verbose=t; shift ;; esac \n"}]}