What version are you running? postreview 0.8. What steps will reproduce the problem? 1. git config diff.external /bin/does-not-exist 2. postreview.py What is the expected output? What do you see instead? Expect that a normal diff should be produced and uploaded. However, $ postreview.py -d --guess-description --guess-summary >>> svn info >>> git rev-parse --git-dir >>> git symbolic-ref -q HEAD >>> git svn info >>> git svn --version >>> git config --get svn-remote.svn.url >>> git config --get branch.for-review.merge >>> git config --get branch.for-review.remote >>> git config remote.origin.url >>> repository info: Path: git://internal/test.git, Base path: , Supports changesets: False >>> git config --get reviewboard.url >>> git merge-base origin/master refs/heads/for-review >>> git diff --no-color --full-index b79bcb4c0c838df4406c01c59370977a53da5425..refs/heads/for-review Failed to execute command: ['git', 'diff', '--no-color', '--full-index', 'b79bcb4c0c838df4406c01c59370977a53da5425..refs/heads/for-review'] error: cannot run /bin/does-not-exist: No such file or directory external diff died, stopping at test/a.txt. [This log was manually edited diff; real results may vary.] What operating system are you using? What browser? Linux. Please provide any additional information below. Probably the best solution is to set GIT_CONFIG_NOSYSTEM and GIT_CONFIG_NOGLOBAL to insulate usage of git from any system/user/repo- specific settings.
+ Milestone-RBTools-Release1.0 + Component-RBTools
Fixed in rbtools 78791b9. Thanks!
- Confirmed + Fixed
Sorry but could the decision to add "--no-ext-diff" be please reconsidered? I don't know what is the reasoning behind explicitly ignoring the user options but IMHO the answer to "RB can't run the non-existent program I configured Git to use" is simply "Don't configure Git to use non-existent programs", not this. And I can definitely explain why this is a problem for me: I'm using a hack to disable diffs to some "not interesting" files by default, i.e. I have "foobar diff=generated" in .gitattributes and used "git config diff.generated.command true" to just suppress the diff for all files with this attribute. Unfortunately, when I use post-review, the diffs for all these files do get submitted, which is very annoying. And AFAICS there is no way to avoid it. So could the patch be either simply reverted or, if it's really needed, be at least made optional? In the latter case, please let me know if you'd accept a patch adding an option governing this behaviour. TIA!
It would be really great to get any reply about this because it's annoying to have to change this in every new installation of RBTools. Especially because I still think there is absolutely no good reason for using --no-ext-diff in the first place, so it's a pity that comment #4 apparently went completely unnoticed. Of course, it's also possible that I'm missing something here, but in this case I'd be really grateful if somebody could please point out what is it.
I'm sorry, we missed the earlier comment.
- Fixed + New
I don't know the original rationale for why --no-ext-diff was needed, but I think I agree. We should probably revert this change. In the case where someone needs that option set, I believe they can set it locally for their git install.
If I recall correctly, the original issue I saw is that someone can configure external diff to run sort of graphical program that does not actually generate a diff to stdout. If I had to guess, probably someone I was helping had their external diff set to p4merge and couldn't figure out why their upload wasn't working. (As an aside, it seems that there is some debate as to whether one ought to properly use git difftool for that purpose or git with an external diff tool. Both seem to be possible. But the fact remains that with external diff, there isn't a guarantee that what you get on stdout is something RB will be able to understand once it has been uploaded.) Perhaps RB could try without no-ext-diff but if the upload fails fallback to no no-ext-diff before giving up?
- New + PendingReview
Fixed in rbtools master (7160581). If you set GIT_USE_EXT_DIFF = True in ~/.reviewboardrc, rbtools will not use --no-ext-diff.
- PendingReview + Fixed