diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-06 14:26:15 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-06 14:26:15 -0400 |
commit | 91db54076964979b6c50bd7efd0b895c4d416978 (patch) | |
tree | 7ba67f302dac7ef03b2cef906ab08bb88c0f8967 /Git/UnionMerge.hs | |
parent | 993e6459a38817a9062aafae7552a668c2db7a31 (diff) |
add support for staging other types of blobs, like symlinks, into the index
Also added a utility TopFilePath type, which could stand to be used more
widely.
Diffstat (limited to 'Git/UnionMerge.hs')
-rw-r--r-- | Git/UnionMerge.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Git/UnionMerge.hs b/Git/UnionMerge.hs index 822e6abbf..f65b59c53 100644 --- a/Git/UnionMerge.hs +++ b/Git/UnionMerge.hs @@ -22,6 +22,7 @@ import Git.Command import Git.UpdateIndex import Git.HashObject import Git.Types +import Git.FilePath {- Performs a union merge between two branches, staging it in the index. - Any previously staged changes in the index will be lost. @@ -79,7 +80,7 @@ mergeFile info file h repo = case filter (/= nullSha) [Ref asha, Ref bsha] of [_colonmode, _bmode, asha, bsha, _status] = words info getcontents s = map L.unpack . L.lines . L.decodeUtf8 <$> catObject h s - use sha = return $ Just $ update_index_line sha file + use sha = return $ Just $ update_index_line sha FileBlob $ asTopFilePath file {- Calculates a union merge between a list of refs, with contents. - |