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

Bug: Git Maintenance does not register multiple repos

From
Shubham Kanodia <shubham.kanodia10@gmail.com>
Date
Jun 20, 2024, 13:15 UTC
Message-ID
<CAG=Um+0LXVRHmvKdTB9WHJujjh9agK_ZHdv45ffzMsqX65NLVw@mail.gmail.com>

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.

What did you expect to happen? (Expected behavior) I expected that multiple repositories on the system could be setup for maintenance using this command. Which would mean, the `repo` filed would be an array.

```
[maintenance]
       repo[] = /path/to/repo-1
       repo[] = /path/to/repo-2
```
What happened instead? (Actual behavior)
It appended an entry with the same key, which would mean only the last
key wins, and a user cannot have
multiple repos as a part of maintenance.

What's different between what you expected and what actually happened? Mentioned earlier.

Anything else you want to add: No.

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info] git version: git version 2.39.3 (Apple Git-146) cpu: arm64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh feature: fsmonitor--daemon uname: Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64 compiler info: clang: 15.0.0 (clang-1500.3.9.4) libc info: no libc information available $SHELL (typically, interactive shell): /opt/homebrew/bin/fish

[Enabled Hooks] post-checkout post-commit post-merge pre-push

Next: Kristoffer Haugsbakk
Message 1 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.