Skip to content
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

[Action] Get git diff size by cli tool #586

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gichan-jang
Copy link
Member

Get git diff size by cli tool.

Get git diff size by cli tool.

Signed-off-by: Gichan Jang <[email protected]>
Copy link
Contributor

@songgot songgot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great. 👍

git diff > git_diff.txt
DIFF_SIZE=$(stat -c%s git_diff.txt)
if [[ $DIFF_SIZE -ne 0 ]]; then
if git diff --shortstat | grep -q changed; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if git diff --shortstat | grep -q changed; then
git diff -s --exit-code
if [ $? -ne 0]; then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants