git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Josef WeidendorferNext: Josef Weidendorfer
Message 19 of 23 in “GIT 0.99.7d, and end of week status.”
  1. Junio C HamanoSep 25, 2005
  2. Alan ChandlerSep 25, 2005
  3. Junio C HamanoSep 25, 2005
  4. Alan ChandlerSep 25, 2005
  5. Junio C HamanoSep 26, 2005
  6. Alan ChandlerSep 26, 2005
  7. Junio C HamanoSep 26, 2005
  8. Tom PrinceSep 25, 2005
  9. Junio C HamanoSep 25, 2005
  10. Petr BaudisSep 26, 2005
  11. Junio C HamanoSep 26, 2005
  12. Petr BaudisSep 27, 2005
  13. Matthias UrlichsSep 29, 2005
  14. Junio C HamanoSep 29, 2005
  15. Jon LoeligerSep 26, 2005
  16. Junio C HamanoSep 26, 2005
  17. Fix default pull not to do an unintended Octopus.Junio C Hamano, Sep 27, 2005
  18. Josef WeidendorferSep 27, 2005
  19. Petr BaudisSep 27, 2005
  20. Josef WeidendorferSep 27, 2005
  21. Junio C HamanoSep 27, 2005
  22. Petr BaudisSep 27, 2005
  23. Petr BaudisSep 27, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.