aboutsummaryrefslogtreecommitdiffstats
path: root/src/Store
diff options
context:
space:
mode:
Diffstat (limited to 'src/Store')
-rw-r--r--src/Store/Store.hs4
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'}