Skip to content

Commit history - Git log (nodegit)#3579

Closed
Publicker wants to merge 7 commits intogitthermal:feat/nodegit/git-logfrom
Publicker:migrate-to-nodegit
Closed

Commit history - Git log (nodegit)#3579
Publicker wants to merge 7 commits intogitthermal:feat/nodegit/git-logfrom
Publicker:migrate-to-nodegit

Conversation

@Publicker
Copy link
Copy Markdown

Git log working with NodeGit!!!

mittalyashu and others added 5 commits July 30, 2019 16:42
* Change node_version to 10.16.0

* Define node & electron engines in package.json

* FIX: Add comma after node version engine

* Switch back to latest version of Node@10

* Split script command yarn and yarn build:window

* Update "postinstall" script command to install electron app deps

* Install electron app native deps

* Merge yarn && yarn postinstall && yarn build:linux command

* Test windows pipeline with npm

* Upgrade nodegit & electron-builder package

* Run pipeline in npm

* Run audit fix

* Run install && audit fix

* install & audit fix & postinstall & build:window

* Update build description

* Move yarn to npm

* Update echo command

* Remove electron from engines
@Publicker Publicker mentioned this pull request Oct 11, 2019
13 tasks
Comment thread src/renderer/pages/repository/history.vue Outdated
Comment thread src/renderer/git/log.js Outdated
Comment thread src/renderer/git/log.js Outdated
Comment thread src/renderer/git/log.js Outdated
@mittalyashu mittalyashu changed the base branch from migrate-to-nodegit to chore/add-nodegit October 15, 2019 17:51
Comment thread src/renderer/git/log.js
logs.push(objectCommit);
});
if (result !== 0) {
console.log("Error: " + result);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I don't know what to do if are any error. What is your suggestion?

Documentation of NodeGit about error
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well, we do need to build a separate notification section which includes to trigger notifications, alerts and more from anywhere.

But for now we can just log the error messages to console.

Comment thread src/renderer/git/log.js
import nodegit from "nodegit";

const log = async path => {
const log = async (path, count = 50) => {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I put it 50 items by default. I think that is a good idea having the parameter just in case.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Putting a hard-coded value 50 is not the best way to overcome this issue.

We need to think of better solution.

@mittalyashu
Copy link
Copy Markdown
Member

@Publicker Can you fix these conflicting files?

async gitLog() {
const logs = await gitLog(this.currentRepository.path);
this.$store.commit("history/updateLogs", {
logs: logs
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you remove the part where you are storing the history inside Vuex Store.

Instead of storing commits in vuex store, we're storing them inside local data property.

@mittalyashu
Copy link
Copy Markdown
Member

@Publicker There are few comments which require your attention.

@mittalyashu mittalyashu changed the base branch from chore/add-nodegit to feat/nodegit/git-log January 23, 2020 05:38
@gitthermal gitthermal deleted a comment Jan 23, 2020
@gitthermal gitthermal deleted a comment Jan 23, 2020
@Sebclem Sebclem mentioned this pull request Jun 4, 2021
@gitthermal gitthermal deleted a comment Jun 5, 2021
@gitthermal gitthermal deleted a comment Jun 5, 2021
@Publicker Publicker closed this Dec 7, 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