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

Re: git bug? + question

From
Karl Hasselström <kha@treskal.com>
Date
Nov 3, 2006, 09:46 UTC
Message-ID
<20061103094655.GA16721@diana.vm.bytemark.co.uk>
In-Reply-To
<7v3b90gbfv.fsf@assigned-by-dhcp.cox.net>
On 2006-11-03 00:51:32 -0800, Junio C Hamano wrote:
Show 35 quoted lines
> Karl Hasselström <kha@treskal.com> writes:
>
> > On 2006-11-02 18:40:30 -0800, Junio C Hamano wrote:
> >
> > > I still need to remember to process "master" first, so all
> > > things considered, this is a regression in usability for my
> > > workflow.
> >
> > Where does this constraint come from?
>
> Because I'll have to have the per-branch configuration that would
> say something like this:
>
>       [remote."gitster"]
>               url = gitster.example.com:/home/junio/git.git/
>               fetch = heads/maint:remotes/gitster/maint
>               fetch = heads/master:remotes/gitster/master
>               fetch = heads/next:remotes/gitster/next
>               fetch = +heads/pu:remotes/gitster/pu
>
>       [branch."master"]
>               remote = gitster
>               merge = heads/master
>       [branch."maint"]
>               remote = .
>               merge = remotes/gitster/maint
>       [branch."next"]
>               remote = .
>               merge = remotes/gitster/next
>       ...
>
> This requires that by the time we update maint, next and pu branches
> with what is in the upstream, their corresponding remotes/gitster/*
> branches are already up-to-date and do not have to be re-fetched,
> and processing master first is what guarantees it.

Ahh, here is where our workflows differ: I would want to have "remote = ." for all the branches, and use "git fetch" to update the remotes. (I guess this is only natural; my workflow requires less state in the head of the user, and so is easier for beginners, while yours is slightly more efficient in terms of number of commands that have to be given.)

Hmm. How about changing the meaning of "remote" slightly? Like this:
      [remote."gitster"]
              url = gitster.example.com:/home/junio/git.git/
              fetch = heads/master:remotes/gitster/master
              fetch = heads/next:remotes/gitster/next
      [branch."master"]
              remote = gitster
              merge = remotes/gitster/master
      [branch."next"]
              remote = gitster
              merge = remotes/gitster/next

This would mean: When the user says "git pull" in master, use the remote gitster to fetch updates to remotes/gitster/master, then merge remotes/gitster/master into master.

With this scheme, "git pull" would never fetch any other branches than those about to be merged; to fetch more in one go, use "git fetch".

I realize this would break existing configs quite badly, so don't take it too seriously.

-- 
Karl Hasselström, kha@treskal.com
Previous: Junio C HamanoNext: Josef Weidendorfer
Message 8 of 38 in “git bug? + question”
  1. Miles BaderNov 2, 2006
  2. Junio C HamanoNov 3, 2006
  3. SeanNov 3, 2006
  4. Karl HasselströmNov 3, 2006
  5. Junio C HamanoNov 3, 2006
  6. Andy ParkinsNov 3, 2006
  7. Junio C HamanoNov 3, 2006
  8. Karl HasselströmNov 3, 2006
  9. Josef WeidendorferNov 3, 2006
  10. Jakub NarebskiNov 3, 2006
  11. Josef WeidendorferNov 3, 2006
  12. Junio C HamanoNov 4, 2006
  13. Josef WeidendorferNov 4, 2006
  14. Martin WaitzNov 3, 2006
  15. Santi BéjarNov 3, 2006
  16. Linus TorvaldsNov 3, 2006
  17. Junio C HamanoNov 3, 2006
  18. Andy ParkinsNov 3, 2006
  19. Karl HasselströmNov 3, 2006
  20. SeanNov 3, 2006
  21. Karl HasselströmNov 3, 2006
  22. Shawn PearceNov 3, 2006
  23. SeanNov 3, 2006
  24. Jeff KingNov 3, 2006
  25. Shawn PearceNov 4, 2006
  26. Shawn PearceNov 3, 2006
  27. SeanNov 3, 2006
  28. Junio C HamanoNov 4, 2006
  29. SeanNov 4, 2006
  30. Shawn PearceNov 4, 2006
  31. Josef WeidendorferNov 4, 2006
  32. Shawn PearceNov 4, 2006
  33. Josef WeidendorferNov 6, 2006
  34. Andy WhitcroftNov 6, 2006
  35. Josef WeidendorferNov 6, 2006
  36. Andy WhitcroftNov 6, 2006
  37. Shawn PearceNov 4, 2006
  38. Shawn PearceNov 4, 2006

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.