Remove git-apply-patch-script.
authorJunio C Hamano <junkio@cox.net>
Sat, 27 Aug 2005 00:27:07 +0000 (17:27 -0700)
committerJunio C Hamano <junkio@cox.net>
Mon, 29 Aug 2005 19:52:03 +0000 (12:52 -0700)
Now the rebase is rewritten to use git cherry-pick, there is no user
for that ancient script. I've checked Cogito and StGIT to make sure
they do not use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-apply-patch-script.txt [deleted file]
Documentation/git.txt
Documentation/howto/rebase-from-internal-branch.txt
Makefile
git-apply-patch-script [deleted file]
git-cherry
diff --git a/Documentation/git-apply-patch-script.txt b/Documentation/git-apply-patch-script.txt
deleted file mode 100644 (file)
index 808d3cd..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-git-apply-patch-script(1)
-=========================
-v0.99.4, May 2005
-
-NAME
-----
-git-apply-patch-script - Sample script to apply the diffs from git-diff-*
-
-
-SYNOPSIS
---------
-'git-apply-patch-script'
-
-DESCRIPTION
------------
-This is a sample script to be used via the 'GIT_EXTERNAL_DIFF'
-environment variable to apply the differences that the "git-diff-*"
-family of commands report to the current work tree.
-
-
-Author
-------
-Written by Junio C Hamano <junkio@cox.net>
-
-Documentation
---------------
-Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
-
-GIT
----
-Part of the link:git.html[git] suite
-
index f63cbdd3727237b02c5be5b6f164dcae1fefd2f6..807a470076fc0b53a92a6ceaad9bc6d7f0b47ab6 100644 (file)
@@ -260,9 +260,6 @@ Manipulators:
 link:git-relink-script.html[git-relink-script]::
        Hardlink common objects in local repositories.
 
 link:git-relink-script.html[git-relink-script]::
        Hardlink common objects in local repositories.
 
-link:git-apply-patch-script.html[git-apply-patch-script]::
-       Sample script to apply the diffs from git-diff-*
-
 link:git-convert-cache.html[git-convert-cache]::
        Converts old-style GIT repository
 
 link:git-convert-cache.html[git-convert-cache]::
        Converts old-style GIT repository
 
index f627e4271c40fc2c4b28f825828e205b2fc8cb88..4523b69d4fc018a67835e0751f08c9be17635d65 100644 (file)
@@ -38,7 +38,7 @@ ancestry graph looked like this:
 So I started from master, made a bunch of edits, and committed:
 
     $ git checkout master
 So I started from master, made a bunch of edits, and committed:
 
     $ git checkout master
