git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Tao KlerksNext: Junio C Hamano
Message 2 of 9 in “Determining whether you have a commit locally, in a partial clone?”
  1. Tao KlerksJun 20, 2023
  2. Tao KlerksJun 20, 2023
  3. Junio C HamanoJun 20, 2023
  4. Tao KlerksJun 20, 2023
  5. Jeff KingJun 21, 2023
  6. Tao KlerksJun 20, 2023
  7. Jeff KingJun 21, 2023
  8. Tao KlerksJun 21, 2023
  9. Jeff KingJun 27, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.