Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit ca32571

Browse files
authored
Merge pull request #60 from github/support-head-in-git-cli
Support --sha="HEAD" in `semantic parse --symbols --gitdir`.
2 parents afa4511 + 0501336 commit ca32571

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Semantic/CLI.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ graphCommand = command "graph" (info graphArgumentsParser (progDesc "Compute a g
166166

167167
shaReader :: ReadM Git.OID
168168
shaReader = eitherReader parseSha
169-
where parseSha arg = if length arg == 40
169+
where parseSha arg = if length arg == 40 || arg == "HEAD"
170170
then Right (Git.OID (T.pack arg))
171171
else Left (arg <> " is not a valid sha1")
172172

0 commit comments

Comments
 (0)