1364: git submodules don't work
- Fixed
- Review Board
anu****@gmai***** (Google Code) (Is this you? Claim this profile.) | |
Feb. 17, 2014 |
What version are you running? 1.04 What's the URL of the page containing the problem? r/new/ What steps will reproduce the problem? 1. create a diff using git in a repository w/ submodules. update a submodule, so that the pointer change is included in the diff. 2. upload the diff 3. breakage What is the expected output? What do you see instead? the diff should be accepted. instead it complains about files not being located in the repository (the submodule pointer).
Just saw that this had some action last month; didn't see it in my mailbox, not sure of google emailed me or not. To answer your question, I'm not sure what you're asking. My work flow w/ reviewboard is to just do: git diff {options} > changesToReview.diff and then upload it. The options I specify are usually what I'm diffing against; two hashes, or another branch, etc. When you make a diff when a submodule has been updated, the diff includes the change to the submodule's hash. Uploading such a diff with that data breaks review board. It complains that it doesn't know anything about that hash, which is an external value.
Hitting up with same problem. I used post-review, the problem is in the diff-viewer when it tries to apply the patch to the submodule, which isn't a file.
I have the same problem. post-review says: Error uploading diff: One or more fields had errors (HTTP 200, API Error 105) Your review request still exists, but the diff is not attached. Uploading by hand says: The file 'my/submodule' (re2ca3e8) could not be found in the repository A git submodule is not a file in the repository, and should not be checked in that manner... The diff says something like: diff --git a/include/mulang b/include/mulang index e2ca3e8..563a8ff 160000 --- a/my/submodule +++ b/my/submodule @@ -1 +1 @@ -Subproject commit e2ca3e8fa26423d688ecc2df79724ebc7a62d365 +Subproject commit 563a8ff762d19b6a2f11c22bfee2511408d4ac1d (I'm using reviewboard 1.5.)
Can this be reopened with the info added, or do we have to open a new issue? I still bump into this problem each time a submodule version is updated in our git repo...
--submodule=log should be used, OR better, --- a/my/submodule +++ b/my/submodule @@ -1 +1 @@ -Subproject commit e2ca3e8fa26423d688ecc2df79724ebc7a62d365 +Subproject commit 563a8ff762d19b6a2f11c22bfee2511408d4ac1d Should be parsed, removed from the original diff, 'git diff <sha1>..<sha2>' should be used and combined in the previous diff. Using --submodule=log is just a simple hack that is likely to be a one liner (or a two liner) in how git diff/git show is called
Or alternativeley use --ignore-submodules…
Got bitten by that bug. Patching rbtools/postreview.py to add --ignore-submodules fixed it.
I submitted https://github.com/reviewboard/rbtools/pull/9 6 months ago, which fixes this problem... would be nice if someone accepted it.