mirror of
https://github.com/github/semantic.git
synced 2025-01-03 13:02:37 +03:00
Add emptySourceBlob and sourceBlob functions to Source
This commit is contained in:
parent
46b1a7385e
commit
5aac311a88
@ -30,6 +30,11 @@ modeToDigits (SymlinkBlob mode) = showOct mode ""
|
||||
defaultPlainBlob :: SourceKind
|
||||
defaultPlainBlob = PlainBlob 0o100644
|
||||
|
||||
emptySourceBlob :: FilePath -> SourceBlob
|
||||
emptySourceBlob filepath = SourceBlob (Source.fromList "") Source.nullOid filepath Nothing
|
||||
|
||||
sourceBlob :: Source Char -> FilePath -> SourceBlob
|
||||
sourceBlob source filepath = SourceBlob source Source.nullOid filepath (Just defaultPlainBlob)
|
||||
|
||||
-- | Map blobs with Nothing blobKind to empty blobs.
|
||||
idOrEmptySourceBlob :: SourceBlob -> SourceBlob
|
||||
|
Loading…
Reference in New Issue
Block a user