Remove "octopus".
We still advertise "git resolve" as a standalone command, but never "git octopus", so nobody should be using it and it is safe to retire it. The functionality is still available as a strategy backend. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Dec 19, 2005 at 18:03 UTC
e32faa8adbc8ba9803088e849bc26680134c853c
5 files changed
+1
-133
.gitignore
-1
@@ -60,7 +60,6 @@ git-merge-stupid
60
git-mktag
61
git-name-rev
62
git-mv
63
-git-octopus
63
git-pack-redundant
64
git-pack-objects
65
git-parse-remote
Documentation/git-octopus.txt
deleted
-38
@@ -1,38 +0,0 @@
1
-git-octopus(1)
2
-==============
3
-
4
-NAME
5
-----
6
-git-octopus - Merge more than two commits.
7
-
8
-
9
-SYNOPSIS
10
---------
11
-'git-octopus'
12
-
13
-DESCRIPTION
14
------------
15
-After running 'git fetch', $GIT_DIR/FETCH_HEAD contains the
16
-following information, one line per remote ref:
17
-
18
-------------------------------------------------
19
-<object name> <ref name> from <repository>
20
-------------------------------------------------
21
-
22
-Using this information, create and commit an Octopus merge on
23
-top of the current HEAD.
24
-
25
-
26
-Author
27
-------
28
-Written by Junio C Hamano <junkio@cox.net>
29
-
30
-
31
-Documentation
32
---------------
33
-Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
34
-
35
-GIT
36
----
37
-Part of the gitlink:git[7] suite
38
-
Documentation/git.txt
-3
@@ -297,9 +297,6 @@ gitlink:git-merge[1]::
297
gitlink:git-mv[1]::
298
Move or rename a file, a directory, or a symlink.
299
300
-gitlink:git-octopus[1]::
301
- Merge more than two commits.
302
-
300
gitlink:git-pull[1]::
301
Fetch from and merge with a remote repository.
302
Makefile
+1
-1
@@ -89,7 +89,7 @@ SCRIPT_SH = \
89
git-cherry.sh git-clone.sh git-commit.sh \
90
git-count-objects.sh git-diff.sh git-fetch.sh \
91
git-format-patch.sh git-log.sh git-ls-remote.sh \
92
- git-merge-one-file.sh git-octopus.sh git-parse-remote.sh \
92
+ git-merge-one-file.sh git-parse-remote.sh \
93
git-prune.sh git-pull.sh git-push.sh git-rebase.sh \
94
git-repack.sh git-request-pull.sh git-reset.sh \
95
git-resolve.sh git-revert.sh git-sh-setup.sh git-status.sh \
git-octopus.sh
deleted
-90
@@ -1,90 +0,0 @@
1
-#!/bin/sh
2
-#
3
-# Copyright (c) 2005 Junio C Hamano
4
-#
5
-# Resolve two or more trees recorded in $GIT_DIR/FETCH_HEAD.
6
-#
7
-. git-sh-setup
8
-
9
-usage () {
10
- die "usage: git octopus"
11
-}
12
-
13
-# Sanity check the heads early.
14
-while read SHA1 REPO
15
-do
16
- test $(git-cat-file -t $SHA1) = "commit" ||
17
- die "$REPO given to octopus is not a commit"
18
-done <"$GIT_DIR/FETCH_HEAD"
19
-
20
-head=$(git-rev-parse --verify HEAD) || exit
21
-
22
-git-update-index --refresh ||
23
- die "Your working tree is dirty."
24
-test "$(git-diff-index --cached "$head")" = "" ||
25
- die "Your working tree does not match HEAD."
26
-
27
-# MRC is the current "merge reference commit"
28
-# MRT is the current "merge result tree"
29
-
30
-MRC=$head PARENT="-p $head"
31
-MRT=$(git-write-tree)
32
-CNT=1 ;# counting our head
33
-NON_FF_MERGE=0
34
-while read SHA1 REPO
35
-do
36
- common=$(git-merge-base $MRC $SHA1) ||
37
- die "Unable to find common commit with $SHA1 from $REPO"
38
-
39
- if test "$common" = $SHA1
40
- then
41
- echo "Already up-to-date: $REPO"
42
- continue
43
- fi
44
-
45
- CNT=`expr $CNT + 1`
46
- PARENT="$PARENT -p $SHA1"
47
-
48
- if test "$common,$NON_FF_MERGE" = "$MRC,0"
49
- then
50
- # The first head being merged was a fast-forward.
51
- # Advance MRC to the head being merged, and use that
52
- # tree as the intermediate result of the merge.
53
- # We still need to count this as part of the parent set.
54
-
55
- echo "Fast forwarding to: $REPO"
56
- git-read-tree -u -m $head $SHA1 || exit
57
- MRC=$SHA1 MRT=$(git-write-tree)
58
- continue
59
- fi
60
-
61
- NON_FF_MERGE=1
62
-
63
- echo "Trying simple merge with $REPO"
64
- git-read-tree -u -m $common $MRT $SHA1 || exit
65
- next=$(git-write-tree 2>/dev/null)
66
- if test $? -ne 0
67
- then
68
- echo "Simple merge did not work, trying automatic merge."
69
- git-merge-index -o git-merge-one-file -a || {
70
- git-read-tree --reset "$head"
71
- git-checkout-index -f -q -u -a
72
- die "Automatic merge failed; should not be doing Octopus"
73
- }
74
- next=$(git-write-tree 2>/dev/null)
75
- fi
76
- MRC=$common
77
- MRT=$next
78
-done <"$GIT_DIR/FETCH_HEAD"
79
-
80
-# Just to be careful in case the user feeds nonsense to us.
81
-case "$CNT" in
82
-1)
83
- echo "No changes."
84
- exit 0 ;;
85
-esac
86
-result_commit=$(git-fmt-merge-msg <"$GIT_DIR/FETCH_HEAD" |
87
- git-commit-tree $MRT $PARENT)
88
-echo "Committed merge $result_commit"
89
-git-update-ref HEAD $result_commit $head
90
-git-diff-tree -p $head $result_commit | git-apply --stat