Thread (6 messages) 6 messages, 2 authors, 2023-06-27

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

From: Tao Klerks <hidden>
Date: 2023-06-20 12:04:23

On Tue, Jun 20, 2023 at 1:26 PM Tao Klerks [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help