ironmansoftware / universal-automation

Universal Automation is the PowerShell-first automation platform.
https://ironmansoftware.com/universal-automation/
MIT License
24 stars 4 forks source link

Git: Failed to commit #161

Closed claudiospizzi closed 4 years ago

claudiospizzi commented 4 years ago

Describe the Issue

After changing a script in the UI, in this case changed the properties of the script. So a new ".ua" file was created, the following exception was thron and the commit never got pushed to the remote:

2020-03-24 09:10:07.422 +01:00 [WRN] Failed to commit. LibGit2Sharp.EmptyCommitException: No changes; nothing to commit.
   at LibGit2Sharp.Repository.Commit(String message, Signature author, Signature committer, CommitOptions options)
   at UniversalAutomation.Git.GitService.Commit(String message, String author)

The exception message "nothing to commit" does not make sense.

To Reproduce

Steps to reproduce the behavior: (Example)

  1. Setup UA using a Git Repo
  2. Changing a script in the UI
  3. Check the log C:\ProgramData\UniversalAutomation\logs

Version Information

claudiospizzi commented 4 years ago

Current status of the git repo:

PS C:\Path\To\Git\Repo> git status
On branch master
Your branch is ahead of 'origin/master' by 3 commits.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

So the changes were committed but not pushed to the remote.

adamdriscoll commented 4 years ago

This has been resolved in the most recent build. We were not pushing after committing. The next git sync would do the push but it could be awhile before that happens. Now it happens after the commit.