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

Re: [PATCH] tone down the detached head warning

From
APAndy Parkins <andyparkins@gmail.com>
Date
Feb 1, 2007, 08:44 UTC
Message-ID
<200702010844.34500.andyparkins@gmail.com>
In-Reply-To
<eprbaa$o0m$1@sea.gmane.org>
On Thursday 2007 February 01 00:14, Jakub Narebski wrote:
> Although the fact that clone copies all branches and tags (I don't think
> there is a way to clone only subset of branches), and that fetch is multi

There is, as long as you are willing to organise your branches in a consistent way. I keep all my branches with the prefix "ap/" then on another development machine I just have

 pull = refs/heads/ap/*:refs/heads/up/ap/*

In my config. This means I can make local branches that won't be grabbed during the fetch, but still have branches automatically exported.

This actually highlights a weakness in the globbing. There is no way, for example, to grab only unprefixed branches because the glob is blind to path dividers (as is usual). What would be even better would be a two glob symbols, one meaning "do cross separators", one meaning "don't". I think rsync solves it for it's include/exclude patterns with a double asterisk. That is:

 rsync -av --exclude "foo/*/bar" src/ dest/
Would exclude anything called "bar" two levels under "foo/"; wheras
 rsync -av --exclude "foo/**/bar" src/ dest/

Would exclude anything called "bar" anywhere deeper than two levels under "foo".

I haven't thought of a good way of applying this in git though, and I have a feeling that it could just complicate things excessively.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
Previous: Jakub NarebskiNext: Matthias Lederhofer
Message 8 of 35 in “tone down the detached head warning”
  1. tone down the detached head warningNicolas Pitre, Jan 31, 2007
  2. Jeff KingJan 31, 2007
  3. Jakub NarebskiJan 31, 2007
  4. Jeff KingJan 31, 2007
  5. Jakub NarebskiJan 31, 2007
  6. Carl WorthJan 31, 2007
  7. Jakub NarebskiFeb 1, 2007
  8. Andy ParkinsFeb 1, 2007
  9. Matthias LederhoferFeb 1, 2007
  10. Nicolas PitreFeb 1, 2007
  11. Jeff KingFeb 1, 2007
  12. Junio C HamanoFeb 1, 2007
  13. Jeff KingFeb 1, 2007
  14. Nicolas PitreFeb 1, 2007
  15. Jeff KingFeb 1, 2007
  16. detached HEAD -- finishing touchesJunio C Hamano, Feb 1, 2007
  17. Raimund BauerFeb 1, 2007
  18. Alex RiesenFeb 1, 2007
  19. Alex RiesenFeb 1, 2007
  20. git-checkout: disable guides how to switch branches with ui.guideMatthias Lederhofer, Feb 1, 2007
  21. Junio C HamanoFeb 1, 2007
  22. Matthias LederhoferFeb 1, 2007
  23. Junio C HamanoFeb 1, 2007
  24. Matthias LederhoferFeb 1, 2007
  25. Carl WorthFeb 1, 2007
  26. Nicolas PitreFeb 1, 2007
  27. Carl WorthFeb 1, 2007
  28. Jakub NarebskiFeb 1, 2007
  29. Theodore TsoFeb 1, 2007
  30. Junio C HamanoFeb 2, 2007
  31. Theodore TsoFeb 2, 2007
  32. Carl WorthFeb 2, 2007
  33. Junio C HamanoFeb 2, 2007
  34. Carl WorthFeb 2, 2007
  35. Junio C HamanoFeb 2, 2007

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.