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

Re: How to exchange rerere/redo resolutions?

From
Junio C Hamano <gitster@pobox.com>
Date
May 15, 2019, 01:12 UTC
Message-ID
<xmqqr2908qrh.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<87mujpwiod.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 11 quoted lines
>>     if test -s "$GIT_DIR/MERGE_RR"
>>
>> It's not clear if that is an internal implementation detail, or a
>> mistaken use of a historic path name. Can anyone enlighten me?
>
> Historic? No, this is path.c now on master:
>
>     path.c:1454:REPO_GIT_PATH_FUNC(merge_rr, "MERGE_RR")
>
> Internal, sure. We don't document it so it could change in theory, but
> then we'd probably change rerere-train.sh along with it...

Doesn't the function defined by REPO_GIT_PATH_FUNC() do far more than a simple concatenation? I suspect that he questions why "$GIT_DIR/MERGE_RR" is an OK substitute for that.

The $GIT_DIR variable in the script is set by inclusion of git-sh-setup, that runs "git rev-parse --git-dir"; in post "git worktree" world, where ".git" may be a "gitdir: $real_location" text file, this will give the actual directory, not the path to a regular file at the top of the working tree whose name is ".git", so the answer to the question is that the concatenation we see should be OK, even in the "git worktree" world.

Previous: Philip OakleyNext: Torsten Bögershausen
Message 8 of 10 in “How to exchange rerere/redo resolutions?”
  1. Philip OakleyMay 9, 2019
  2. Ævar Arnfjörð BjarmasonMay 9, 2019
  3. Philip OakleyMay 10, 2019
  4. Philip OakleyMay 13, 2019
  5. Junio C HamanoMay 13, 2019
  6. Ævar Arnfjörð BjarmasonMay 14, 2019
  7. Philip OakleyMay 14, 2019
  8. Junio C HamanoMay 15, 2019
  9. Torsten BögershausenMay 10, 2019
  10. Philip OakleyMay 10, 2019

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.