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

Re: [RFC 0/3] Reflogs for deleted refs: fix breakage and suggest namespace change

From
Alexey Muranov <alexey.muranov@gmail.com>
Date
Aug 20, 2012, 11:32 UTC
Message-ID
<62FFD304-1902-4D69-9287-ECD1E32BABC9@gmail.com>
In-Reply-To
<7vobm6o1cu.fsf@alter.siamese.dyndns.org>
Dear Junio,
On 20 Aug 2012, at 02:26, Junio C Hamano wrote:
Show 12 quoted lines
> We are not particularly interested in "it is possible" when many
> implementations can all trivially allow it to be "possible"; the
> question is what a sensible solution is among them, and I didn't
> find "a directory with timestamp in its name" a particularly
> sensible way to go.
> 
> Either Jeff's "refname $name's log goes to logs/graveyard/$name~" or
> Michael's "append ~d to each directory component, append ~f to the
> leaf component" that are already proposed will keep "one file per
> name" property to allow us to open once and efficiently read the
> file through.  Why would we want to see an inferiour alternative
> added to the discussion?
I let the others decide if my idea with "timestamp" directories has a significant advantage over other proposed solutions or not.  It seemed different, so i wanted to add it to the discussion.  I cannot clearly formulate an advantage, but i will try to explain why i proposed it.
I would like also to propose another solution for allowing both "next" and "next/foo" branches, and to try to explain how it is different from the other proposed solutions (unless i missed something).
I would like that the solutions introduce as little new as possible to the existing solutions used in similar situation.
The problem of mapping branch names to file paths looks to me very similar to the problem of mapping URLs to file paths for static web sites, so i would propose to use the same solution: add a special extension to distinguish a file from a directory, for example ".branch" and ".tag" (like ".html" in the case of URL).  This would allow having both branches "next" and "next/foo" with refs stored in files "next.branch" and "next/foo.branch".  This will look very clear and familiar to people not specialist in Git, but familiar with static web sites.  The only limitation this would introduces is that branch names "foo.branch" would need to be forbidden.  If the extension is optional, this makes the new rule almost compatible with the current one, except if somebody is currently using branches n
 amed like "foo.branch" or "next.branch/foo".
For the reflogs of deleted branches, if both "next/foo" and "next" are allowed and it is decided to append to the reflogs when a new branch with the same name is deleted, then of course "timestamp" directories are useless.  However, i do not think that if a branch "tmp" was created and deleted multiple times, all its reflogs have to be concatenated into a single file.  So i viewed the problem of deleting identically named branches as the problem of deleting files under an operating system environment that uses a Trash Bin.  In this case, adding a timestamp usually solves the problem.
-Alexey.
Previous: Junio C HamanoNext: Alexey Muranov
Message 16 of 21 in “[RFC 0/3] Reflogs for deleted refs: fix breakage and suggest namespace change”
  1. mhagger@alum.mit.eduAug 18, 2012
  2. 1/3 t9300: format test in modern style prior to modifying itmhagger@alum.mit.edu, Aug 18, 2012
  3. 2/3 Delete reflogs for dead references to allow pruningmhagger@alum.mit.edu, Aug 18, 2012
  4. Jeff KingAug 21, 2012
  5. 3/3 Change naming convention for the reflog graveyardmhagger@alum.mit.edu, Aug 18, 2012
  6. Junio C HamanoAug 18, 2012
  7. Alexey MuranovAug 18, 2012
  8. Junio C HamanoAug 19, 2012
  9. Alexey MuranovAug 19, 2012
  10. Alexey MuranovAug 19, 2012
  11. Alexey MuranovAug 19, 2012
  12. Junio C HamanoAug 19, 2012
  13. Alexey MuranovAug 19, 2012
  14. Junio C HamanoAug 20, 2012
  15. Junio C HamanoAug 20, 2012
  16. Alexey MuranovAug 20, 2012
  17. Alexey MuranovAug 20, 2012
  18. Michael HaggertyAug 19, 2012
  19. Junio C HamanoAug 19, 2012
  20. Jeff KingAug 21, 2012
  21. Junio C HamanoAug 21, 2012

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.