-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add computing by commits #66
Comments
azinit
added a commit
that referenced
this issue
Dec 5, 2020
azinit
added a commit
that referenced
this issue
Dec 5, 2020
azinit
added a commit
that referenced
this issue
Dec 5, 2020
Return back after #30 |
Муторно, попробовать завтра |
/**
* Get relevant commits in between
* @param {Commit} from Usually - commentCommit
* @param {Commit} to Usually - codeCommit
* @param {string} file File path
* @param {string} line Line index
* FIXME: refactor, simplify, dry
*/
function getRelevantCommitsDiff(from, to, file, line) {
const config = {
after: `${from.date.toISOString()}`,
before: `${to.date.toISOString()}`,
pretty: 'format:"%ad"',
};
// => git log --after=${} --before=${} --pretty=${}
const configSerialized = Object.entries(config)
.map(([key, value]) => `--${key}=${value}`)
.join(" ");
// просто добавляем line и file - попробовать в 0.1.0
const response = execSync(`git log -S'${line} ${configSerialized} -- ${file} | wc -l`);
return Number(response) - 1;
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related
Description
Add computing by commits in addition for validating by dates
Solution
Additional context
The text was updated successfully, but these errors were encountered: