Labels: Type-Defect Priority-Medium
New issue 2526 by nicolas....@gmail.com: post-review fails with new git
* NOTE: Do not post confidential information in this bug report. *
* If you need immediate support, please contact *
* reviewbo...@googlegroups.com *
What version are you running?
Confirmed on fresh clone of rbtools
What steps will reproduce the problem?
1. Clone a repository with submodules (git >= 1.7.9)
2. Run post-review from a submodule
What is the expected output? What do you see instead?
$ post-review --guess-summary --guess-description --parent=HEAD^
fatal: This operation must be run in a work tree
Please provide any additional information below.
On recent version of git, .git is not stored in the worktree of the
submodule anymore but as as a subdirectory of the top project
$ git rev-parse --git-dir
As post-review tries to reach the top directory by chdir to dirname(git_dit)
we end-up into the git directory of the top project so the diff fails.
The idea is to use the --show-toplevel option of git-rev-parse instead
(when it exists).
I quickly wrote a patch that fixes the issue for me.
git.patch 928 bytes
You received this message because you are subscribed to the Google Groups
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to
For more options, visit this group at