{"thread":{"id":"10500","subject":"How to merge git://repo.or.cz/git-gui into git.git","startedAt":"2007-10-28T10:57:06Z","lastAt":"2007-10-30T08:51:45Z","messageCount":10,"participants":["Yin Ping","Peter Baumann","Miklos Vajna","Shawn O. Pearce","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"57415","messageId":"46dff0320710280357u23927960hd204760b3d664ce2@mail.gmail.com","threadId":"10500","inReplyTo":null,"subject":"How to merge git://repo.or.cz/git-gui into git.git","fromName":"Yin Ping","fromEmail":"pkufranky@gmail.com","sentAt":"2007-10-28T10:57:06Z","receivedAt":"2007-10-28T10:57:06Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"I'm reading code of git.\n\nWhen I type\ngtlg --topo-order --pretty=oneline --abbrev-commit e92ea624 -p\nin directory git cloned from git.git, I get\n\ne92ea62... Merge branch 'master' of git://repo.or.cz/git-gui\nc80d25d... git-gui: Correct 'git gui blame' in a subdirectory\ndiff --git a/git-gui.sh b/git-gui.sh\nindex 743b7d4..fa30ccc 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n...\n\ngit-gui.sh is in the git-gui directory but we see a/git-gui.sh here\nother than a/git-gui/git-gui.sh.\nAnd in git://repo.or.cz/git-gui, I see git-gui.sh in the top directory\n\nI just wonder how does this happen and how to merge\ngit://repo.or.cz/git-gui into git.git this way?\n\n\n-- \nfranky\n"},{"id":"57416","messageId":"46dff0320710280400v523e2130nd3286a88a4920a9c@mail.gmail.com","threadId":"10500","inReplyTo":"46dff0320710280357u23927960hd204760b3d664ce2@mail.gmail.com","subject":"Re: How to merge git://repo.or.cz/git-gui into git.git","fromName":"Yin Ping","fromEmail":"pkufranky@gmail.com","sentAt":"2007-10-28T11:00:54Z","receivedAt":"2007-10-28T11:00:54Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"On 10/28/07, Yin Ping <pkufranky@gmail.com> wrote:\n\n> When I type\n> gtlg --topo-order --pretty=oneline --abbrev-commit e92ea624 -p\nSorry, my fault. gtlg is an alias for git-log\n\n> franky\n>\n\n\n-- \nfranky\n"},{"id":"57417","messageId":"20071028111443.GA29183@xp.machine.xx","threadId":"10500","inReplyTo":"46dff0320710280400v523e2130nd3286a88a4920a9c@mail.gmail.com","subject":"Re: How to merge git://repo.or.cz/git-gui into git.git","fromName":"Peter Baumann","fromEmail":"waste.manager@gmx.de","sentAt":"2007-10-28T11:14:43Z","receivedAt":"2007-10-28T11:14:43Z","isPatch":false,"sender":{"key":"waste.manager@gmx.de","avatar":null},"body":"On Sun, Oct 28, 2007 at 07:00:54PM +0800, Yin Ping wrote:\n> On 10/28/07, Yin Ping <pkufranky@gmail.com> wrote:\n> \n> > When I type\n> > gtlg --topo-order --pretty=oneline --abbrev-commit e92ea624 -p\n> Sorry, my fault. gtlg is an alias for git-log\n> \n> > franky\n> >\n> \n\nHave a look at the subtree merge strategy [1] and at the following\nexplanations how git-gui got initally merged.\n\n-Peter\n\n[1]: http://www.gelato.unsw.edu.au/archives/git/0702/40139.html\n[2]: http://www.gelato.unsw.edu.au/archives/git/0702/39661.html\n"},{"id":"57423","messageId":"46dff0320710280544r7f99ddf7xfd5aa7cefb39a9fe@mail.gmail.com","threadId":"10500","inReplyTo":"20071028111443.GA29183@xp.machine.xx","subject":"Re: How to merge git://repo.or.cz/git-gui into git.git","fromName":"Yin Ping","fromEmail":"pkufranky@gmail.com","sentAt":"2007-10-28T12:44:44Z","receivedAt":"2007-10-28T12:44:44Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"On 10/28/07, Peter Baumann <waste.manager@gmx.de> wrote:\n\n> Have a look at the subtree merge strategy [1] and at the following\n> explanations how git-gui got initally merged.\n>\n> -Peter\n>\n> [1]: http://www.gelato.unsw.edu.au/archives/git/0702/40139.html\n> [2]: http://www.gelato.unsw.edu.au/archives/git/0702/39661.html\n>\n\n3x. I have seen that subtree stategy is introduced in commit 68fa.\nHowever, I don't find any description in manual of git-merge. Should\nthis be added to this manual or any other document?\n\n\n-- \nfranky\n"},{"id":"57451","messageId":"20071028181305.GL23810@genesis.frugalware.org","threadId":"10500","inReplyTo":"46dff0320710280544r7f99ddf7xfd5aa7cefb39a9fe@mail.gmail.com","subject":"Re: How to merge git://repo.or.cz/git-gui into git.git","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2007-10-28T18:13:05Z","receivedAt":"2007-10-28T18:13:05Z","isPatch":false,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Sun, Oct 28, 2007 at 08:44:44PM +0800, Yin Ping <pkufranky@gmail.com> wrote:\n> 3x. I have seen that subtree stategy is introduced in commit 68fa.\n> However, I don't find any description in manual of git-merge. Should\n> this be added to this manual or any other document?\n\ni think the git-merge manpage should mention it.\n\n- VMiklos\n"},{"id":"57467","messageId":"46dff0320710282345r2922ac7dj9c7a4eb3e20fd011@mail.gmail.com","threadId":"10500","inReplyTo":"20071028111443.GA29183@xp.machine.xx","subject":"Re: How to merge git://repo.or.cz/git-gui into git.git","fromName":"Yin Ping","fromEmail":"pkufranky@gmail.com","sentAt":"2007-10-29T06:45:11Z","receivedAt":"2007-10-29T06:45:11Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"On 10/28/07, Peter Baumann <waste.manager@gmx.de> wrote:\n>\n> Have a look at the subtree merge strategy [1] and at the following\n> explanations how git-gui got initally merged.\n>\n> -Peter\n>\n> [1]: http://www.gelato.unsw.edu.au/archives/git/0702/40139.html\n> [2]: http://www.gelato.unsw.edu.au/archives/git/0702/39661.html\n>\n>\n\nWhen i merged git.git into git-gui with subtree strategy, I found all\nhistories of git.git merged into histories of git-gui (from 584\nhistory entries to 11985). Is it possible that only histories related\nto git-gui subdirectory in git.git(i.e. histories displayed by git-log\ngit-gui) are  merged into?\n\n1. my configuration:\n~/git-gui$ git-remote show git\n* remote git\n  URL: git://git.kernel.org/pub/scm/git/git.git\n  Tracked remote branches\n    master\n~/git-gui$ git-remote show origin\n* remote origin\n  URL: git://repo.or.cz/git-gui\n    Remote branch(es) merged with 'git pull' while on branch master\n      master\n    Tracked remote branches\n      master\n~/git-gui$ gtlg --pretty=oneline --topo-order --first-parent | wc -l\n584\n\n2. pull with subtree strategy\n~/git-gui$  git-pull -s subtree git master:master\n\n3. after pull, all logs of git comes into git-gui (584->11985)\n~/git-gui$ gtlg --pretty=oneline --topo-order | wc -l\n11985\n\n4. histories of git can be hiden by --first-parent\ngtlg --pretty=oneline --topo-order --first-parent | wc -l\n585\n\n-- \nfranky\n"},{"id":"57501","messageId":"20071030005217.GT14735@spearce.org","threadId":"10500","inReplyTo":"46dff0320710282345r2922ac7dj9c7a4eb3e20fd011@mail.gmail.com","subject":"Re: How to merge git://repo.or.cz/git-gui into git.git","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-30T00:52:17Z","receivedAt":"2007-10-30T00:52:17Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Yin Ping <pkufranky@gmail.com> wrote:\n> On 10/28/07, Peter Baumann <waste.manager@gmx.de> wrote:\n> >\n> > Have a look at the subtree merge strategy [1] and at the following\n> > explanations how git-gui got initally merged.\n> >\n> > -Peter\n> >\n> > [1]: http://www.gelato.unsw.edu.au/archives/git/0702/40139.html\n> > [2]: http://www.gelato.unsw.edu.au/archives/git/0702/39661.html\n> \n> When i merged git.git into git-gui with subtree strategy, I found all\n> histories of git.git merged into histories of git-gui (from 584\n> history entries to 11985). Is it possible that only histories related\n> to git-gui subdirectory in git.git(i.e. histories displayed by git-log\n> git-gui) are  merged into?\n> \n> 2. pull with subtree strategy\n> ~/git-gui$  git-pull -s subtree git master:master\n\nYou are merging in the wrong direction.  You want to merge git-gui\ninto git.git:\n\n\tgit clone git://repo.or.cz/alt-git.git mygit\n\tcd mygit\n\tgit pull -s subtree git://repo.or.cz/git-gui.git master\n\nSo you are pulling git-gui into git, not the reverse.  But yes,\nwhen this happens the entire history of the pulled project (in the\nabove case git-gui) suddenly appears in the history of the parent\nproject (in this case git).  If you don't want this to happen then\nyou need to make git-gui into a submodule.  That has been talked\nabout being done, but hasn't happened yet in the main git repository.\ngit-gui is currently still being subtree merged in.\n\n-- \nShawn.\n"},{"id":"57512","messageId":"46dff0320710291912p36d7c83j8564ff0afc6c7b79@mail.gmail.com","threadId":"10500","inReplyTo":"20071030005217.GT14735@spearce.org","subject":"Re: How to merge git://repo.or.cz/git-gui into git.git","fromName":"Yin Ping","fromEmail":"pkufranky@gmail.com","sentAt":"2007-10-30T02:12:28Z","receivedAt":"2007-10-30T02:12:28Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"> You are merging in the wrong direction.  You want to merge git-gui\n> into git.git:\n>\n>         git clone git://repo.or.cz/alt-git.git mygit\n>         cd mygit\n>         git pull -s subtree git://repo.or.cz/git-gui.git master\n>\n> So you are pulling git-gui into git, not the reverse.  But yes,\n> when this happens the entire history of the pulled project (in the\n> above case git-gui) suddenly appears in the history of the parent\n> project (in this case git).  If you don't want this to happen then\n> you need to make git-gui into a submodule.  That has been talked\n> about being done, but hasn't happened yet in the main git repository.\n> git-gui is currently still being subtree merged in.\n>\n> --\n> Shawn.\n>\nOk, I see. I'm just be interested in the subtree strategy and try a\nfew ways and different directions to merge. And also i'm trying to\nfigure out which one of subtree merge and submodule is more suitable\nfor my project. However, the conclusion havn't come.\n\n-- \nfranky\n"},{"id":"57518","messageId":"7vmyu1s1qt.fsf@gitster.siamese.dyndns.org","threadId":"10500","inReplyTo":"20071030005217.GT14735@spearce.org","subject":"Re: How to merge git://repo.or.cz/git-gui into git.git","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-10-30T03:46:50Z","receivedAt":"2007-10-30T03:46:50Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n>> 2. pull with subtree strategy\n>> ~/git-gui$  git-pull -s subtree git master:master\n>\n> You are merging in the wrong direction.  You want to merge git-gui\n> into git.git:\n>\n> \tgit clone git://repo.or.cz/alt-git.git mygit\n> \tcd mygit\n> \tgit pull -s subtree git://repo.or.cz/git-gui.git master\n>\n> So you are pulling git-gui into git, not the reverse.\n\nActually, subtree strategy was designed to allow merging back\nand forth.  But the result, as it _is_ a merge, will not omit\nany commit from the history from both branches.\n"},{"id":"57548","messageId":"46dff0320710300151k56cdf8a9o77e163e3167e73e@mail.gmail.com","threadId":"10500","inReplyTo":"7vmyu1s1qt.fsf@gitster.siamese.dyndns.org","subject":"Re: How to merge git://repo.or.cz/git-gui into git.git","fromName":"Yin Ping","fromEmail":"pkufranky@gmail.com","sentAt":"2007-10-30T08:51:45Z","receivedAt":"2007-10-30T08:51:45Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":">\n> Actually, subtree strategy was designed to allow merging back\n> and forth.  But the result, as it _is_ a merge, will not omit\n> any commit from the history from both branches.\n>\n>\nCan git-log be more clever so that it can recognize a subtree merge\nand show only logs related to the subtree?\n\nAnother suggestion is that the commit msg for subtree merge should be\nmore accurate such as \" Merge branch master of <repos> into direcotry\n<dir> of branch <branch>\"\n\n\n-- \nfranky\n"}]}