Skip to content

Commit b27fde2

Browse files
committed
fixed "--from" argument
1 parent e53f2b0 commit b27fde2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

git.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func getCommits(limit int, after string, before string) ([]entry, error) {
1414
"--pretty=\"%h %ct\"",
1515
}
1616
if after != "" {
17-
args = append(args, fmt.Sprintf("--from='%s'", after))
17+
args = append(args, fmt.Sprintf("--after='%s'", after))
1818
}
1919
if before != "" {
2020
args = append(args, fmt.Sprintf("--before='%s'", before))

main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ func main() {
4343
err = DumpHistory(directory, command, out, limit, after, before)
4444
checkError(err)
4545

46-
fmt.Printf("\nWrote file %s\n", outputFile)
46+
if !stdout {
47+
fmt.Printf("\nWrote file %s\n", outputFile)
48+
}
4749
}
4850

4951
func checkError(err error) {
@@ -57,6 +59,9 @@ func evaluate(commit entry, command string) (entry, error) {
5759
if _, err := execute("git", "reset", "--hard"); err != nil {
5860
return commit, err
5961
}
62+
if _, err := execute("git", "clean", "-d", "-f"); err != nil {
63+
return commit, err
64+
}
6065
if _, err := execute("git", "checkout", commit.commit); err != nil {
6166
return commit, err
6267
}

0 commit comments

Comments
 (0)