-    $ cd Documentation; ed git.txt git-apply-patch-script.txt ...
+    $ cd Documentation; ed git.txt ...
     $ cd ..; git add Documentation/*.txt
     $ git commit -s -v
 
     $ cd ..; git add Documentation/*.txt
     $ git commit -s -v
 
index 13ad6d89ee9703cfff962215ef4e6604f9a70afd..007d42b0383f3c8dbc9dba703260b9d1e785fac7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -57,7 +57,7 @@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
 
 
 
 
 
 
-SCRIPTS=git git-apply-patch-script git-merge-one-file-script git-prune-script \
+SCRIPTS=git git-merge-one-file-script git-prune-script \
        git-pull-script git-tag-script git-resolve-script git-whatchanged \
        git-fetch-script git-status-script git-commit-script \
        git-log-script git-shortlog git-cvsimport-script git-diff-script \
        git-pull-script git-tag-script git-resolve-script git-whatchanged \
        git-fetch-script git-status-script git-commit-script \
        git-log-script git-shortlog git-cvsimport-script git-diff-script \
diff --git a/git-apply-patch-script b/git-apply-patch-script
deleted file mode 100755 (executable)
index 6261fd8..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2005 Junio C Hamano
-#
-# Applying diff between two trees to the work tree can be
-# done with the following single command:
-#
-# GIT_EXTERNAL_DIFF=git-apply-patch-script git-diff-tree -p $tree1 $tree2
-#
-
-case "$#" in
-1)
-    echo >&2 "cannot handle unmerged diff on path $1."
-    exit 1 ;;
-8 | 9)
-    echo >&2 "cannot handle rename diff between $1 and $8 yet."
-    exit 1 ;;
-esac
-name="$1" tmp1="$2" hex1="$3" mode1="$4" tmp2="$5" hex2="$6" mode2="$7"
-
-type1=f
-case "$mode1" in
-*120???) type1=l  ;;
-*1007??) mode1=+x ;;
-*1006??) mode1=-x ;;
-.)       type1=-  ;; 
-esac
-
-type2=f
-case "$mode2" in
-*120???) type2=l  ;;
-*1007??) mode2=+x ;;
-*1006??) mode2=-x ;;
-.)       type2=-  ;; 
-esac
-
-case "$type1,$type2" in
-
--,?)
-    dir=$(dirname "$name")
-    case "$dir" in '' | .) ;; *) mkdir -p "$dir" ;; esac || {
-       echo >&2 "cannot create leading path for $name."
-       exit 1
-    }
-    if test -e "$name"
-    then
-       echo >&2 "path $name to be created already exists."
-       exit 1
-    fi
-    case "$type2" in
-    f)
-        # creating a regular file
-       cat "$tmp2" >"$name" || {
-           echo >&2 "cannot create a regular file $name."
-           exit 1
-       } 
-       case "$mode2" in
-       +x)
-           echo >&2 "created a regular file $name with mode +x."
-           chmod "$mode2" "$name"
-           ;;
-       -x)
-           echo >&2 "created a regular file $name."
-            ;;
-        esac
-       ;;
-    l)
-        # creating a symlink
-        ln -s "$(cat "$tmp2")" "$name" || {
-           echo >&2 "cannot create a symbolic link $name."
-           exit 1
-       }
-       echo >&2 "created a symbolic link $name."
-        ;;
-    *)
-        echo >&2 "do not know how to create $name of type $type2."
-       exit 1
-    esac
-    git-update-cache --add -- "$name" ;;
-
-?,-)
-    rm -f "$name" || {
-       echo >&2 "cannot remove $name"
-       exit 1
-    }
-    echo >&2 "deleted $name."
-    git-update-cache --remove -- "$name" ;;
-
-l,f|f,l)
-    echo >&2 "cannot change a regular file $name and a symbolic link $name."
-    exit 1 ;;
-
-l,l)
-    # symlink to symlink
-    current=$(readlink "$name") || {
-       echo >&2 "cannot read the target of the symbolic link $name."
-       exit 1
-    }
-    original=$(cat "$tmp1")
-    next=$(cat "$tmp2")
-    test "$original" != "$current" || {
-       echo >&2 "cannot apply symbolic link target change ($original->$next) to $name which points to $current."
-       exit 1
-    }
-    if test "$next" != "$current"
-    then
-       rm -f "$name" && ln -s "$next" "$name" || {
-           echo >&2 "cannot create symbolic link $name."
-           exit 1
-       }
-       echo >&2 "changed symbolic target of $name."
-        git-update-cache -- "$name"
-    fi ;;
-
-f,f)
-    # changed
-    test -e "$name" || {
-       echo >&2 "regular file $name to be patched does not exist."
-       exit 1
-    }
-    dir=$(dirname "$name")
-    case "$dir" in '' | .) ;; *) mkdir -p "$dir";; esac || {
-       echo >&2 "cannot create leading path for $name."
-       exit 1
-    }
-    tmp=.git-apply-patch-$$
-    trap "rm -f $tmp-*" 0 1 2 3 15
-
-    # Be careful, in case "$tmp2" is borrowed path from the work tree
-    # we are looking at...
-    diff -u -L "a/$name" -L "b/$name" "$tmp1" "$tmp2" >$tmp-patch
-
-    # This will say "patching ..." so we do not say anything outselves.
-    patch -p1 <$tmp-patch || exit
-    rm -f $tmp-patch
-    case "$mode1,$mode2" in
-    "$mode2,$mode1") ;;
-    *)
-       chmod "$mode2" "$name"
-       echo >&2 "changed mode from $mode1 to $mode2."
-       ;;
-    esac
-    git-update-cache -- "$name"
-
-esac
index e186363647e2dcf0ecd72efb3cd609dde6a672bf..fe8c1090e97faa0fd0a34c2a12d748916aaa6b05 100755 (executable)
@@ -14,19 +14,9 @@ usage="usage: $0 "'[-v] <upstream> [<head>]
 
 Each commit between the fork-point and <head> is examined, and
 compared against the change each commit between the fork-point and
 
 Each commit between the fork-point and <head> is examined, and
 compared against the change each commit between the fork-point and
-<upstream> introduces.  If the change does not seem to be in the
-upstream, it is shown on the standard output.
-
-The output is intended to be used as:
-
-    OLD_HEAD=$(git-rev-parse HEAD)
-    git-rev-parse upstream >${GIT_DIR-.}/HEAD
-    git-cherry upstream $OLD_HEAD |
-    while read commit
-    do
-        GIT_EXTERNAL_DIFF=git-apply-patch-script git-diff-tree -p "$commit" &&
-       git-commit-script -C "$commit"
-    done
+<upstream> introduces.  If the change seems to be in the upstream,
+it is shown on the standard output with prefix "+".  Otherwise
+it is shown with prefix "-".
 '
 
 case "$1" in -v) verbose=t; shift ;; esac 
 '
 
 case "$1" in -v) verbose=t; shift ;; esac