{"thread":{"id":"5666","subject":"[PATCH] Kill git-resolve.sh","startedAt":"2006-09-23T19:55:30Z","lastAt":"2006-09-24T13:00:54Z","messageCount":5,"participants":["Petr Baudis","Junio C Hamano","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"27506","messageId":"20060923195530.5570.23774.stgit@machine.or.cz","threadId":"5666","inReplyTo":null,"subject":"[PATCH] Kill git-resolve.sh","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-23T19:55:30Z","receivedAt":"2006-09-23T19:55:30Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Seriously, is anyone still using this thing? It's collecting dust and\nblocking the name for something potentially useful like a tool for\nuser-friendly marking of resolved conflicts or resolving index conflicts.\n\nWe've loved you when Git was young, now thank you and please go away. ;-)\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n .gitignore                    |    1 \n Documentation/git-resolve.txt |   36 --------------\n Documentation/git.txt         |    3 -\n Makefile                      |    2 -\n git-resolve.sh                |  108 -----------------------------------------\n 5 files changed, 1 insertions(+), 149 deletions(-)\n\ndiff --git a/.gitignore b/.gitignore\nindex 0ffe14a..f89bbc6 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -92,7 +92,6 @@ git-repo-config\n git-request-pull\n git-rerere\n git-reset\n-git-resolve\n git-rev-list\n git-rev-parse\n git-revert\ndiff --git a/Documentation/git-resolve.txt b/Documentation/git-resolve.txt\ndeleted file mode 100644\nindex 4e57c2b..0000000\n--- a/Documentation/git-resolve.txt\n+++ /dev/null\n@@ -1,36 +0,0 @@\n-git-resolve(1)\n-==============\n-\n-NAME\n-----\n-git-resolve - Merge two commits\n-\n-\n-SYNOPSIS\n---------\n-'git-resolve' <current> <merged> <message>\n-\n-DESCRIPTION\n------------\n-Given two commits and a merge message, merge the <merged> commit\n-into <current> commit, with the commit log message <message>.\n-\n-When <current> is a descendant of <merged>, or <current> is an\n-ancestor of <merged>, no new commit is created and the <message>\n-is ignored.  The former is informally called \"already up to\n-date\", and the latter is often called \"fast forward\".\n-\n-\n-Author\n-------\n-Written by Linus Torvalds <torvalds@osdl.org> and\n-Dan Holmsand <holmsand@gmail.com>.\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 gitlink:git[7] suite\n-\ndiff --git a/Documentation/git.txt b/Documentation/git.txt\nindex 744c38d..a2efd17 100644\n--- a/Documentation/git.txt\n+++ b/Documentation/git.txt\n@@ -336,9 +336,6 @@ gitlink:git-rerere[1]::\n gitlink:git-reset[1]::\n \tReset current HEAD to the specified state.\n \n-gitlink:git-resolve[1]::\n-\tMerge two commits.\n-\n gitlink:git-revert[1]::\n \tRevert an existing commit.\n \ndiff --git a/Makefile b/Makefile\nindex 58848e4..6a7c408 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -169,7 +169,7 @@ SCRIPT_SH = \\\n \tgit-merge-one-file.sh git-parse-remote.sh \\\n \tgit-pull.sh git-rebase.sh \\\n \tgit-repack.sh git-request-pull.sh git-reset.sh \\\n-\tgit-resolve.sh git-revert.sh git-sh-setup.sh \\\n+\tgit-revert.sh git-sh-setup.sh \\\n \tgit-tag.sh git-verify-tag.sh \\\n \tgit-applymbox.sh git-applypatch.sh git-am.sh \\\n \tgit-merge.sh git-merge-stupid.sh git-merge-octopus.sh \\\ndiff --git a/git-resolve.sh b/git-resolve.sh\ndeleted file mode 100755\nindex a7bc680..0000000\n--- a/git-resolve.sh\n+++ /dev/null\n@@ -1,108 +0,0 @@\n-#!/bin/sh\n-#\n-# Copyright (c) 2005 Linus Torvalds\n-#\n-# Resolve two trees.\n-#\n-\n-USAGE='<head> <remote> <merge-message>'\n-. git-sh-setup\n-\n-dropheads() {\n-\trm -f -- \"$GIT_DIR/MERGE_HEAD\" \\\n-\t\t\"$GIT_DIR/LAST_MERGE\" || exit 1\n-}\n-\n-head=$(git-rev-parse --verify \"$1\"^0) &&\n-merge=$(git-rev-parse --verify \"$2\"^0) &&\n-merge_name=\"$2\" &&\n-merge_msg=\"$3\" || usage\n-\n-#\n-# The remote name is just used for the message,\n-# but we do want it.\n-#\n-if [ -z \"$head\" -o -z \"$merge\" -o -z \"$merge_msg\" ]; then\n-\tusage\n-fi\n-\n-dropheads\n-echo $head > \"$GIT_DIR\"/ORIG_HEAD\n-echo $merge > \"$GIT_DIR\"/LAST_MERGE\n-\n-common=$(git-merge-base $head $merge)\n-if [ -z \"$common\" ]; then\n-\tdie \"Unable to find common commit between\" $merge $head\n-fi\n-\n-case \"$common\" in\n-\"$merge\")\n-\techo \"Already up-to-date. Yeeah!\"\n-\tdropheads\n-\texit 0\n-\t;;\n-\"$head\")\n-\techo \"Updating from $head to $merge\"\n-\tgit-read-tree -u -m $head $merge || exit 1\n-\tgit-update-ref -m \"resolve $merge_name: Fast forward\" \\\n-\t\tHEAD \"$merge\" \"$head\"\n-\tgit-diff-tree -p $head $merge | git-apply --stat\n-\tdropheads\n-\texit 0\n-\t;;\n-esac\n-\n-# We are going to make a new commit.\n-git var GIT_COMMITTER_IDENT >/dev/null || exit\n-\n-# Find an optimum merge base if there are more than one candidates.\n-LF='\n-'\n-common=$(git-merge-base -a $head $merge)\n-case \"$common\" in\n-?*\"$LF\"?*)\n-\techo \"Trying to find the optimum merge base.\"\n-\tG=.tmp-index$$\n-\tbest=\n-\tbest_cnt=-1\n-\tfor c in $common\n-\tdo\n-\t\trm -f $G\n-\t\tGIT_INDEX_FILE=$G git-read-tree -m $c $head $merge \\\n-\t\t\t2>/dev/null || continue\n-\t\t# Count the paths that are unmerged.\n-\t\tcnt=`GIT_INDEX_FILE=$G git-ls-files --unmerged | wc -l`\n-\t\tif test $best_cnt -le 0 -o $cnt -le $best_cnt\n-\t\tthen\n-\t\t\tbest=$c\n-\t\t\tbest_cnt=$cnt\n-\t\t\tif test \"$best_cnt\" -eq 0\n-\t\t\tthen\n-\t\t\t\t# Cannot do any better than all trivial merge.\n-\t\t\t\tbreak\n-\t\t\tfi\n-\t\tfi\n-\tdone\n-\trm -f $G\n-\tcommon=\"$best\"\n-esac\n-\n-echo \"Trying to merge $merge into $head using $common.\"\n-git-update-index --refresh 2>/dev/null\n-git-read-tree -u -m $common $head $merge || exit 1\n-result_tree=$(git-write-tree  2> /dev/null)\n-if [ $? -ne 0 ]; then\n-\techo \"Simple merge failed, trying Automatic merge\"\n-\tgit-merge-index -o git-merge-one-file -a\n-\tif [ $? -ne 0 ]; then\n-\t\techo $merge > \"$GIT_DIR\"/MERGE_HEAD\n-\t\tdie \"Automatic merge failed, fix up by hand\"\n-\tfi\n-\tresult_tree=$(git-write-tree) || exit 1\n-fi\n-result_commit=$(echo \"$merge_msg\" | git-commit-tree $result_tree -p $head -p $merge)\n-echo \"Committed merge $result_commit\"\n-git-update-ref -m \"resolve $merge_name: In-index merge\" \\\n-\tHEAD \"$result_commit\" \"$head\"\n-git-diff-tree -p $head $result_commit | git-apply --stat\n-dropheads\n"},{"id":"27517","messageId":"7v64fensge.fsf@assigned-by-dhcp.cox.net","threadId":"5666","inReplyTo":"20060923195530.5570.23774.stgit@machine.or.cz","subject":"Re: [PATCH] Kill git-resolve.sh","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-23T22:12:01Z","receivedAt":"2006-09-23T22:12:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> Seriously, is anyone still using this thing? It's collecting dust and\n> blocking the name for something potentially useful like a tool for\n> user-friendly marking of resolved conflicts or resolving index conflicts.\n>\n> We've loved you when Git was young, now thank you and please go away. ;-)\n>\n> Signed-off-by: Petr Baudis <pasky@suse.cz>\n\nI've always wanted to do this at some point.  Perhaps add a big\nred warning to git-resolve.sh right now and say \"after the next\n'master' release this will go away\" to its stdout for a few\nweeks to find out who screams?\n\nOn a very related note, we should prepare plan to deprecate\nmerge-recursive.py.  My preference is:\n\n\t(1) rename merge-recursive.py to merge-recursive-old.py,\n\t    make it available as \"recursive-old\" strategy.\n\n            install git-merge-recur as git-merge-recursive.\n            Calling for \"recur\" or \"recursive\" strategy gets the\n            same thing from this point on.\n\n\t(2) remove merge-recur synonym once people who are using\n            \"USE_RECUR_FOR_RECURSIVE\" or \"merge.twohead = recur\"\n            to use the bleeding edge migrate.\n\nand I think step (1) can happen fairly soon.  Maybe immediately\nafter the next release from the \"master\".\n\nPerhaps that is the good timing to remove git-resolve.sh as\nwell.  Or maybe immediately before that release?  I dunno, and I\ndo not think anybody cares really much.\n"},{"id":"27519","messageId":"20060923222444.18230.94482.stgit@machine.or.cz","threadId":"5666","inReplyTo":"7v64fensge.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] Deprecate git-resolve.sh","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-23T22:25:19Z","receivedAt":"2006-09-23T22:25:19Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Seriously, is anyone still using this thing? It's collecting dust and\nblocking the name for something potentially useful like a tool for\nuser-friendly marking of resolved conflicts or resolving index conflicts.\n\nWe've loved you when Git was young, now thank you and please go away. ;-)\n\nThis makes git-resolve.sh print a big deprecation warning and sleep a bit\nfor extra annoyance. It should be removed completely after the next release.\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n  I won't touch git-merge-recursive.py because I really have no clue how\nthose fancy merge drivers work.\n\n git-resolve.sh |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/git-resolve.sh b/git-resolve.sh\nindex a7bc680..729ec65 100755\n--- a/git-resolve.sh\n+++ b/git-resolve.sh\n@@ -5,6 +5,10 @@ #\n # Resolve two trees.\n #\n \n+echo 'WARNING: This command is DEPRECATED and will be removed very soon.' >&2\n+echo 'WARNING: Please use git-merge or git-pull instead.' >&2\n+sleep 2\n+\n USAGE='<head> <remote> <merge-message>'\n . git-sh-setup\n \n"},{"id":"27521","messageId":"ef4d3d$7vk$2@sea.gmane.org","threadId":"5666","inReplyTo":"7v64fensge.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Kill git-resolve.sh","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-23T22:39:49Z","receivedAt":"2006-09-23T22:39:49Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n\n> Petr Baudis <pasky@suse.cz> writes:\n> \n>> Seriously, is anyone still using this thing? It's collecting dust and\n>> blocking the name for something potentially useful like a tool for\n>> user-friendly marking of resolved conflicts or resolving index conflicts.\n>>\n>> We've loved you when Git was young, now thank you and please go away. ;-)\n>>\n>> Signed-off-by: Petr Baudis <pasky@suse.cz>\n> \n> I've always wanted to do this at some point.  Perhaps add a big\n> red warning to git-resolve.sh right now and say \"after the next\n> 'master' release this will go away\" to its stdout for a few\n> weeks to find out who screams?\n> \n> On a very related note, we should prepare plan to deprecate\n> merge-recursive.py.  My preference is:\n> \n>       (1) rename merge-recursive.py to merge-recursive-old.py,\n>           make it available as \"recursive-old\" strategy.\n> \n>             install git-merge-recur as git-merge-recursive.\n>             Calling for \"recur\" or \"recursive\" strategy gets the\n>             same thing from this point on.\n> \n>       (2) remove merge-recur synonym once people who are using\n>             \"USE_RECUR_FOR_RECURSIVE\" or \"merge.twohead = recur\"\n>             to use the bleeding edge migrate.\n> \n> and I think step (1) can happen fairly soon.  Maybe immediately\n> after the next release from the \"master\".\n> \n> Perhaps that is the good timing to remove git-resolve.sh as\n> well.  Or maybe immediately before that release?  I dunno, and I\n> do not think anybody cares really much.\n\nOn the fairly unrelated note, would the next release be 1.4.3, or would it\nbe 1.5.0 (the packed refs, the new index format, ...)?\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"27552","messageId":"20060924130054.GQ20017@pasky.or.cz","threadId":"5666","inReplyTo":"7v64fensge.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Kill git-resolve.sh","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-24T13:00:54Z","receivedAt":"2006-09-24T13:00:54Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sun, Sep 24, 2006 at 12:12:01AM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> said that...\n> On a very related note, we should prepare plan to deprecate\n> merge-recursive.py.\n\nWhile we are busy deprecating and removing stuff, we should also:\n\n* probably finally get rid of git-ssh-upload and git-ssh-pull\n  (mentioned in another thread already)\n* make git-annotate alias to git-blame -c? (and probably print\n  a deprecation warning)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"}]}