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

Re: [PATCH] t2017: redo physical reflog existance check

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 23, 2010, 02:23 UTC
Message-ID
<7vsk3bey1e.fsf@alter.siamese.dyndns.org>
In-Reply-To
<AANLkTilt5gx3Wj4eANfkIFm869Olns1rsMpCS81hS2BV@mail.gmail.com>
Erick Mattos <erick.mattos@gmail.com> writes:
> To make the new orphan branch ready to have a reflog on that config
> was as simple as creating a "touch file" for reflog.  This is the goal
> achieved by code.

I have to say that you are somewhat confused about the _goal_ then. touch is not a goal, it is means to a goal.

It does not matter how you implement the user visible effect, be it a creation of an empty file, or some other means [*1*]. What matters is that the user won't get a reflog for a branch that really didn't get created and must-fail "rev-parse --verify" test checks that.

Another thing that could matter would be that future actions that want to create a reflog for the same branch (perhaps after the user switches to 'master', another attempt is made to create eta with "checkout -b eta") or another branch with a similar or related name (say "eta/real") are not get broken by whatever you do to implement the "we want to create a reflog when a ref is actually made but not right now" feature. Perhaps the right way to test that would be to actually try to run such operations and make sure they do not fail.

[Footnote]

*1* For example, you could have implemented the feature by adding a config item in ".git/config: [branch "eta"] need-to-create-reflog", and taught refs.c::update_ref() to pay attention to it (I am not saying that it would be a better implementation).

Previous: Erick MattosNext: Erick Mattos
Message 4 of 8 in “t2017: redo physical reflog existance check”
  1. t2017: redo physical reflog existance checkErick Mattos, Jul 22, 2010
  2. Junio C HamanoJul 22, 2010
  3. Erick MattosJul 22, 2010
  4. Junio C HamanoJul 23, 2010
  5. Erick MattosJul 23, 2010
  6. Jonathan NiederAug 24, 2010
  7. Junio C HamanoAug 24, 2010
  8. Erick MattosAug 24, 2010

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.