You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by li...@apache.org on 2022/12/29 04:43:47 UTC
[incubator-devlake] branch main updated: fix(gitex): fix bugs (#4061)
This is an automated email from the ASF dual-hosted git repository.
likyh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 5a1965204 fix(gitex): fix bugs (#4061)
5a1965204 is described below
commit 5a19652047efb18e494e90dde8f8703cf61eddea
Author: Warren Chen <yi...@merico.dev>
AuthorDate: Thu Dec 29 12:43:43 2022 +0800
fix(gitex): fix bugs (#4061)
---
plugins/gitextractor/main.go | 3 +--
plugins/gitextractor/store/csv.go | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/plugins/gitextractor/main.go b/plugins/gitextractor/main.go
index 65408d85f..d5c94feab 100644
--- a/plugins/gitextractor/main.go
+++ b/plugins/gitextractor/main.go
@@ -69,9 +69,8 @@ func main() {
}
} else if *dbUrl != "" {
cfg.Set("DB_URL", *dbUrl)
- } else {
- panic("either specify `-output` or `-db` argument as destination")
}
+ // If we didn't specify output or dburl, we will use db by default
if storage == nil {
storage = store.NewDatabase(basicRes, *url)
}
diff --git a/plugins/gitextractor/store/csv.go b/plugins/gitextractor/store/csv.go
index bafe2fc41..3e4ab988b 100644
--- a/plugins/gitextractor/store/csv.go
+++ b/plugins/gitextractor/store/csv.go
@@ -158,7 +158,7 @@ func (c *CsvStore) CommitLineChange(commitLineChange *code.CommitLineChange) err
}
func (c *CsvStore) RepoSnapshot(ss *code.RepoSnapshot) errors.Error {
- return c.commitLineChangeWriter.Write(ss)
+ return c.snapshotWriter.Write(ss)
}
func (c *CsvStore) CommitParents(pp []*code.CommitParent) errors.Error {