comments
This commit is contained in:
		
					parent
					
						
							
								e7f75b079d
							
						
					
				
			
			
				commit
				
					
						e8ca01cbc0
					
				
			
		
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -39,6 +39,8 @@ seek :: SmudgeOptions -> CommandSeek
 | 
				
			||||||
seek o = commandAction $
 | 
					seek o = commandAction $
 | 
				
			||||||
	(if cleanOption o then clean else smudge) (smudgeFile o)
 | 
						(if cleanOption o then clean else smudge) (smudgeFile o)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Smudge filter is fed git file content, and if it's a pointer, should
 | 
				
			||||||
 | 
					-- emit the annex object content.
 | 
				
			||||||
smudge :: FilePath -> CommandStart
 | 
					smudge :: FilePath -> CommandStart
 | 
				
			||||||
smudge _file = do
 | 
					smudge _file = do
 | 
				
			||||||
	liftIO $ fileEncoding stdin
 | 
						liftIO $ fileEncoding stdin
 | 
				
			||||||
| 
						 | 
					@ -53,6 +55,8 @@ smudge _file = do
 | 
				
			||||||
				=<< catchMaybeIO (B.readFile content)
 | 
									=<< catchMaybeIO (B.readFile content)
 | 
				
			||||||
	stop
 | 
						stop
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Clean filter decides if a file should be stored in the annex, and
 | 
				
			||||||
 | 
					-- outputs a pointer to its injested content.
 | 
				
			||||||
clean :: FilePath -> CommandStart
 | 
					clean :: FilePath -> CommandStart
 | 
				
			||||||
clean file = do
 | 
					clean file = do
 | 
				
			||||||
	ifM (shouldAnnex file)
 | 
						ifM (shouldAnnex file)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue