5045: rbt diff does not support spaces in any file name when using --exclude option

Leo

What version are you running?

  • RBTools 5.2.1 (Python 3.13.3)
  • RBCommons hosted by Beanbag
  • git version 2.47.1.windows.2

What steps will reproduce the problem?

  1. edit any file which contains space in its name (Core Data.data in our case)
  2. commit and push
  3. execute rbt diff --exclude=*.prefab.meta 46095707a28e9854ab589030569b993a98714d65..HEAD

NB: 46095707a28e9854ab589030569b993a98714d65..HEAD only contains the change described in step 1

What is the expected output? What do you see instead?

expected: something like:

diff --git a/template/run/game/Game Data/Core Data.data b/template/run/game/Game Data/Core Data.data
index b8eed41954c4e99ca4762c1873a0085ee7c1a46d..674b2ae2de8326c6bdaddd365004a2577664ff96 100644
--- a/template/run/game/Game Data/Core Data.data
+++ b/template/run/game/Game Data/Core Data.data
@@ -24,7 +24,7 @@
        </OnboardingAction>
        <VillageCenterQuest type="PlaCDataDelayedQuest">
                <AssetQuest value="129684be-4bd5-4891-a551-43579d076306"/>
-               <Delay value="3"/>
+               <Delay value="4"/>
        </VillageCenterQuest>
        <GameRuleList>
                <Item value="98cc1c33-0b64-440f-95d4-f374a71e7a9c"/>
@@ -57,7 +57,6 @@
        <MiniatureLightingEnvMap value="d74a691c-2aeb-404d-86ca-50501527f04c"/>
        <MiniatureScene value="d6197b40-08eb-46fd-9fdc-fdbce9b975e7"/>
        <DefaultNotificationData value="cd836447-f488-4ce2-ba79-d8a8796c88d5"/>
-       <WallConfigList/>
        <AchievementDisabledModsNotification value="47f62709-0298-41c3-927f-966c3a395cd6"/>
        <AchievementDisabledOldSavegameNotification value="c459e3df-5a33-4d27-8f9e-799552d5eb46"/>
        <AssetBuildingCompleteNotification value="b39d00e5-5cbe-4247-94a1-09e797140624"/>

instead:

$ rbt diff  --exclude=*.prefab.meta 46095707a28e9854ab589030569b993a98714d65..HEAD
ERROR: Could not get diff for all files (git-diff failed for "Data.data"). Refusing to return a partial diff.

What operating system are you using?

Microsoft Windows 11 Pro 10.0.22631 Build 22631

Attach the debug out from the command.

$ rbt diff --debug --exclude=*.prefab.meta 46095707a28e9854ab589030569b993a98714d65..HEAD
>>> RBTools 5.2.1
>>> Python 3.13.3 (tags/v3.13.3:6280bb5, Apr  8 2025, 14:47:33) [MSC v.1943 64 bit (AMD64)]
>>> Running on Windows-11-10.0.22631-SP0
>>> Home = C:\Users\LéoCarnaut-Delord
>>> Current directory = C:\Projects\XXX
>>> Command line: rbt diff --debug --exclude=*.prefab.meta 46095707a28e9854ab589030569b993a98714d65..HEAD
>>> [scan] Checking for available SCMs for C:\Projects\XXX...
>>> [scan] Only considering the following types of repositories: git
>>> [scan] Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config --get core.bare
>>> Running: git rev-parse --show-toplevel
>>> [scan] SCM scan complete. Found git (C:\Projects\XXX)
>>> [scan] Verifying repository information...
>>> Running: git rev-parse --git-dir
>>> Running: git config --get core.bare
>>> Running: git rev-parse --show-toplevel
>>> Running: git symbolic-ref -q HEAD
>>> Running: git show-ref --verify refs/remotes/p4/master
>>> Command errored with rc=128: git show-ref --verify refs/remotes/p4/master
>>> Command stdout=b''
>>> Command stderr=b"fatal: 'refs/remotes/p4/master' - not a valid ref\n"
>>> Running: git config --get remote.origin.url
>>> [scan] Successfully found repository information: <RepositoryInfo(path='https://username@bitbucket.org/organization/repository.git', base_path='', local_path='C:\\Projects\\foundation-branch')>
>>> Making HTTP GET request to https://rbcommons.com/s/organization/api/
>>> Cached response for HTTP GET https://rbcommons.com/s/organization/api/ expired and was not modified
>>> Making HTTP GET request to https://rbcommons.com/s/organization/api/repositories/?name=XXX&only-fields=id%2Cname%2Cmirror_path%2Cpath&only-links=info%2Cdiff_file_attachments&tool=git%2Cperforce%2Csubversion%2Ctfs_git
>>> Cached response for HTTP GET https://rbcommons.com/s/organization/api/repositories/?name=XXX&only-fields=id%2Cname%2Cmirror_path%2Cpath&only-links=info%2Cdiff_file_attachments&tool=git%2Cperforce%2Csubversion%2Ctfs_git expired and was not modified
>>> Making HTTP GET request to https://rbcommons.com/s/organization/api/repositories/2745/info/
>>> Got API Error 209 (HTTP code 501): The specified repository is not able to perform this action.
>>> Error data: {'err': {'code': 209, 'msg': 'The specified repository is not able to perform this action.', 'type': 'repository-request-not-supported'}, 'stat': 'fail'}
>>> Running: git rev-parse 46095707a28e9854ab589030569b993a98714d65..HEAD
>>> Running: git branch --remotes
>>> Running: git rev-list 46095707a28e9854ab589030569b993a98714d65 --not --remotes=origin
>>> Running: git version
>>> Running: git -c core.quotepath=false -c diff.noprefix=false diff-tree --no-color --full-index --ignore-submodules --find-renames --no-ext-diff -r 46095707a28e9854ab589030569b993a98714d65..4e7a9bc6eea70b5c0802887af6dbff1d80c3ab88
>>> Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules --find-renames --no-ext-diff 46095707a28e9854ab589030569b993a98714d65..4e7a9bc6eea70b5c0802887af6dbff1d80c3ab88 -- Data.data
ERROR: Could not get diff for all files (git-diff failed for "Data.data"). Refusing to return a partial diff.

Please provide any additional information below.