Re: Determining whether you have a commit locally, in a partial clone?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 20, 2023 at 1:26 PM Tao Klerks <tao@xxxxxxxxxx> 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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux