avoid combining queued commands with different params
I don't think this affected git-annex currently, but if the same command was queued twice with different params, one set of params was thrown away, and the files going with those were run with the other set of params.
This commit is contained in:
		
					parent
					
						
							
								e7b0754171
							
						
					
				
			
			
				commit
				
					
						cd776ecb2e
					
				
			
		
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
					@ -55,12 +55,15 @@ instance Eq (InternalActionRunner m) where
 | 
				
			||||||
	InternalActionRunner s1 _ == InternalActionRunner s2 _ = s1 == s2
 | 
						InternalActionRunner s1 _ == InternalActionRunner s2 _ = s1 == s2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{- A key that can uniquely represent an action in a Map. -}
 | 
					{- A key that can uniquely represent an action in a Map. -}
 | 
				
			||||||
data ActionKey = UpdateIndexActionKey | CommandActionKey String | InternalActionKey String
 | 
					data ActionKey
 | 
				
			||||||
 | 
						= UpdateIndexActionKey
 | 
				
			||||||
 | 
						| CommandActionKey String [CommandParam]
 | 
				
			||||||
 | 
						| InternalActionKey String
 | 
				
			||||||
	deriving (Eq, Ord)
 | 
						deriving (Eq, Ord)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
actionKey :: Action m -> ActionKey
 | 
					actionKey :: Action m -> ActionKey
 | 
				
			||||||
actionKey (UpdateIndexAction _) = UpdateIndexActionKey
 | 
					actionKey (UpdateIndexAction _) = UpdateIndexActionKey
 | 
				
			||||||
actionKey CommandAction { getSubcommand = s } = CommandActionKey s
 | 
					actionKey CommandAction { getSubcommand = s, getParams = p } = CommandActionKey s p
 | 
				
			||||||
actionKey InternalAction { getRunner = InternalActionRunner s _ } = InternalActionKey s
 | 
					actionKey InternalAction { getRunner = InternalActionRunner s _ } = InternalActionKey s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{- A queue of actions to perform (in any order) on a git repository,
 | 
					{- A queue of actions to perform (in any order) on a git repository,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue