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

Re: Bug: Git Maintenance does not register multiple repos

From
Kristoffer Haugsbakk <code@khaugsbakk.name>
Date
Jun 20, 2024, 13:54 UTC
Message-ID
<665f77a0-f301-40ae-ab94-2920d15fcc8d@app.fastmail.com>
In-Reply-To
<CAG=Um+0LXVRHmvKdTB9WHJujjh9agK_ZHdv45ffzMsqX65NLVw@mail.gmail.com>
Hi
On Thu, Jun 20, 2024, at 15:15, Shubham Kanodia wrote:
Show 16 quoted lines
> When I run — `git maintenance register` to register a particular
> repository for maintenance,
> it appends a new entry to `~/.gitconfig` with the repo name.
>
> ```
> [maintenance]
>        repo = /path/to/repo-1
>        repo = /path/to/repo-2
> ```
>
> Now, since git uses the INI format for these files, this would imply that
> repo-2 actually overrides repo 1 for maintenance.
>
> This implies that a user can only register a single repository on
> their system for
> maintenance.

Imply? Did you test this? From memory this is a multi-valued config, and multi-valued configs are sometimes listed by using `=` multiple times for the same config variable. That’s also what [this] email says:

  “ The 'git maintenance [un]register' commands set or unset the multi-
    valued maintenance.repo config key with the absolute path of the
    current repository. These are set in the global config file.
🔗 this: https://lore.kernel.org/git/5aa9cc1d6b93b5ad3d66ac01a4518a91ced39bcb.1664287021.git.gitgitgadget@gmail.com/

I’ve never seen that git config uses the INI format. I’ve had the impression that it is a bespoke format that simply looks like the INI format. (But is the INI format even standardized?)

I have two repositories registered. When I run this:

``` git for-each-repo --config=maintenance.repo maintenance run ```

Well, it doesn’t tell me what repositories are being manipulated, but I do get two of these lines:

``` Enumerating objects: […] ```

So I surmise that this command is being run twice.
-- 
Kristoffer Haugsbakk
Previous: Shubham KanodiaNext: Kristoffer Haugsbakk
Message 2 of 4 in “Bug: Git Maintenance does not register multiple repos”
  1. Shubham KanodiaJun 20, 2024
  2. Kristoffer HaugsbakkJun 20, 2024
  3. Kristoffer HaugsbakkJun 21, 2024
  4. Phillip WoodJun 21, 2024

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.