Skip to content

Skip commit if there is nothing to do. Otherwise git commit errors out the job

Fedja Beader requested to merge specing/classic-serverdata:sync_skip into master

The problem: https://git.themanaworld.org/legacy/serverdata/-/pipelines/20757

My guess is that git commit returns error if there's nothing to commit

- git config user.name "Numa"
- git commit -a -m "Sync with Legacy repo" --author="Numa <numa@themanaworld.org>"
- git push

You can see that the push isn't executed, so commit errored out. Now, I don't know if "nothing to commit is normal or not", but if it is, then the commit&push failures can be ignored. If you decide to ignore, then git status --porcelain will have empty output if there's no changes and commit & push can be skipped

See https://git.themanaworld.org/specing/classic-serverdata/-/pipelines/20758 for pipeline test runs on my master (jobs only run on master branch).

Note: I've also removed the allow_fail tag. Since these two jobs are sequential, the first one failing will skip the second. This may not be what you want, in which case I'll put the allow_fail back in.

Merge request reports