Sped up git-annex init in a clone of an existing repository

Seems that hasOrigin was never finding origin's git-annex branch, so a new
one got created each time. And so then it later needed to merge the two
branches, which is expensive.

Added --no-track to git branch to avoid it displaying a message about
setting up tracking branches. Of course there's no reason to make the
git-annex branch a tracking branch since git-annex auto-merges it.
This commit is contained in:
Joey Hess 2021-03-23 15:22:51 -04:00
parent 798f685077
commit 5d78cd9d08
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 19 additions and 3 deletions

View file

@ -84,7 +84,8 @@ dateRef r (RefDate d) = Ref $ fromRef' r <> "@" <> encodeBS' d
fileFromRef :: Ref -> RawFilePath -> Ref
fileFromRef r f = let (Ref fr) = fileRef f in Ref (fromRef' r <> fr)
{- Checks if a ref exists. -}
{- Checks if a ref exists. Note that it must be fully qualified,
- eg refs/heads/master rather than master. -}
exists :: Ref -> Repo -> IO Bool
exists ref = runBool
[ Param "show-ref"