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

Re: [PATCH v2 3/3] scalar reconfigure: help users remove buggy repos

From
Derrick Stolee <derrickstolee@github.com>
Date
Aug 25, 2023, 17:21 UTC
Message-ID
<f751dc4d-b605-43ef-8b73-082e8acd5914@github.com>
In-Reply-To
<xmqqmsyilv3e.fsf@gitster.g>
On 8/22/2023 3:45 PM, Junio C Hamano wrote:
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 16 quoted lines
>> +		switch (discover_git_directory_reason(&commondir, &gitdir)) {
>> +		case GIT_DIR_INVALID_OWNERSHIP:
>> +			warning(_("repository at '%s' has different owner"), dir);
>> +			goto loop_end;
>> +
>> +		case GIT_DIR_DISCOVERED:
>> +			succeeded = 1;
>> +			break;
>> +
>> +		default:
>> +			warning(_("repository not found in '%s'"), dir);
>> +			break;
> 
> Among the error cases, INVALID_OWNERSHIP is one of the possibilities
> that merits specialized message to the end-user.  I wonder if others
> also deserve to be explained, though.
The specific choice of GIT_DIR_INVALID_OWNERSHIP is singled out
because it's a new-ish reason and is the most confusing to users
when things fail for this reason.
 
>  - HIT_CEILING and HIT_MOUNT_POINT will happen when there is no
>    usable repository between "dir" and the specified ceiling.

These are basically "didn't find a Git repo" but there are different reasons why Git stopped looking. I'm not sure there is something more valuable to indicate here than the "repository not found" message that already exists.

>  - INVALID_GITFILE and INVALID_FORMAT are signs of some repository
>    corruption.

I can add a message for this kind of error, which seems helpful to point out to a user.

>  - DISALLOWED_BARE is unlikely to happen in the scalar context.
I agree.

Thanks, -Stolee

Previous: Junio C HamanoNext: Junio C Hamano
Message 15 of 25 in “scalar: two downstream improvements”
  1. 0/3 scalar: two downstream improvementsDerrick Stolee via GitGitGadget, Aug 14, 2023
  2. 1/3 scalar: add --[no-]src optionDerrick Stolee via GitGitGadget, Aug 14, 2023
  3. Junio C HamanoAug 14, 2023
  4. Derrick StoleeAug 14, 2023
  5. 3/3 scalar reconfigure: help users remove buggy reposDerrick Stolee via GitGitGadget, Aug 14, 2023
  6. Junio C HamanoAug 14, 2023
  7. 2/3 setup: add discover_git_directory_reason()Derrick Stolee via GitGitGadget, Aug 14, 2023
  8. Junio C HamanoAug 14, 2023
  9. Junio C HamanoAug 14, 2023
  10. 0/3 scalar: two downstream improvementsDerrick Stolee via GitGitGadget, Aug 22, 2023
  11. 1/3 scalar: add --[no-]src optionDerrick Stolee via GitGitGadget, Aug 22, 2023
  12. Oswald BuddenhagenAug 23, 2023
  13. 3/3 scalar reconfigure: help users remove buggy reposDerrick Stolee via GitGitGadget, Aug 22, 2023
  14. Junio C HamanoAug 22, 2023
  15. Derrick StoleeAug 25, 2023
  16. Junio C HamanoAug 25, 2023
  17. 2/3 setup: add discover_git_directory_reason()Derrick Stolee via GitGitGadget, Aug 22, 2023
  18. Junio C HamanoAug 22, 2023
  19. Derrick StoleeAug 22, 2023
  20. Oswald BuddenhagenAug 23, 2023
  21. 0/3 scalar: two downstream improvementsDerrick Stolee via GitGitGadget, Aug 28, 2023
  22. 1/3 scalar: add --[no-]src optionDerrick Stolee via GitGitGadget, Aug 28, 2023
  23. 3/3 scalar reconfigure: help users remove buggy reposDerrick Stolee via GitGitGadget, Aug 28, 2023
  24. 2/3 setup: add discover_git_directory_reason()Derrick Stolee via GitGitGadget, Aug 28, 2023
  25. Junio C HamanoAug 28, 2023

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.