Re: Proposal: Write git subtree info to .git/config

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Proposal: Write git subtree info to .git/config

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:00:19

John Butterfield [off-list ref] writes:
Has there been any talk about adding a stub for git subtrees in .git/config?
I do not think so, and that is probably for a good reason.

A subtree biding can change over time, but .git/config is about
recording information that do not change depending on what tree you
are looking at, so there is an impedance mismatch---storing that
information in .git/config is probably a wrong way to go about it.

It might help to keep track of "In this tree, the tip of that other
history is bound as a subtree at this path", which means that
information more naturally belongs to each tree, I would think.

Re: Proposal: Write git subtree info to .git/config

From: John Butterfield <hidden>
Date: 2016-06-15 23:00:19

A subtree biding can change over time, but .git/config is about
recording information that do not change depending on what tree you
are looking at, so there is an impedance mismatch---storing that
information in .git/config is probably a wrong way to go about it.

I see. How about a .gitsubtrees config file in the root of a project?
It might help to keep track of "In this tree, the tip of that other
history is bound as a subtree at this path", which means that
information more naturally belongs to each tree, I would think.

Anything in the subdirectory must be part of the contents of the
subtree repo. It should not know how it is linked to it's parent
project; parents should know how their children are fetched. Therefore
it cannot live in the subtree.

Subtrees could be nested. So, should the config be in the root of the
parent subtree? This makes sense to me.

Example:

/
  A/
  B/    # a subtree of (blah)
    X/
    Y/  # a subtree of (yada-yada)
    Z/

So, lets say B has many updates remotely, including pushing and
pulling changes to Y.

When pulling the changes from B, it would be convenient for it to come
with the meta data, (subtree repo and commit info) for Y.

So how does that sound; Could we store subtree repo and commit id
references per folder in a .gitsubtrees file in the root of every
project?

(Project B is technically it's own project so it would pull it's own
.gitsubtrees in /B/.gitsubtrees)

`John

On Thu, Mar 13, 2014 at 4:36 PM, Junio C Hamano [off-list ref] wrote:
John Butterfield [off-list ref] writes:
quoted
Has there been any talk about adding a stub for git subtrees in .git/config?
I do not think so, and that is probably for a good reason.

A subtree biding can change over time, but .git/config is about
recording information that do not change depending on what tree you
are looking at, so there is an impedance mismatch---storing that
information in .git/config is probably a wrong way to go about it.

It might help to keep track of "In this tree, the tip of that other
history is bound as a subtree at this path", which means that
information more naturally belongs to each tree, I would think.

Re: Proposal: Write git subtree info to .git/config

From: John Butterfield <hidden>
Date: 2016-06-15 23:00:19

by "per folder" I meant, "for each subtree"

On Thu, Mar 13, 2014 at 5:43 PM, John Butterfield [off-list ref] wrote:
quoted
A subtree biding can change over time, but .git/config is about
recording information that do not change depending on what tree you
are looking at, so there is an impedance mismatch---storing that
information in .git/config is probably a wrong way to go about it.

I see. How about a .gitsubtrees config file in the root of a project?
quoted
It might help to keep track of "In this tree, the tip of that other
history is bound as a subtree at this path", which means that
information more naturally belongs to each tree, I would think.

Anything in the subdirectory must be part of the contents of the
subtree repo. It should not know how it is linked to it's parent
project; parents should know how their children are fetched. Therefore
it cannot live in the subtree.

Subtrees could be nested. So, should the config be in the root of the
parent subtree? This makes sense to me.

Example:

/
  A/
  B/    # a subtree of (blah)
    X/
    Y/  # a subtree of (yada-yada)
    Z/

So, lets say B has many updates remotely, including pushing and
pulling changes to Y.

When pulling the changes from B, it would be convenient for it to come
with the meta data, (subtree repo and commit info) for Y.

So how does that sound; Could we store subtree repo and commit id
references per folder in a .gitsubtrees file in the root of every
project?

(Project B is technically it's own project so it would pull it's own
.gitsubtrees in /B/.gitsubtrees)

`John

On Thu, Mar 13, 2014 at 4:36 PM, Junio C Hamano [off-list ref] wrote:
quoted
John Butterfield [off-list ref] writes:
quoted
Has there been any talk about adding a stub for git subtrees in .git/config?
I do not think so, and that is probably for a good reason.

A subtree biding can change over time, but .git/config is about
recording information that do not change depending on what tree you
are looking at, so there is an impedance mismatch---storing that
information in .git/config is probably a wrong way to go about it.

It might help to keep track of "In this tree, the tip of that other
history is bound as a subtree at this path", which means that
information more naturally belongs to each tree, I would think.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help