Skip to content

Add a snapshot structure and add commitLineChange table#3166

Merged
klesh merged 12 commits intoapache:mainfrom
xgdyp:commit-snapshot
Sep 26, 2022
Merged

Add a snapshot structure and add commitLineChange table#3166
klesh merged 12 commits intoapache:mainfrom
xgdyp:commit-snapshot

Conversation

@xgdyp
Copy link
Contributor

@xgdyp xgdyp commented Sep 22, 2022

Summary

In This PR,I update a snapshot structure to store each commit code-snapshot.Using this structure,we can get some history message such as who is the previous author in each deleted line,how long do these deleted lines exist and so on.

Does this close any open issues?

related to #1771

Screenshots

image
This structure is similar to git-import tool in clickhouse repo

Other Information

Any other information that is important to this PR.

@klesh
Copy link
Contributor

klesh commented Sep 23, 2022

Hi, @xgdyp, thank you very much for the contribution.
Would you mind fixing the golangci-lint error reported from the Github Action?

@xgdyp
Copy link
Contributor Author

xgdyp commented Sep 23, 2022

OK, now I'm fixing it.

Copy link
Contributor

@klesh klesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job. please clean up the code:

  1. add godoc to all exported functions (those named in CamelCase convention)
  2. remove unnecessary empty lines
  3. add an empty line between functions
  4. fix the golangci-lint errors

}

func (c *CsvStore) CommitLineChange(commitLineChange *code.CommitLineChange) errors.Error {
return c.commitFileWriter.Write(commitLineChange)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect, different entities should be written to separate files.
I also notice the CommitFileComponents is writing to the commit_files.csv, please fix that as well.

@xgdyp
Copy link
Contributor Author

xgdyp commented Sep 26, 2022

hi @klesh , I've done these work. Please review it again,thanks

Copy link
Contributor

@klesh klesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@klesh klesh merged commit b197fcc into apache:main Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants