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

Re: [PATCHv1 1/2] git-p4: support git-workspaces

From
Luke Diamand <luke@diamand.org>
Date
Dec 5, 2016, 21:55 UTC
Message-ID
<CAE5ih79efEu_2jgE9V-N7+UetyYu7RjH62whcfvMBtwM-Nb8Sg@mail.gmail.com>
In-Reply-To
<xmqq4m2i3w8b.fsf@gitster.mtv.corp.google.com>
On 5 December 2016 at 21:24, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> Luke Diamand <luke@diamand.org> writes:
>
>> On 5 December 2016 at 20:53, Junio C Hamano <gitster@pobox.com> wrote:
>>> Luke Diamand <luke@diamand.org> writes:
>>>
>>>> Teach git-p4 about git-workspaces.
>>>
>>> Is this what we call "git worktree", or something else?
>>
>> Ah, I think you're right!
>
> Then I'll queue it like the attached.
>
> HOWEVER.
>
> How fast does isValidGitDir() function need to be?
It doesn't need to be fast.
Show 13 quoted lines
> The primary one
> seems to check HEAD (but it does not notice a non-repository that
> has a directory with that name), refs and objects (but it does not
> notice a non-repository that has a non-directory with these names),
> and this new one uses a test that is even more sloppy.
>
> What I am trying to get at is if we want to use a single command
> that can be given a path and answer "Yes, that is a repository"
> here, and that single command should know how the repository should
> look like.  I offhand do not know we already have such a command we
> can use, e.g. "git rev-parse --is-git-dir $path", but if there isn't
> perhaps we would want one, so that not just "git p4" but other
> scripted Porcelains can make use of it?

That would be nicer than random ad-hoc rules, certainly. I couldn't find any obvious combination that would work.

Luke
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 9 in “[PATCHv1 0/2] git-p4 patches”
  1. Luke DiamandDec 2, 2016
  2. 1/2 git-p4: support git-workspacesLuke Diamand, Dec 2, 2016
  3. Junio C HamanoDec 5, 2016
  4. Luke DiamandDec 5, 2016
  5. Junio C HamanoDec 5, 2016
  6. Junio C HamanoDec 5, 2016
  7. Luke DiamandDec 5, 2016
  8. Junio C HamanoDec 5, 2016
  9. 2/2 git-p4: support updating an existing shelved changelistLuke Diamand, Dec 2, 2016

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.