Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
feat(git): enable logs for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Apr 11, 2022
1 parent 8da6b12 commit 0eed4ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -18,6 +18,8 @@ import java.io.File
import java.nio.charset.StandardCharsets
import chapi.domain.core.CodeDataStruct
import kotlinx.serialization.Serializable
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import org.eclipse.jgit.diff.DiffEntry
import org.eclipse.jgit.diff.DiffFormatter
import org.eclipse.jgit.diff.RawTextComparator
Expand Down Expand Up @@ -76,6 +78,7 @@ class GitDiffer(val path: String, val branch: String) {

// 1. create based ast model from since revision commit
this.baseLineDataTree = createBaselineAstTree(repository, since)
File("diff-baseline.json").writeText(Json.encodeToString(baseLineDataTree))

// 2. calculate changed files to utils file
for (commit in git.log().addRange(since, until).call()) {
Expand Down
Expand Up @@ -53,7 +53,7 @@ class Runner : CliktCommand() {
val repository = DiffRepository(systemId, language, since, until, tableName)

// logs for debug
File("changes.json").writeText(Json.encodeToString(changedCalls))
File("diff-changes.json").writeText(Json.encodeToString(changedCalls))

repository.saveDiff(changedCalls)
repository.close()
Expand Down

0 comments on commit 0eed4ea

Please sign in to comment.