From 4e59a647a1ffd87b79ad953936d20de495505bd0 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 12 Oct 2022 19:44:36 +0200 Subject: [PATCH] fix: only parse commit messages during git node backport analysis (#651) Previously we parse the entire commit, including the diff, which can result in ENOBUFS errors. Adding `-s` option to the `git show` command would eliminate the commit body in the output, which we don't need, so the error can be less likely to happen during commit message analysis. --- lib/backport_session.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/backport_session.js b/lib/backport_session.js index f45a86f8..849f787c 100644 --- a/lib/backport_session.js +++ b/lib/backport_session.js @@ -39,7 +39,7 @@ export default class BackportSession extends Session { getCommitMessage(rev) { return runSync('git', - ['show', '--format=%B', rev] + ['show', '--format=%B', '-s', rev] ).trim(); }