Re: Help using git subtree

2013-07-30 Thread Gabriel Jover

Al 30/07/13 11:58, En/na Fredrik Gustafsson ha escrit:


Git subtree is very convenient to get all the sub-projects into the
main-project directory tree
and to send back sub-project commits to the corresponding repository.
But I don't understand the work flow very well.

I haven't used subtree that much however how do you commit to upstream?
AFAIK every commit to the subtree must be done in the subtree branch and
then merged back to the "superproject"-branch with a subtree merge.

I use "git subtree pull" and "git subtree push".
AFAIK with subtree all commits are in the same repository, thus one does 
not need
to go to the subtree branch to commit. This is one of the advantages of 
subtree.



I can add a subtree with a given prefix and pull/push my commits to
the repository,
but how do I do to pull/push commits from the main-project to the
corresponding repository
avoiding sub-projects to be sent?

You don't. A subtree is a subtree in your git-repo and is therefore a
part of your repository. When you're using subtree that project will be
a part of you project.

I expected that there would be a way to split the main project and push it,
in the same way that one can split one subtree and push it.
If not, this could be a feature request.


An other question I have is when will be subtree included in git packages.
I had to compile git from sources in order to get this feature.


If you're asking when git-subtree will move from contrib/ to core git, I
don't know. That's a decision for Junio. I would argue that it shouldn't
because submodules can do everything that subtrees are good at and
git.git should focus on doing one solution well instead of doing the
same thing in two bad ways. However since git.git already uses a
subtree-like style for gitk, git-gui, etc.  it doesn't seem like Junio
agrees with me on this point.

Right, I rephrase: When git-subtree will move from contrib/ to core git?

Let me also empathize that I find git-subtree much more convenient than 
sub-modules.
One can work with a single repository as it were a single project, one 
can commit changes
that affect different sub-projects with just one command, use common 
tags and branches and so on.



Si heu rebut aquest correu per error, us informo que pot contenir informació 
confidencial i privada i que està prohibit el seu ús. Us agrairiem que ho 
comuniqueu al remitent i l'elimineu. Gràcies.
Si ha recibido este correo por error, le informo de que puede contener 
información confidencial  y privada y que está prohibido su uso. Le agradeceré 
que lo comunique a su remitente y lo elimine. Gracias.
If you have received  this e-mail by error, please note that it may contain 
confidential and private  information, therefore, the use of this information 
is strictly forbidden. Please inform the sender of the error and delete the 
information received. Thank you.

Is this really something to have in e-mails to a public list? Some lists
won't accept this type of e-mails, or simply just ignore you.

Don't worry about this signature, it only applies if one receives this 
e-mail by mistake.


Best regards,

Gabriel

--


Si heu rebut aquest correu per error, us informo que pot contenir informació 
confidencial i privada i que està prohibit el seu ús. Us agrairiem que ho 
comuniqueu al remitent i l'elimineu. Gràcies.
Si ha recibido este correo por error, le informo de que puede contener 
información confidencial  y privada y que está prohibido su uso. Le agradeceré 
que lo comunique a su remitente y lo elimine. Gracias.
If you have received  this e-mail by error, please note that it may contain 
confidential and private  information, therefore, the use of this information 
is strictly forbidden. Please inform the sender of the error and delete the 
information received. Thank you.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Help using git subtree

2013-07-30 Thread Fredrik Gustafsson
On Tue, Jul 30, 2013 at 11:32:22AM +0200, Gabriel Jover wrote:
> Dear all,
> 
> I am trying to avoid using git submodules and thus I am testing if
> git subtree fit my needs.
> I have a set of sub-projects linked to a main-project.

Just out of curiosity, why are you trying to avoid submodules?

> 
> Git subtree is very convenient to get all the sub-projects into the
> main-project directory tree
> and to send back sub-project commits to the corresponding repository.
> But I don't understand the work flow very well.

I haven't used subtree that much however how do you commit to upstream?
AFAIK every commit to the subtree must be done in the subtree branch and
then merged back to the "superproject"-branch with a subtree merge.

> 
> I can add a subtree with a given prefix and pull/push my commits to
> the repository,
> but how do I do to pull/push commits from the main-project to the
> corresponding repository
> avoiding sub-projects to be sent?

You don't. A subtree is a subtree in your git-repo and is therefore a
part of your repository. When you're using subtree that project will be
a part of you project.

> 
> An other question I have is when will be subtree included in git packages.
> I had to compile git from sources in order to get this feature.
> 

git-subtree is a part of git, located in the contrib section. When your
software distribution choose to distribute that with your git-package
is not up to the git project to decide but something you need to ask
your package maintainer.

If you're asking when git-subtree will move from contrib/ to core git, I
don't know. That's a decision for Junio. I would argue that it shouldn't
because submodules can do everything that subtrees are good at and
git.git should focus on doing one solution well instead of doing the
same thing in two bad ways. However since git.git already uses a
subtree-like style for gitk, git-gui, etc.  it doesn't seem like Junio
agrees with me on this point.

> 
> Si heu rebut aquest correu per error, us informo que pot contenir informació 
> confidencial i privada i que està prohibit el seu ús. Us agrairiem que ho 
> comuniqueu al remitent i l'elimineu. Gràcies.
> Si ha recibido este correo por error, le informo de que puede contener 
> información confidencial  y privada y que está prohibido su uso. Le 
> agradeceré que lo comunique a su remitente y lo elimine. Gracias.
> If you have received  this e-mail by error, please note that it may contain 
> confidential and private  information, therefore, the use of this information 
> is strictly forbidden. Please inform the sender of the error and delete the 
> information received. Thank you.

Is this really something to have in e-mails to a public list? Some lists
won't accept this type of e-mails, or simply just ignore you.

-- 
Med vänliga hälsningar
Fredrik Gustafsson

tel: 0733-608274
e-post: iv...@iveqy.com
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Help using git subtree

2013-07-30 Thread Gabriel Jover

Dear all,

I am trying to avoid using git submodules and thus I am testing if git 
subtree fit my needs.

I have a set of sub-projects linked to a main-project.

Git subtree is very convenient to get all the sub-projects into the 
main-project directory tree

and to send back sub-project commits to the corresponding repository.
But I don't understand the work flow very well.

I can add a subtree with a given prefix and pull/push my commits to the 
repository,
but how do I do to pull/push commits from the main-project to the 
corresponding repository

avoiding sub-projects to be sent?

An other question I have is when will be subtree included in git packages.
I had to compile git from sources in order to get this feature.

Sincerely,

G. Jover-Manas

--
++
 Gabriel V. Jover Mañas
 Computing Division
 Cells / Alba Synchrotron  [http:/www.cells.es]
 Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
 E-08290 Cerdanyola del Valles (Barcelona), Spain
 E-mail: gjo...@cells.es
 Phone: +34 93 592 4471
 Office: ALBA P0 Of8/18
++

Si heu rebut aquest correu per error, us informo que pot contenir informació 
confidencial i privada i que està prohibit el seu ús. Us agrairiem que ho 
comuniqueu al remitent i l'elimineu. Gràcies.
Si ha recibido este correo por error, le informo de que puede contener 
información confidencial  y privada y que está prohibido su uso. Le agradeceré 
que lo comunique a su remitente y lo elimine. Gracias.
If you have received  this e-mail by error, please note that it may contain 
confidential and private  information, therefore, the use of this information 
is strictly forbidden. Please inform the sender of the error and delete the 
information received. Thank you.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html