Unity: After ~400 changes nothing is listed in "changes" tab

Edit by @StanleyGoldman


Issue Explanation

Steps to Reproduce

  1. Open new Unity project
  2. Initialize git via the GitHub for Unity
  3. Open a git bash window and generate a lot of changed files using the following command:
    for i in {1..800}; do touch test-file-$i.txt; done
    

Expected Behavior

GitHub for Unity should display all files in the changes view

Actual Behavior

GitHub for Unity should displays an empty changes view

Explanation

The issue is largely around our implementation of ProcessWrapper. We declare an AutoResetEvent called gotOutput that is used to help understand if output is still being returned, but it’s been proven that if you can generate enough output, this event does not wait enough time. Increasing the timeout can allow some more input but the ProcessWrapper will also needlessly wait for a lot of commands.

https://github.com/github-for-unity/Unity/blob/e2f8c6221b63a2983bb72950c6e83fa729d5dd98/src/GitHub.Api/Tasks/ProcessTask.cs#L116-L121

https://github.com/github-for-unity/Unity/blob/e2f8c6221b63a2983bb72950c6e83fa729d5dd98/src/GitHub.Api/Tasks/ProcessTask.cs#L150-L157


Original Issue Report

Description

No files ever show in the repository on github, or in the “changes” tab.

Steps to Reproduce

  1. Open existing Unity project
  2. Initialize git via the github window in Unity
  3. All that appears in the github project is: .gitattributes and .gitignore in the project root, as Assets/ folder and in the Assets/ folder a .gitignore file.
  4. Create new sprites (.png) in Assets/ within Unity Editor
  5. NO changes are displayed in the changes tab.

Expected behavior: [What you expect to happen] Expect all files to have been pushed up to github on initial commit. Expect when adding a new file, it to show up in changes tab.

Actual behavior: [What actually happens] No pre-existing unity project files (e.g. *.png, *.asset, *.prefab *.cs) have been copied to github. Nothing useful in the log file (with trace logging enabled).

Reproduces how often: [What percentage of the time does it reproduce?] 100%

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

180717-22:00:45.997 INFO [ 1] <Global> Trace Logging Enabled 180717-22:00:55.661 TRACE [ 1] <GitStatusCache> needsInvalidation isInitialized:True timedOut:True 180717-22:00:55.666 TRACE [ 1] <GitLocksCache> needsInvalidation isInitialized:True timedOut:True 180717-22:00:55.666 TRACE [59] <ProcessWrapper> Running ‘C:\Users\Andy\AppData\Local\GitHubUnity\git\cmd\git.exe -c i18n.logoutputencoding=utf8 -c core.quotepath=false status -b -u --porcelain’ 180717-22:00:55.671 TRACE [122] <ProcessWrapper> Running ‘C:\Users\Andy\AppData\Local\GitHubUnity\git-lfs\git-lfs.exe locks --json’ 180717-22:01:38.830 TRACE [59] <ProcessWrapper> Running ‘C:\Users\Andy\AppData\Local\GitHubUnity\git\cmd\git.exe -c i18n.logoutputencoding=utf8 -c core.quotepath=false status -b -u --porcelain’ 180717-22:01:39.293 TRACE [130] <ProcessWrapper> Running ‘C:\Users\Andy\AppData\Local\GitHubUnity\git\cmd\git.exe -c i18n.logoutputencoding=utf8 -c core.quotepath=false status -b -u --porcelain’ 180717-22:01:56.804 TRACE [ 1] <GitLocksCache> needsInvalidation isInitialized:True timedOut:True 180717-22:01:56.810 TRACE [133] <ProcessWrapper> Running ‘C:\Users\Andy\AppData\Local\GitHubUnity\git-lfs\git-lfs.exe locks --json’ 180717-22:02:00.516 TRACE [59] <ProcessWrapper> Running ‘C:\Users\Andy\AppData\Local\GitHubUnity\git\cmd\git.exe -c i18n.logoutputencoding=utf8 -c core.quotepath=false status -b -u --porcelain’ 180717-22:02:00.517 TRACE [136] <ProcessWrapper> Running ‘C:\Users\Andy\AppData\Local\GitHubUnity\git\cmd\git.exe rev-parse --short HEAD’ 180717-22:02:00.517 TRACE [137] <ProcessWrapper> Running ‘C:\Users\Andy\AppData\Local\GitHubUnity\git-lfs\git-lfs.exe locks --json’

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (10 by maintainers)

Most upvoted comments

I am finally able to reproduce this

Also have this problem. Initializing Github for Unity on an old project. Nothing shows up in changes tab. In history it automatically makes an initial commit, but only the .gitignore, .gitattributes… Here’s the log.

Adding the repo to Github Desktop shows all the changed files just fine (over 2000).

How you can try to reproduce it:

  1. Make a project without git for unity.
  2. Load in some Assets
  3. Copy this Project
  4. Open the copy Project
  5. Import Git For Unity
  6. Set it up
  7. Nothing of the Assets will be marked as a new File so there is no way to add the Project to git via the UI

If this isnt reproduce able it might be possible that it is also an result from using before the Unity built in Collab Feature or the Size of the Project.

At the end the fix for this is very simple. git add -A git commit git push

After this is done future changes will be tracked in the ui.

In my case the git add -A took over 2 hours maybe this is also a reason why it wasnt done by the ui itself( might would have killed unity)