Re: [PATCH] Fix default pull not to do an unintended Octopus.
- From
Petr Baudis <pasky@suse.cz>
- Date
- Sep 27, 2005, 12:54 UTC
- Message-ID
- <20050927125434.GF30889@pasky.or.cz>
- In-Reply-To
- <200509271152.42963.Josef.Weidendorfer@gmx.de>
Dear diary, on Tue, Sep 27, 2005 at 11:52:42AM CEST, I got a letter where Josef Weidendorfer <Josef.Weidendorfer@gmx.de> told me that...
> As Cogito does, I expect the porcelain to store the mapping of a > local head to a remote head, automatically using the right remote > repository.
Yes. I'm actually inclined to keep this setup, simply because it is
* easy * simple * sufficient in most of the cases
Cogito's fetch/update should certainly support the remotes stuff, since they are obviously much more useful and practical for more complicated setup, but I think I will keep the branches/ setup (the name of the directory is the only thing I don't like on it ;) as the primary mean of configuring remote branches. I will only have to add possibility to cg-fetch multiple branches at once, which could also make branches/ significantly more practical.
Show 6 quoted lines
> Perhaps we should have extended the branches file to allow different > remote reps and heads depending on the command (fetch/pull/merge/push). > A "URL:" is not needed, as you probably like to have different repos for pull > and push. And in contrast to the remotes stuff above, a "Merge:" line makes > quite sense here: When on "mybranch", a merge should default to merging > the heads specified on the Merge line in branches/mybranch.
No. If you are in the branches/ playground, please keep it strictly one-to-one mapping. That's what makes it easy and simple and that's what makes it good.
Show 6 quoted lines
> When cloning a remote head, Cogito creates a local "origin" head and > corresponding mapping in branches/origin. Afterwards, it automatically > generates a new local branch "master", which branches of at the > origin. Further "cg-updates" (=git fetch+merge) fetch origin, and merge > origin into master. > I assume that this currently is hardcoded in scripts?
Yes.
> Shouldn't there be created a branches/master, specifying that a default > merge should happen with "origin"? This way, an "cg-update" would look > into "branches/master" on the "Merge:" line. It sees that "origin" is > bound to a remote head, and thus, does a fetch before merging.
If ever doing that, this should be done at some other place than branches/. And I'm sceptical about it anyway. Really, introducing some new configuration mechanism just to tell Cogito what default branch name should it pick up when you call fetch/update/merge without a parameter? I don't know if that wouldn't make more evil than good.
Well, if you _really_ _really_ badly want it, we can make .git/default-origin/ or something... duh, what a stupid name. :)
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ VI has two modes: the one in which it beeps and the one in which it doesn't.