Re: Determining whether you have a commit locally, in a partial clone?
- From
Tao Klerks <tao@klerks.biz>
- Date
- Jun 20, 2023, 12:04 UTC
- Message-ID
- <CAPMMpog8Hv_KcjNxbh_wzjwrFYt7TuTvrVy1XEtJMm6RWSKzRg@mail.gmail.com>
- In-Reply-To
- <CAPMMpohiTzANyhzL-mS-gg2kzbOEOiDktNbdwEXBKy9uL0-JgA@mail.gmail.com>
On Tue, Jun 20, 2023 at 1:26 PM Tao Klerks <tao@klerks.biz> wrote:
> > * Is there any way to run a single git command in a "don't use > promisors" context?
My apologies for the self-reply, I did find a workaround here:
git -c remote.origin.url log SOME_HASH_NOT_IN_REFSPEC
I don't understand what's happening here at all, because setting "remote.origin.url" to "True" in this way works to prevent the normally configured URL from kicking in, but setting a different value (or empty value) does not. The following will end up fetching from the originally-configured URL, completely ignoring the passed-in config:
git -c remote.origin.url=BADURL log SOME_HASH_NOT_IN_REFSPEC
I'm still interested to know whether there's a less-hacky way of determining "do I have this commit locally?", of course, but fwiw I am unblocked.