Expand description
comindly’s own checkout of each repository’s default branch: a detached git worktree under
~/.cache/comindly/worktrees, so indexing never touches your working folder or branches. Uses the
git command, so your SSH keys and credential helpers apply.
Structs§
- Auth
- An HTTPS username and access token, handed to git for one command only.
- Checkout
- A checkout ready to index.
- Needs
Token - Returned when an HTTPS remote needs a token that neither git’s credential helper nor the environment has.
- NoCredentials
- No tokens: git’s credential helper and SSH keys only.
Traits§
- Credentials
- Access tokens for HTTPS remotes by host; without one, git’s own credential helper answers.
Functions§
- approve
- Hand a token that worked to your git credential helper, as git does after a successful login.
- auth_
for - A token for cloning or fetching
urlwithout asking. - checkout_
dir - comindly’s checkout of
repo’s default branch undercache, if one has been made. - current_
branch - The branch checked out in your own folder (for display).
- default_
branch - The branch to index:
origin’s default (fromorigin/HEAD), elsemainormaster. - ensure_
clone - Clone
urlintoparent/<name>with your git credentials; returns the new folder. comindly’s own copy ofurlatdest: cloned once, without a checkout (indexing uses its worktree) and without file contents until needed; later runs only fetch. - helper_
auth - What your git credential helper holds for
host. - name
- The repository’s name: its folder’s name.
- prepare
- Fetch the remote’s default branch and check it out in comindly’s worktree, detached, so your folder and branches are never touched. Offline, the last known default branch is used.
- remote_
default - The remote’s default branch and its commit, asked from the remote; also records it as
origin/HEAD. - remote_
head - The default branch and its commit of the repository at
url, without a local clone. - remote_
url - remove
- Remove comindly’s worktree for
repo(your folder is untouched). - scan
- Git repositories under
dir, up todepthlevels down (not inside other repositories). - token_
user - The username a host expects with an access token.