"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
James Cook <falsifian@falsifian.org>
Subject:
Re: allow remotes without urls in git config; add tests
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Thu, 25 Jan 2024 19:13:08 +0000

Download raw body.

Thread
  • James Cook:

    allow remotes without urls in git config; add tests

  • > > I didn't touch the implementation in lib/read_gitconfig.c because
    > > that seems to be only used by gotd, which I don't (yet) use and so
    > > couldn't easily test. Is that duplicate implementation still needed?
    > > I actually made my change there first and it took me a while to
    > > realize it was the wrong place.
    > 
    > I think this is due to the fact that gotd doesn't use the libexec
    > helpers, so you end up with two "interfaces": one that runs
    > got-read-gitconfig under the hood (lib/read_gitconfig_privsep.c) and one
    > that doesn't (lib/read_gitconfig.c).
    > 
    > (i've been bitten by this separation in the past too, but there are more
    > files like that in lib/ which do the same thing.)
    > 
    > I think however that if we change the behaviour of got-read-gitconfig we
    > should keep the same in lib/read_gitconfig.  I can tweak the latter in a
    > follow-up if you prefer though.
    > 
    > I never used git-annex and I don't know how much a server should care,
    > but I think that if got(1) can work on a repository, then gotd should be
    > able to do it too.
    
    Yes, I think gotd would want to be able to interact with git-annex 
    repos. Git-annex repos are also regular git repos, and are synchronized 
    using git fetch or push (or perhaps more low-level equivalent git 
    commands). So it's quite plausible someone would want to access 
    their git-annex repo via gotd. If I understand right, gotd would 
    fail to open the repo if git-annex had added one of the strange 
    remotes to the config file.
    
    If you would like to update the gotd code in a similar way it would 
    be helpful since I don't yet use gotd. Alternatively, I wonder if 
    there's room to refactor so that the two implementations share more 
    code. I am tempted to take a look but don't know if I'll find time.
    
    -- 
    James
    
    
  • James Cook:

    allow remotes without urls in git config; add tests