rename BlobType and add submodule to it
This was badly named, it's a not a blob necessarily, but anything that a tree can refer to. Also removed the Show instance which was used for serialization to git format, instead use fmtTreeItemType. This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
		
					parent
					
						
							
								a732004616
							
						
					
				
			
			
				commit
				
					
						0b7f6d24d3
					
				
			
		
					 12 changed files with 80 additions and 69 deletions
				
			
		| 
						 | 
				
			
			@ -85,8 +85,8 @@ fixupReq req@(Req {}) =
 | 
			
		|||
	check rOldFile rOldMode (\r f -> r { rOldFile = f }) req
 | 
			
		||||
		>>= check rNewFile rNewMode (\r f -> r { rNewFile = f })
 | 
			
		||||
  where
 | 
			
		||||
	check getfile getmode setfile r = case readBlobType (getmode r) of
 | 
			
		||||
		Just SymlinkBlob -> do
 | 
			
		||||
	check getfile getmode setfile r = case readTreeItemType (getmode r) of
 | 
			
		||||
		Just TreeSymlink -> do
 | 
			
		||||
			v <- getAnnexLinkTarget' (getfile r) False
 | 
			
		||||
			case fileKey . takeFileName =<< v of
 | 
			
		||||
				Nothing -> return r
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue