On 2021-06-21 at 17:20:28, Tim Hutt wrote: > Ah of course! > > > git pack-refs --all > > Yeah that "fixes" things so you get `fatal: invalid reference: MASTER`. > > I guess `git checkout` checks whether `MASTER` exists (yes, according > to MacOS), but git log checks whether the current branch (`MASTER`) > matches `master` (it doesn't). > > Very unfortunate, but I guess it's not worth fixing. I should point out that there is work underway to add a ref backend called reftable that doesn't store things in the file system and hence doesn't suffer from this problem. It's just a big project and it involves touching a lot of code, so it's slow going, but when it's completed, people who are using that won't have this problem ("MASTER" will be rejected if the branch is "master"). You aren't the first person to report this problem in some variation (it comes up quite frequently); we've known about it a long time, but fixing it just isn't trivial. In the mean time, you may prefer to adopt a naming convention for your project branches; for example, even though I use Linux and don't have this problem, I always use lowercase, which makes things easier for colleagues on other systems (and is also easier to type). -- brian m. carlson (he/him or they/them) Toronto, Ontario, CA
Attachment:
signature.asc
Description: PGP signature