git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to merge git://repo.or.cz/git-gui into git.git
@ 2007-10-28 10:57 Yin Ping
  2007-10-28 11:00 ` Yin Ping
  0 siblings, 1 reply; 10+ messages in thread
From: Yin Ping @ 2007-10-28 10:57 UTC (permalink / raw)
  To: git

I'm reading code of git.

When I type
gtlg --topo-order --pretty=oneline --abbrev-commit e92ea624 -p
in directory git cloned from git.git, I get

e92ea62... Merge branch 'master' of git://repo.or.cz/git-gui
c80d25d... git-gui: Correct 'git gui blame' in a subdirectory
diff --git a/git-gui.sh b/git-gui.sh
index 743b7d4..fa30ccc 100755
--- a/git-gui.sh
+++ b/git-gui.sh
...

git-gui.sh is in the git-gui directory but we see a/git-gui.sh here
other than a/git-gui/git-gui.sh.
And in git://repo.or.cz/git-gui, I see git-gui.sh in the top directory

I just wonder how does this happen and how to merge
git://repo.or.cz/git-gui into git.git this way?


-- 
franky

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to merge git://repo.or.cz/git-gui into git.git
  2007-10-28 10:57 How to merge git://repo.or.cz/git-gui into git.git Yin Ping
@ 2007-10-28 11:00 ` Yin Ping
  2007-10-28 11:14   ` Peter Baumann
  0 siblings, 1 reply; 10+ messages in thread
From: Yin Ping @ 2007-10-28 11:00 UTC (permalink / raw)
  To: git

On 10/28/07, Yin Ping <pkufranky@gmail.com> wrote:

> When I type
> gtlg --topo-order --pretty=oneline --abbrev-commit e92ea624 -p
Sorry, my fault. gtlg is an alias for git-log

> franky
>


-- 
franky

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to merge git://repo.or.cz/git-gui into git.git
  2007-10-28 11:00 ` Yin Ping
@ 2007-10-28 11:14   ` Peter Baumann
  2007-10-28 12:44     ` Yin Ping
  2007-10-29  6:45     ` Yin Ping
  0 siblings, 2 replies; 10+ messages in thread
From: Peter Baumann @ 2007-10-28 11:14 UTC (permalink / raw)
  To: Yin Ping; +Cc: git

On Sun, Oct 28, 2007 at 07:00:54PM +0800, Yin Ping wrote:
> On 10/28/07, Yin Ping <pkufranky@gmail.com> wrote:
> 
> > When I type
> > gtlg --topo-order --pretty=oneline --abbrev-commit e92ea624 -p
> Sorry, my fault. gtlg is an alias for git-log
> 
> > franky
> >
> 

Have a look at the subtree merge strategy [1] and at the following
explanations how git-gui got initally merged.

-Peter

[1]: http://www.gelato.unsw.edu.au/archives/git/0702/40139.html
[2]: http://www.gelato.unsw.edu.au/archives/git/0702/39661.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to merge git://repo.or.cz/git-gui into git.git
  2007-10-28 11:14   ` Peter Baumann
@ 2007-10-28 12:44     ` Yin Ping
  2007-10-28 18:13       ` Miklos Vajna
  2007-10-29  6:45     ` Yin Ping
  1 sibling, 1 reply; 10+ messages in thread
From: Yin Ping @ 2007-10-28 12:44 UTC (permalink / raw)
  To: Peter Baumann; +Cc: git

On 10/28/07, Peter Baumann <waste.manager@gmx.de> wrote:

> Have a look at the subtree merge strategy [1] and at the following
> explanations how git-gui got initally merged.
>
> -Peter
>
> [1]: http://www.gelato.unsw.edu.au/archives/git/0702/40139.html
> [2]: http://www.gelato.unsw.edu.au/archives/git/0702/39661.html
>

3x. I have seen that subtree stategy is introduced in commit 68fa.
However, I don't find any description in manual of git-merge. Should
this be added to this manual or any other document?


-- 
franky

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to merge git://repo.or.cz/git-gui into git.git
  2007-10-28 12:44     ` Yin Ping
