commit-amt
Version:
AI-powered conventional commit message generator using Together.ai, smart CLI for easy, consistent git commits
17 lines (15 loc) • 366 B
JavaScript
const { execGitCommand } = require('./gitCommands');
/**
* Get the git diff for staged changes
* @returns {Promise<string>} The git diff
*/
async function processGitDiff() {
try {
return await execGitCommand('diff --cached');
} catch (error) {
throw new Error(`Failed to get git diff: ${error.message}`);
}
}
module.exports = {
processGitDiff
};