diff options
-rw-r--r-- | src/Store/Store.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Store/Store.hs b/src/Store/Store.hs index 1f41d8a..d2c8a18 100644 --- a/src/Store/Store.hs +++ b/src/Store/Store.hs @@ -197,7 +197,9 @@ commit = do cid' <- G.commitOid <$> G.createCommit [cid] tid sig sig "auto-commit" (Just ref) - when (ref == "HEAD") $ reset cid' + cidHead <- G.resolveReference "HEAD" + cidRef <- G.resolveReference ref + when (cidRef == cidHead) $ reset cid' pure cid' modify $ \s -> s {cid = cid'} |