From 77651b1257813252cb7cd26599621e235791866f Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 12 Oct 2022 18:42:20 +0200 Subject: [PATCH] fix: only parse commit messages during git node backport analysis 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(); }