@@ -712,8 +712,8 @@ getThunkPtr' checkClean thunkDir upstream = do
712 <|> Map.lookup currentHead localHeads
712 <|> Map.lookup currentHead localHeads
713 let src = uriToThunkSource remoteUri mCurrentUpstreamBranch
713 let src = uriToThunkSource remoteUri mCurrentUpstreamBranch
714 rev <- case src of
714 rev <- case src of
715− ThunkSource_GitHub s -> githubThunkPtr s currentHead
715+ ThunkSource_GitHub s -> githubThunkRev s currentHead
716− ThunkSource_Git s -> gitThunkPtr s currentHead
716+ ThunkSource_Git s -> gitThunkRev s currentHead
717 pure $ ThunkPtr
717 pure $ ThunkPtr
718 { _thunkPtr_rev = rev
718 { _thunkPtr_rev = rev
719 , _thunkPtr_source = src
719 , _thunkPtr_source = src
@@ -730,16 +730,16 @@ getLatestRev os = do
730 ThunkSource_Git s -> s
730 ThunkSource_Git s -> s
731 (_, commit) <- gitGetCommitBranch (_gitSource_url gitS) (untagName <$> _gitSource_branch gitS)
731 (_, commit) <- gitGetCommitBranch (_gitSource_url gitS) (untagName <$> _gitSource_branch gitS)
732 case os of
732 case os of
733− ThunkSource_GitHub s -> githubThunkPtr s commit
733+ ThunkSource_GitHub s -> githubThunkRev s commit
734− ThunkSource_Git s -> gitThunkPtr s commit
734+ ThunkSource_Git s -> gitThunkRev s commit
736uriThunkPtr :: MonadObelisk m => URI -> Maybe Text -> m ThunkPtr
736uriThunkPtr :: MonadObelisk m => URI -> Maybe Text -> m ThunkPtr
737uriThunkPtr uri mbranch = do
737uriThunkPtr uri mbranch = do
738 (_, commit) <- gitGetCommitBranch uri mbranch
738 (_, commit) <- gitGetCommitBranch uri mbranch
739 let src = uriToThunkSource uri mbranch
739 let src = uriToThunkSource uri mbranch
740 rev <- case src of
740 rev <- case src of
741− ThunkSource_GitHub s -> githubThunkPtr s commit
741+ ThunkSource_GitHub s -> githubThunkRev s commit
742− ThunkSource_Git s -> gitThunkPtr s commit
742+ ThunkSource_Git s -> gitThunkRev s commit
743 pure $ ThunkPtr
743 pure $ ThunkPtr
744 { _thunkPtr_rev = rev
744 { _thunkPtr_rev = rev
745 , _thunkPtr_source = src
745 , _thunkPtr_source = src
@@ -776,13 +776,13 @@ uriToThunkSource u
778-- Funny signature indicates no effects depend on the optional branch name.
778-- Funny signature indicates no effects depend on the optional branch name.
779−githubThunkPtr
779+githubThunkRev
780 :: forall m
780 :: forall m
781 . MonadObelisk m
781 . MonadObelisk m
782 => GitHubSource
782 => GitHubSource
784 -> m ThunkRev
784 -> m ThunkRev
785−githubThunkPtr s commit = do
785+githubThunkRev s commit = do
786 owner <- forcePP $ _gitHubSource_owner s
786 owner <- forcePP $ _gitHubSource_owner s
787 repo <- forcePP $ _gitHubSource_repo s
787 repo <- forcePP $ _gitHubSource_repo s
788 revTarball <- mkPathPiece $ commit <> ".tar.gz"
788 revTarball <- mkPathPiece $ commit <> ".tar.gz"
@@ -809,12 +809,12 @@ githubThunkPtr s commit = do
809 forcePP :: Name entity -> m (RText 'PathPiece)
809 forcePP :: Name entity -> m (RText 'PathPiece)
810 forcePP = mkPathPiece . untagName
810 forcePP = mkPathPiece . untagName
812−gitThunkPtr
812+gitThunkRev
813 :: MonadObelisk m
813 :: MonadObelisk m
814 => GitSource
814 => GitSource
816 -> m ThunkRev
816 -> m ThunkRev
817−gitThunkPtr s commit = do
817+gitThunkRev s commit = do
818 let u = _gitSource_url s
818 let u = _gitSource_url s
819 protocols = ["https", "ssh", "git"]
819 protocols = ["https", "ssh", "git"]
820 Just scheme <- pure $ unRText <$> uriScheme u
820 Just scheme <- pure $ unRText <$> uriScheme u
@@ -828,13 +828,13 @@ gitThunkPtr s commit = do
828 , _thunkRev_nixSha256 = hash
828 , _thunkRev_nixSha256 = hash
831−-- | Given the URI to a git remote, and an optional branch name, return the
831+-- | Given the URI to a git remote, and an optional branch name, return the name
832−-- commit hash of the tip of that branch along with the name of the branch.
832+-- of the branch along with the hash of the commit at tip of that branch.
834-- If the branch name is passed in, it is returned exactly as-is. If it is not
834-- If the branch name is passed in, it is returned exactly as-is. If it is not
835-- passed it, the default branch of the repo is used instead.
835-- passed it, the default branch of the repo is used instead.
836gitGetCommitBranch
836gitGetCommitBranch
837− :: MonadObelisk m => URI -> Maybe Text -> m (Text, Text)
837+ :: MonadObelisk m => URI -> Maybe Text -> m (Text, CommitId)
838gitGetCommitBranch uri mbranch = withExitFailMessage ("Failure for git remote " <> uriMsg) $ do
838gitGetCommitBranch uri mbranch = withExitFailMessage ("Failure for git remote " <> uriMsg) $ do
839 bothMaps <- rethrowE =<< liftIO (gitLsRemote (show uri) (GitRef_Branch <$> mbranch))
839 bothMaps <- rethrowE =<< liftIO (gitLsRemote (show uri) (GitRef_Branch <$> mbranch))
840 branch <- case mbranch of
840 branch <- case mbranch of