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

Re: [PATCH 3/4] Default to displaying /all/ non-tag refs, not just locals

From
Andreas Ericsson <ae@op5.se>
Date
Nov 3, 2006, 10:55 UTC
Message-ID
<454B203C.9040006@op5.se>
In-Reply-To
<200611030847.22252.andyparkins@gmail.com>
Andy Parkins wrote:
Show 27 quoted lines
> On Friday 2006 November 03 02:40, Junio C Hamano wrote:
> 
>> That is a change in behaviour and given that we introduced
>> remotes for the explicit purpose of not to clutter the local
>> branch namespace, I doubt defaulting to _show_ remotes is a good
> 
> Really?  I had imagined it was to prevent accidental checking out of an 
> upstream-tracking branch.  Also; I don't think "not cluttering the namespace" 
> is the same as "not showing multiple namespaces".  The local namespace 
> remains as uncluttered as it ever was.  This is a question of what to 
> display.
> 
> Assuming my "mixed mode" display thing were in place, doesn't that make the 
> two choices of UI
> 
> 1)
>  git-branch            : show local branches
>  git-branch --all      : show local and remote branches
>  git-branch -r         : show remote branches
> 2)
>  git-branch            : show local and remote branches
>  git-branch --local    : show local branches
>  git-branch -r         : show remote branches
> 
> In case 2) the switch is simply selecting a filter, and so fits in with 
> the "-r" better.
> 

I think it'd make more sense if git-branch could instead take a --filter parameter that does a simple strncmp(filter, branch, strlen(filter)) to see if it should show a branch or not. That way, "--filter=remotes" would work splendidly. "local" as keyword to "--filter" could possibly be a special case and need documentation.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Previous: Andy ParkinsNext: Andy Parkins
Message 19 of 23 in “Rename remote_only to display_mode”
  1. 2/4 Rename remote_only to display_modeAndy Parkins, Nov 2, 2006
  2. Junio C HamanoNov 3, 2006
  3. Andy ParkinsNov 3, 2006
  4. Andreas EricssonNov 3, 2006
  5. Junio C HamanoNov 3, 2006
  6. Andy ParkinsNov 3, 2006
  7. Andy ParkinsNov 3, 2006
  8. Andreas EricssonNov 3, 2006
  9. Add support to git-branch to show local and remote branchesAndy Parkins, Nov 3, 2006
  10. Colourise git-branch outputAndy Parkins, Nov 3, 2006
  11. Junio C HamanoNov 3, 2006
  12. Alex RiesenNov 3, 2006
  13. Junio C HamanoNov 3, 2006
  14. Andy ParkinsNov 3, 2006
  15. Junio C HamanoNov 3, 2006
  16. 3/4 Default to displaying /all/ non-tag refs, not just localsAndy Parkins, Nov 2, 2006
  17. Junio C HamanoNov 3, 2006
  18. Andy ParkinsNov 3, 2006
  19. Andreas EricssonNov 3, 2006
  20. 4/4 Show the branch type after the branch name for remotesAndy Parkins, Nov 2, 2006
  21. Junio C HamanoNov 3, 2006
  22. Andy ParkinsNov 3, 2006
  23. Junio C HamanoNov 3, 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.