Skip to contentSkip to conversation

GIT_ONE_FILESYSTEM inclusion?

DISCUSSION Lars Damerow 7 participants 14 messages Jun 15, 2016

lore
Share & tools
lore
#1 lore raw
Quoted 6 lines · Lars Damerow

Just wondering if anyone has any further comments or suggestions for the GIT_ONE_FILESYSTEM patches I posted. See here for context:

   http://thread.gmane.org/gmane.comp.version-control.git/142436

If it looks good I'd love to have it considered for inclusion.

Have considered making it an option to git wrapper as suggested (-x/--one-filesystem)?
And while at it, how about making it a config option? (i.e. core.oneFilesystem?)

#2 lore raw

Am 3/24/2010 10:29, schrieb Alex Riesen:

Quoted 1 line

And while at it, how about making it a config option? (i.e. core.oneFilesystem?)

It's difficult to have this as a config option when you are looking for a repository... ;)

-- Hannes

#3 lore raw
Quoted 6 lines · Johannes Sixt

Am 3/24/2010 10:29, schrieb Alex Riesen:

Quoted 1 line

And while at it, how about making it a config option? (i.e. core.oneFilesystem?)

It's difficult to have this as a config option when you are looking for a repository... ;)

Isn't it a little pointless to look for repository when you can't access its config?

#4 lore raw
Quoted 4 lines

From Alex Riesen <[email protected]>, Wed, Mar 24, 2010 at 12:37:39PM +0100:

Isn't it a little pointless to look for repository when you can't access its config?

If you're doing the trendy thing of putting repository information in your shell prompt, then your prompt is looking for a repository every time you change a directory.

As for making this a command-line option: that's certainly doable, but it makes it harder to enforce the option's use across an organization. It's far easier for me to set an environment variable centrally on a thousand workstations than to convince a potentially large number of users to set a new shell alias for git.

thanks,
-lars

--
lars r. damerow :: button pusher :: pixar animation studios

#5 lore raw
Quoted 8 lines · Lars Damerow

From Alex Riesen <[email protected]>, Wed, Mar 24, 2010 at 12:37:39PM +0100:

Quoted 3 lines

Isn't it a little pointless to look for repository when you can't access its config?

If you're doing the trendy thing of putting repository information in your shell prompt, then your prompt is looking for a repository every time you change a directory.

Right. OTOH, if you know that your .git is accessible (on the right filesystem), but want to avoid scans in the directories below the top- level working directory (submodules?), you may want to have it configurable per-repository. The environment variable will affect scan in all your repositories you visit in this session, which maybe what you want, and maybe not.
And yes, the config option is also in addition to, not instead of the environment variable.

Quoted 5 lines

As for making this a command-line option: that's certainly doable, but it makes it harder to enforce the option's use across an organization. It's far easier for me to set an environment variable centrally on a thousand workstations than to convince a potentially large number of users to set a new shell alias for git.

Oh, I wasn't clear. I didn't mean "instead of". A command-line option _in_addition_ to the environment variable. For one-off uses.

#6 lore raw
Quoted 2 lines · Alex Riesen

Oh, I wasn't clear. I didn't mean "instead of". A command-line option _in_addition_ to the environment variable. For one-off uses.

I may have been the one who mentioned "-x to git potty" as a possibility, but I agree with Lars---I think it would be too cumbersome to use in practice.

When would you invoke this feature as "one-off"?

#7 lore raw
Quoted 11 lines · Junio C Hamano
Quoted 2 lines · Alex Riesen

Oh, I wasn't clear. I didn't mean "instead of". A command-line option _in_addition_ to the environment variable. For one-off uses.

I may have been the one who mentioned "-x to git potty" as a possibility, but I agree with Lars---I think it would be too cumbersome to use in practice.

When would you invoke this feature as "one-off"?

Maybe when I want to make sure git status does not go all over an NFS mounted submodule.

But frankly, I think it will be the most obscure feature of Git ever, with a command-line option or without. I just wanted to suggest (and actually, just should have, stupid me) to keep it in line with other similar configurations, which are present in all three forms (work tree comes to mind... Come to think of it, only the work tree).

#8 lore raw
Quoted 2 lines

From Alex Riesen <[email protected]>, Wed, Mar 24, 2010 at 08:07:03PM +0100:
But frankly, I think it will be the most obscure feature of Git ever,

Wow. Would I win a prize or something? :)

--
lars r. damerow :: button pusher :: pixar animation studios

#9 lore raw
In reply to Alex Riesen
Quoted 4 lines · Alex Riesen
Quoted 1 line

When would you invoke this feature as "one-off"?

Maybe when I want to make sure git status does not go all over an NFS mounted submodule.

But then what would you do after finding it out that it might? You stop working on that project? Doesn't --ignore-submodules do the same thing?

#10 lore raw
Quoted 8 lines · Junio C Hamano
Quoted 4 lines · Alex Riesen
Quoted 1 line

When would you invoke this feature as "one-off"?

Maybe when I want to make sure git status does not go all over an NFS mounted submodule.

But then what would you do after finding it out that it might?  You stop

Postpone whatever you were about to do, maybe.

Quoted 1 line

working on that project?  Doesn't --ignore-submodules do the same thing?

It does. I said it is obscure.

#11 lore raw
In reply to Alex Riesen
Quoted 10 lines · Alex Riesen
Quoted 6 lines · Johannes Sixt

Am 3/24/2010 10:29, schrieb Alex Riesen:

Quoted 1 line

And while at it, how about making it a config option? (i.e. core.oneFilesystem?)

It's difficult to have this as a config option when you are looking for a repository... ;)

Isn't it a little pointless to look for repository when you can't access its config?

I guess Johannes's point is that the config option can be in $GIT_DIR/config, which you can't access when looking for $GIT_DIR. OTOH, looking at ~/.gitconfig to find a core.oneFilesystem makes sense (but is probably painfull to implement since the current code to parse config file will look for $GIT_DIR first).

Signature · 2 lines
Matthieu Moy
http://www-verimag.imag.fr/~moy/
#12 lore raw
Quoted 10 lines · Matthieu Moy
Quoted 8 lines · Alex Riesen
Quoted 6 lines · Johannes Sixt

Am 3/24/2010 10:29, schrieb Alex Riesen:

Quoted 1 line

And while at it, how about making it a config option? (i.e. core.oneFilesystem?)

It's difficult to have this as a config option when you are looking for a repository... ;)

Quoted 12 lines
Quoted 2 lines

Isn't it a little pointless to look for repository when you can't access its config?

I guess Johannes's point is that the config option can be in $GIT_DIR/config, which you can't access when looking for $GIT_DIR. OTOH, looking at ~/.gitconfig to find a core.oneFilesystem makes sense (but is probably painfull to implement since the current code to parse config file will look for $GIT_DIR first).

Signature · 2 lines
Matthieu Moy
http://www-verimag.imag.fr/~moy/

Right.

As this thread showed, we can't have a config option for this feature. Were there any other objections to the patch? It looks good to me.

Peff also agreed that it was an overall improvement.
http://thread.gmane.org/gmane.comp.version-control.git/142262

Thread with the latest (v3) version of the patch:
http://thread.gmane.org/gmane.comp.version-control.git/142436

We could use this feature at Disney Animation as well. We maintain a list of $GIT_CEILING_DIRECTORIES and could do without having to maintain it if we had this feature.

Plus, Lars is one of the git users that doesn't even flinch when the Perforce servers at Pixar get a hiccup, so we should try and help our fellow "renegade" git users ;-)

Signature · 1 line
		David