@ 2007-10-28 18:13       ` Miklos Vajna
  0 siblings, 0 replies; 10+ messages in thread
From: Miklos Vajna @ 2007-10-28 18:13 UTC (permalink / raw)
  To: Yin Ping; +Cc: Peter Baumann, git

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

On Sun, Oct 28, 2007 at 08:44:44PM +0800, Yin Ping <pkufranky@gmail.com> wrote:
> 3x. I have seen that subtree stategy is introduced in commit 68fa.
> However, I don't find any description in manual of git-merge. Should
> this be added to this manual or any other document?

i think the git-merge manpage should mention it.

- VMiklos

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to merge git://repo.or.cz/git-gui into git.git
  2007-10-28 11:14   ` Peter Baumann
  2007-10-28 12:44     ` Yin Ping
@ 2007-10-29  6:45     ` Yin Ping
  2007-10-30  0:52       ` Shawn O. Pearce
  1 sibling, 1 reply; 10+ messages in thread
From: Yin Ping @ 2007-10-29  6:45 UTC (permalink / raw)
  To: Peter Baumann; +Cc: git

On 10/28/07, Peter Baumann <waste.manager@gmx.de> wrote:
>
> Have a look at the subtree merge strategy [1] and at the following
> explanations how git-gui got initally merged.
>
> -Peter
>
> [1]: http://www.gelato.unsw.edu.au/archives/git/0702/40139.html
> [2]: http://www.gelato.unsw.edu.au/archives/git/0702/39661.html
>
>

When i merged git.git into git-gui with subtree strategy, I found all
histories of git.git merged into histories of git-gui (from 584
history entries to 11985). Is it possible that only histories related
to git-gui subdirectory in git.git(i.e. histories displayed by git-log
git-gui) are  merged into?

1. my configuration:
~/git-gui$ git-remote show git
* remote git
  URL: git://git.kernel.org/pub/scm/git/git.git
  Tracked remote branches
    master
~/git-gui$ git-remote show origin
* remote origin
  URL: git://repo.or.cz/git-gui
    Remote branch(es) merged with 'git pull' while on branch master
      master
    Tracked remote branches
      master
~/git-gui$ gtlg --pretty=oneline --topo-order --first-parent | wc -l
584

2. pull with subtree strategy
~/git-gui$  git-pull -s subtree git master:master

3. after pull, all logs of git comes into git-gui (584->11985)
~/git-gui$ gtlg --pretty=oneline --topo-order | wc -l
11985

4. histories of git can be hiden by --first-parent
gtlg --pretty=oneline --topo-order --first-parent | wc -l
585

-- 
franky

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to merge git://repo.or.cz/git-gui into git.git
  2007-10-29  6:45     ` Yin Ping
@ 2007-10-30  0:52       ` Shawn O. Pearce
  2007-10-30  2:12         ` Yin Ping
  2007-10-30  3:46         ` Junio C Hamano
  0 siblings, 2 replies; 10+ messages in thread
From: Shawn O. Pearce @ 2007-10-30  0:52 UTC (permalink / raw)
  To: Yin Ping; +Cc: Peter Baumann, git

Yin Ping <pkufranky@gmail.com> wrote:
> On 10/28/07, Peter Baumann <waste.manager@gmx.de> wrote:
> >
> > Have a look at the subtree merge strategy [1] and at the following
> > explanations how git-gui got initally merged.
> >
> > -Peter
> >
> > [1]: http://www.gelato.unsw.edu.au/archives/git/0702/40139.html
> > [2]: http://www.gelato.unsw.edu.au/archives/git/0702/39661.html
> 
> When i merged git.git into git-gui with subtree strategy, I found all
> histories of git.git merged into histories of git-gui (from 584
> history entries to 11985). Is it possible that only histories related
> to git-gui subdirectory in git.git(i.e. histories displayed by git-log
> git-gui) are  merged into?
> 
> 2. pull with subtree strategy
> ~/git-gui$  git-pull -s subtree git master:master

You are merging in the wrong direction.  You want to merge git-gui
into git.git:

	git clone git://repo.or.cz/alt-git.git mygit
	cd mygit
	git pull -s subtree git://repo.or.cz/git-gui.git master

So you are pulling git-gui into git, not the reverse.  But yes,
when this happens the entire history of the pulled project (in the
above case git-gui) suddenly appears in the history of the parent
project (in this case git).  If you don't want this to happen then
you need to make git-gui into a submodule.  That has been talked
about being done, but hasn't happened yet in the main git repository.
git-gui is currently still being subtree merged in.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to merge git://repo.or.cz/git-gui into git.git
  2007-10-30  0:52       ` Shawn O. Pearce
