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

Re: several quick questions

From
Andreas Ericsson <ae@op5.se>
Date
Feb 14, 2006, 23:00 UTC
Message-ID
<43F26129.4040804@op5.se>
In-Reply-To
<7v7j7xr54u.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 20 quoted lines
> Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:
> 
> 
>>Why not allow something like
>>
>>	git-checkout master~5
>>
>>which implicitly does create a read-only branch "seek-point"?
> 
> 
> Now what does "git-checkout branch" mean?  Does it switch to the
> branch, or does it force tip of seek-point to be the tip of
> branch and switch to seek-point branch?  More interestingly,
> what does "git-checkout seek-point" mean? 
> 
> If we _were_ to do something like cg-seek where an implicit
> throw-away branch is used, you at least need a way to
> disambiguate these cases, and "git seek" originally suggested is
> far clearer than what you said above.
> 
Nah. What's the point of having another protected name. Just allow
	$ git checkout -b discard HEAD~15
and we're good to go.
Show 10 quoted lines
> Having said that, I am not convinced in either way, though.
> 
> 
>>A branch could be marked readonly by above command with
>>
>>	chmod a-w .git/refs/heads/seek
> 
> 
> I do not think that would work.  Have you tried it?
> 

It wouldn't on cygwin, for one. I'm against having things work differently on different platforms. If nothing else it usually worsens the bitrot that always happens to documentation.

Show 10 quoted lines
> 
>>And git-commit should refuse to commit on a readonly ref, telling
>>the user to create a writable branch before with "git-branch new".
> 
> 
> Now, read-only ref does not interest me, but "do not commit on
> top of this yourself, only fast-forward from somewhere else is
> allowed" may be useful, for the reason why you mentioned
> "origin".
> 

Do my suggestion and you wouldn't have to worry about read-only branches, and although merging any changes from it might be more trouble than its worth, it might be possible to cherry-pick the commit rather than reverting and re-applying it.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Josef WeidendorferNext: Johannes Schindelin
Message 35 of 57 in “several quick questions”
  1. Nicolas Vilz 'niv'Feb 14, 2006
  2. Andreas EricssonFeb 14, 2006
  3. Nicolas Vilz 'niv'Feb 14, 2006
  4. Linus TorvaldsFeb 14, 2006
  5. Kenneth JohanssonFeb 14, 2006
  6. Andreas EricssonFeb 14, 2006
  7. Kenneth JohanssonFeb 14, 2006
  8. Linus TorvaldsFeb 14, 2006
  9. Carl WorthFeb 14, 2006
  10. Linus TorvaldsFeb 14, 2006
  11. Carl WorthFeb 14, 2006
  12. Petr BaudisFeb 14, 2006
  13. Johannes SchindelinFeb 14, 2006
  14. Junio C HamanoFeb 14, 2006
  15. Johannes SchindelinFeb 14, 2006
  16. Petr BaudisFeb 14, 2006
  17. Linus TorvaldsFeb 14, 2006
  18. Petr BaudisFeb 14, 2006
  19. Carl WorthFeb 14, 2006
  20. Junio C HamanoFeb 14, 2006
  21. New git-seek command with documentation and test.Carl Worth, Feb 23, 2006
  22. J. Bruce FieldsFeb 24, 2006
  23. git-seek: Eliminate spurious warning. Fix errant reference to git-bisect in docs.Carl Worth, Feb 24, 2006
  24. Junio C HamanoFeb 24, 2006
  25. Andreas EricssonFeb 24, 2006
  26. Junio C HamanoFeb 24, 2006
  27. Carl WorthFeb 24, 2006
  28. Johannes SchindelinFeb 24, 2006
  29. J. Bruce FieldsFeb 24, 2006
  30. Josef WeidendorferFeb 14, 2006
  31. Junio C HamanoFeb 14, 2006
  32. Josef WeidendorferFeb 14, 2006
  33. Junio C HamanoFeb 14, 2006
  34. More useful/hinting error messages in git-checkoutJosef Weidendorfer, Feb 15, 2006
  35. Andreas EricssonFeb 14, 2006
  36. Johannes SchindelinFeb 14, 2006
  37. Andreas EricssonFeb 15, 2006
  38. Junio C HamanoFeb 15, 2006
  39. Junio C HamanoFeb 15, 2006
  40. Andreas EricssonFeb 15, 2006
  41. Junio C HamanoFeb 15, 2006
  42. Petr BaudisFeb 14, 2006
  43. Carl WorthFeb 14, 2006
  44. Linus TorvaldsFeb 14, 2006
  45. Andreas EricssonFeb 14, 2006
  46. Johannes SchindelinFeb 14, 2006
  47. Carl WorthFeb 14, 2006
  48. Keith PackardFeb 14, 2006
  49. Linus TorvaldsFeb 14, 2006
  50. Keith PackardFeb 14, 2006
  51. Martin LanghoffFeb 15, 2006
  52. Keith PackardFeb 15, 2006
  53. Carl WorthFeb 15, 2006
  54. Junio C HamanoFeb 14, 2006
  55. Petr BaudisFeb 14, 2006
  56. Cogito turbo-introductionPetr Baudis, Feb 15, 2006
  57. Petr BaudisFeb 15, 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.