Re: What's cooking in git.git (topics)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Josef Weidendorfer
Date: Tuesday, April 22, 2008 - 11:07 am

On Tuesday 22 April 2008, Ping Yin wrote:

Hmm... At least, it can be very annoying when git fetches data from repositories
you did not expect, only because submodule URLs change via this
fallback mechanism. Perhaps it is a little far reached, but suppose a project
changes its URL, and the old one becomes occupied by a malicious person.
The problem is that the URL with the now malicious repository is bound in the
history of the project. For sure, you do not want to fetch from that old repository
by accident, after you did a checkout of an old commit. And there would be no
way to protect other people from this malicious repository other than rewriting
the whole history.


For me this sounds like: Now that we have made this bad decision, it does
not matter to make it even worse.

What was the motivation for this fallback mechanism?

In any way, it is preferable to always use the correct URL for submodules.
Thus, when the URL ever changes in the projects livetime (covered by
git history), you want to have the correct URL in your .git/config
(not to accidently use the wrong URL when checking out an old commit).
But then, the fallback mechanism does not trigger anyway.


Of course. It makes no sense to have submodule path configuration in .git/config,
as it has to be in sync with the current commit. That has nothing to do with
precedence. The same is true for .gitattributes, for example.


No.
These are totally different types of configurations.

Josef


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
What's cooking in git.git (topics), Junio C Hamano, (Tue Apr 22, 3:03 am)
Re: What's cooking in git.git (topics), Ping Yin, (Tue Apr 22, 6:59 am)
Re: What's cooking in git.git (topics), Josef Weidendorfer, (Tue Apr 22, 7:55 am)
Re: What's cooking in git.git (topics), Ping Yin, (Tue Apr 22, 10:13 am)
Re: What's cooking in git.git (topics), Johannes Schindelin, (Tue Apr 22, 10:28 am)
Re: What's cooking in git.git (topics), Josef Weidendorfer, (Tue Apr 22, 11:07 am)
Re: What's cooking in git.git (topics), Michele Ballabio, (Tue Apr 22, 1:51 pm)
Re: What's cooking in git.git (topics), Junio C Hamano, (Tue Apr 22, 5:22 pm)
Re: What's cooking in git.git (topics), Ping Yin, (Tue Apr 22, 6:27 pm)
Re: What's cooking in git.git (topics), Ping Yin, (Tue Apr 22, 6:59 pm)
Re: What's cooking in git.git (topics), Ping Yin, (Tue Apr 22, 7:03 pm)
Re: What's cooking in git.git (topics), Michele Ballabio, (Wed Apr 23, 12:36 am)
Re: What's cooking in git.git (topics), Fedor Sergeev, (Wed Apr 23, 12:47 am)
Re: What's cooking in git.git (topics), Ping Yin, (Wed Apr 23, 1:32 am)
Re: What's cooking in git.git (topics), Robin Rosenberg, (Wed Apr 23, 1:47 am)
Re: What's cooking in git.git (topics), Fedor Sergeev, (Wed Apr 23, 2:16 am)