@ 2007-10-30  2:12         ` Yin Ping
  2007-10-30  3:46         ` Junio C Hamano
  1 sibling, 0 replies; 10+ messages in thread
From: Yin Ping @ 2007-10-30  2:12 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Peter Baumann, git

> You are merging in the wrong direction.  You want to merge git-gui
> into git.git:
>
>         git clone git://repo.or.cz/alt-git.git mygit
>         cd mygit
>         git pull -s subtree git://repo.or.cz/git-gui.git master
>
> So you are pulling git-gui into git, not the reverse.  But yes,
> when this happens the entire history of the pulled project (in the
> above case git-gui) suddenly appears in the history of the parent
> project (in this case git).  If you don't want this to happen then
> you need to make git-gui into a submodule.  That has been talked
> about being done, but hasn't happened yet in the main git repository.
> git-gui is currently still being subtree merged in.
>
> --
> Shawn.
>
Ok, I see. I'm just be interested in the subtree strategy and try a
few ways and different directions to merge. And also i'm trying to
figure out which one of subtree merge and submodule is more suitable
for my project. However, the conclusion havn't come.

-- 
franky

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to merge git://repo.or.cz/git-gui into git.git
  2007-10-30  0:52       ` Shawn O. Pearce
  2007-10-30  2:12         ` Yin Ping
@ 2007-10-30  3:46         ` Junio C Hamano
  2007-10-30  8:51           ` Yin Ping
  1 sibling, 1 reply; 10+ messages in thread
From: Junio C Hamano @ 2007-10-30  3:46 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Yin Ping, Peter Baumann, git

"Shawn O. Pearce" <spearce@spearce.org> writes:

>> 2. pull with subtree strategy
>> ~/git-gui$  git-pull -s subtree git master:master
>
> You are merging in the wrong direction.  You want to merge git-gui
> into git.git:
>
> 	git clone git://repo.or.cz/alt-git.git mygit
> 	cd mygit
> 	git pull -s subtree git://repo.or.cz/git-gui.git master
>
> So you are pulling git-gui into git, not the reverse.

Actually, subtree strategy was designed to allow merging back
and forth.  But the result, as it _is_ a merge, will not omit
any commit from the history from both branches.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to merge git://repo.or.cz/git-gui into git.git
  2007-10-30  3:46         ` Junio C Hamano
@ 2007-10-30  8:51           ` Yin Ping
  0 siblings, 0 replies; 10+ messages in thread
From: Yin Ping @ 2007-10-30  8:51 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Shawn O. Pearce, Peter Baumann, git

>
> Actually, subtree strategy was designed to allow merging back
> and forth.  But the result, as it _is_ a merge, will not omit
> any commit from the history from both branches.
>
>
Can git-log be more clever so that it can recognize a subtree merge
and show only logs related to the subtree?

Another suggestion is that the commit msg for subtree merge should be
more accurate such as " Merge branch master of <repos> into direcotry
<dir> of branch <branch>"


-- 
franky

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-10-30  8:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-28 10:57 How to merge git://repo.or.cz/git-gui into git.git Yin Ping
2007-10-28 11:00 ` Yin Ping
2007-10-28 11:14   ` Peter Baumann
2007-10-28 12:44     ` Yin Ping
2007-10-28 18:13       ` Miklos Vajna
2007-10-29  6:45     ` Yin Ping
2007-10-30  0:52       ` Shawn O. Pearce
2007-10-30  2:12         ` Yin Ping
2007-10-30  3:46         ` Junio C Hamano
2007-10-30  8:51           ` Yin Ping

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).