{"thread":{"id":"2313","subject":"Re: [PATCH] Add 'ours' merge strategy.","startedAt":"2005-11-02T05:37:30Z","lastAt":"2005-11-02T21:45:22Z","messageCount":3,"participants":["Johannes Schindelin","Daniel Barkalow","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"298654","messageId":"7vll071ug5.fsf@assigned-by-dhcp.cox.net","threadId":"2313","inReplyTo":null,"subject":"[PATCH] Add 'ours' merge strategy.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-02T05:37:30Z","receivedAt":"2005-11-02T05:37:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This adds the coolest merge strategy ever, \"ours\".  It can take\narbitrary number of foreign heads and merge them into the\ncurrent branch, with the resulting tree always taken from our\nbranch head, hence its name.\n\nWhat this means is that you can declare that the current branch\nsupersedes the development histories of other branches usnig\nthis merge strategy.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\n\n This can be used to terminate an old maintenance branch without\n leaving people's repositories behind.  The old 0.99.8[a-z]\n lettered releases were done from a maintenance branch that\n forked off from the master branch at 0.99.8.  The maintenance\n branch for 0.99.9 has the tip of the last 0.99.8 maintenance\n commit as one of the ancestors, as well as 0.99.9 commit, while\n content-wise it forks off purely from 0.99.9.\n\n I could have done the current maint branch like this,\n immediately after 0.99.9:\n\n  $ git commit -m 'GIT 0.99.9'\n  $ git checkout -b newmaint\n  $ git pull -s ours . maint ;# still 0.99.8 maintenance\n  $ git checkout maint\n  $ git reset --hard newmaint ;# now based on both old maint and 0.99.9\n  $ git branch -d newmaint\n\n .gitignore        |    1 +\n Makefile          |    2 +-\n git-merge-ours.sh |    7 +++++++\n git-merge.sh      |    2 +-\n 4 files changed, 10 insertions(+), 2 deletions(-)\n create mode 100755 git-merge-ours.sh\n\napplies-to: 9e58de65fa92cce061c8c4064141bc91856097ed\n38431c13669432dfeac16a9142aff5a293331e9d\ndiff --git a/.gitignore b/.gitignore\nindex 927c89c..3edf6b4 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -50,6 +50,7 @@ git-merge-base\n git-merge-index\n git-merge-octopus\n git-merge-one-file\n+git-merge-ours\n git-merge-recursive\n git-merge-resolve\n git-merge-stupid\ndiff --git a/Makefile b/Makefile\nindex 357cb3e..bda829e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -89,7 +89,7 @@ SCRIPT_SH = \\\n \tgit-tag.sh git-verify-tag.sh git-whatchanged.sh git.sh \\\n \tgit-applymbox.sh git-applypatch.sh git-am.sh \\\n \tgit-merge.sh git-merge-stupid.sh git-merge-octopus.sh \\\n-\tgit-merge-resolve.sh git-grep.sh\n+\tgit-merge-resolve.sh git-merge-ours.sh git-grep.sh\n \n SCRIPT_PERL = \\\n \tgit-archimport.perl git-cvsimport.perl git-relink.perl \\\ndiff --git a/git-merge-ours.sh b/git-merge-ours.sh\nnew file mode 100755\nindex 0000000..a64704f\n--- /dev/null\n+++ b/git-merge-ours.sh\n@@ -0,0 +1,7 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2005 Junio C Hamano\n+#\n+# Pretend we resolved the heads, but declare our tree trumps everybody else.\n+#\n+exit 0\ndiff --git a/git-merge.sh b/git-merge.sh\nindex dd104db..b810fce 100755\n--- a/git-merge.sh\n+++ b/git-merge.sh\n@@ -14,7 +14,7 @@ usage () {\n \n # all_strategies='resolve recursive stupid octopus'\n \n-all_strategies='recursive octopus resolve stupid'\n+all_strategies='recursive octopus resolve stupid ours'\n default_strategies='resolve octopus'\n use_strategies=\n \n---\n0.99.9.GIT\n\n"},{"id":"11011","messageId":"Pine.LNX.4.63.0511021134100.6501@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2313","inReplyTo":"7vll071ug5.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add 'ours' merge strategy.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-11-02T10:35:30Z","receivedAt":"2005-11-02T10:35:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 1 Nov 2005, Junio C Hamano wrote:\n\n>  This can be used to terminate an old maintenance branch without\n>  leaving people's repositories behind.\n\nHow about optionally do something similar when git-rebase'ing? Especially \n\"pu\"?\n\nCiao,\nDscho\n"},{"id":"11036","messageId":"Pine.LNX.4.64.0511021616290.25300@iabervon.org","threadId":"2313","inReplyTo":"Pine.LNX.4.63.0511021134100.6501@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Add 'ours' merge strategy.","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2005-11-02T21:45:22Z","receivedAt":"2005-11-02T21:45:22Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Wed, 2 Nov 2005, Johannes Schindelin wrote:\n\n> Hi,\n> \n> On Tue, 1 Nov 2005, Junio C Hamano wrote:\n> \n> >  This can be used to terminate an old maintenance branch without\n> >  leaving people's repositories behind.\n> \n> How about optionally do something similar when git-rebase'ing? Especially \n> \"pu\"?\n\nFor that, you'd additionally want to have the parent whose content was \nignored be listed as \"optional\" in a sense; users shouldn't have to \ndownload all the commits that \"pu\" went through that have been superceded, \nunless they're actually trying to get back from a superceded commit; the \nlog on that line isn't interesting (because all the useful messages are in \nthe rebased line, too, in potentially better versions), and so forth.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"}]}