Skip to content
Snippets Groups Projects
Commit 415dc9ea authored by Nick Thomas's avatar Nick Thomas
Browse files

Fix listing changed files

parent 8fe01d9b
No related branches found
No related tags found
1 merge request!1Initial implementation of an elasticsearch indexer in Go
Loading
Loading
@@ -103,17 +103,23 @@ func (r *Repo) EachFileChange(ins, mod, del FileFunc) error {
switch change.Action {
case difftree.Insert:
toF.Name = change.To.Name
return ins(toF)
err = ins(toF)
case difftree.Modify:
toF.Name = change.To.Name
return mod(toF)
err = mod(toF)
case difftree.Delete:
fromF.Name = change.From.Name
return del(fromF)
err = del(fromF)
default:
err = fmt.Errorf("Unrecognised change calculating diff: %+v", change)
}
if err != nil {
return err
}
}
 
return nil // TODO: should this be an "unrecognised action" error?
return nil
}
 
// EachCommit runs `f` for each commit within `fromSHA`...`toSHA` (i.e., the
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment