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

Re: git bug? + question

From
Junio C Hamano <junkio@cox.net>
Date
Nov 3, 2006, 08:51 UTC
Message-ID
<7v3b90gbfv.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20061103074857.GA15972@diana.vm.bytemark.co.uk>
Karl Hasselström <kha@treskal.com> writes:
Show 6 quoted lines
> 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?
    With separate remotes, I'd need something like:
            for b in master maint next pu
            do
                    git checkout $b && git pull && make || break
            done
    And I also would need to have per-branch configuration to merge
    from ". remotes/origin/$b" without re-fetching while on a
    non-master branch $b, for the above to work.  I still need to
    remember to process "master" first, so all things considered,
    this is a regression in usability for my workflow.

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
	...

Side note: the above would not actually work because I am missing an earlier patch by Santi to special case 'dot' as the value of "branch.$name.remote", but I think you get the idea.

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.

I do not mind treating "master" specially at all; my otherwise idle repositories with working tree (read: ones on secondary machines I use primarily to build git binary for that machine or that platform, not to develop on) always have "master" checked out; I start working in them while "master" is checked out, and I'll be on "master" before I leave that machine.

If I keep using the traditional layout, where master is fetched to origin and next, maint and pu are used to track the remote, I do not have to do any of the above remote/branch configuration in the .git/config file, and after one "git pull" while on "master", I'd have all four branches up to date, ready to be checked out and compiled.

But I suspect this "following multiple branches at the same time, switch between them only to compile, test and install but never develop on them" workflow is rather specific to top-level maintainer's workflow and that is why I said defaulting to separate-remote would be an inconvenience to a minority.

Previous: Karl HasselströmNext: Andy Parkins
Message 5 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.