This PR fixes #24. It ensures that git-xargs always logs stdout / stderr from the script, even if the script exits with an error. I've added a test for this too.
Other tweaks in this PR:
Refactor executeCommand to only run the command. This makes it easier to test this method.
Move the git add logic that used to be in executeCommand into commitLocalChanges. This is the more logical home for it.
If the work tree reports that the status is clean, don't try to commit anything in commitLocalChanges. Previously, the work tree status was only checked in executeCommand, and commitLocalChanges would try to commit whether or not the status was clean, which was probably a no op, but doesn't seem right.
This PR fixes #24. It ensures that
git-xargs
always logsstdout
/stderr
from the script, even if the script exits with an error. I've added a test for this too.Other tweaks in this PR:
executeCommand
to only run the command. This makes it easier to test this method.git add
logic that used to be inexecuteCommand
intocommitLocalChanges
. This is the more logical home for it.commitLocalChanges
. Previously, the work tree status was only checked inexecuteCommand
, andcommitLocalChanges
would try to commit whether or not the status was clean, which was probably a no op, but doesn't seem right.