Re: 'git maintenance' won't work on bare repos
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 23, 2021, 05:03 UTC
- Message-ID
- <CAPig+cSvYLMtML5ya4GR30-nfNNt19okLjchkkdhdzAEB19H4g@mail.gmail.com>
- In-Reply-To
- <CABXAcUzRhkeQhVtwtx-NBR0hbkoo=aCTwN464Dsj8680GPMDxw@mail.gmail.com>
On Mon, Feb 22, 2021 at 9:02 PM Clement Moyroud <clement.moyroud@gmail.com> wrote:
Show 5 quoted lines
> So the proper solution is to do it from the bare clone itself. > However, 'git maintenance register' silently fails (with an 0 exit > code). There are two tell-tale signs: > 1. 'git config --global --get maintenance.repo' returns '.' > 2. There are no Crontab entries inserted.
I can confirm that problem 1 is a bug. However, I am unable to reproduce problem 2.
Note that the crontab entry won't be created until you run `git maintenance start`. Is it possible that you are forgetting that step? (Be aware that `git maintenance start` will show a misleading "no crontab for <user>" message if you don't already have a crontab file, but the crontab entry will be created nevertheless, as evidenced by `crontab -l`.)
> To reproduce: > git init --bare test-me > git -C test-me maintenance register > git config --global --get maintenance.repo
I have a patch which fixes the problem with the bare repo path being incorrectly registered as ".", but I still need to create a regression test for it.