public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/microsoft/heads/main)] This fix fixes the scenario when we try to make a Git commit even though there are no changes in the
@ 2021-10-12 23:39 Eugene Rozenfeld
  0 siblings, 0 replies; only message in thread
From: Eugene Rozenfeld @ 2021-10-12 23:39 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:5a97b7f4345a09fcf85af6e742ffb33cf286a358

commit 5a97b7f4345a09fcf85af6e742ffb33cf286a358
Author: Victor Tong <vitong@microsoft.com>
Date:   Mon Oct 11 17:40:49 2021 -0700

    This fix fixes the scenario when we try to make a Git commit even though there are no changes in the .github directory. Instead of running git add .github/ and git commit we first check to see if there are changes in the .github directory
    
    Test run: https://github.com/microsoft/gcc/pull/64/checks?check_run_id=3867647546

Diff:
---
 .github/workflows/update-main.yaml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/update-main.yaml b/.github/workflows/update-main.yaml
index ca10989f84e..7ae58b9a564 100644
--- a/.github/workflows/update-main.yaml
+++ b/.github/workflows/update-main.yaml
@@ -272,8 +272,11 @@ jobs:
       - name: Merge master SHA and push to our GitHub repo to start run
         run: |
           git checkout -b ${newBranchName}
-          git add .github/*
-          git commit -m "Bring latest scripts from ${BRANCH_REF}"
+          git diff --exit-code --quiet .github/ > /dev/null 2>&1
+          if test $? != 0; then
+            git add .github/*
+            git commit -m "Bring latest scripts from ${BRANCH_REF}"
+          fi
           git fetch gcc master
           git branch -a
           git merge ${masterSHA}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-12 23:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 23:39 [gcc(refs/vendors/microsoft/heads/main)] This fix fixes the scenario when we try to make a Git commit even though there are no changes in the Eugene Rozenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).