With git, pre-commit really means "pre-merge" or "pre-push". Most of us work in topic branches on our local clone, and only merge those changes to master after they've been reviewed.
-David On Jul 8, 2013, at 8:27 AM, Emanuele Ianni <die...@gmail.com> wrote: > I'm trying this codereview tool. I'm having problems with git. This is the > output of git status: > > # On branch master > # Changes not staged for commit: > # (use "git add <file>..." to update what will be committed) > # (use "git checkout -- <file>..." to discard changes in working directory) > # > # modified: path/to/something/modified.js > # > # Untracked files: > # (use "git add <file>..." to include in what will be committed) > # > # .gitignore > # .reviewboardrc > If i try to run post-review --guess-summary --guess-description -p under this > status I get this message: > > There don't seem to be any diffs! > > Now, if I run git add -u, my git status is: > > # On branch master > # Changes to be committed: > # (use "git reset HEAD <file>..." to unstage) > # > # modified: path/to/something/modified.js > # > # Untracked files: > # (use "git add <file>..." to include in what will be committed) > # > # .gitignore > # .reviewboardrc > With this situation, if I run again post-review --guess-summary > --guess-description -p I still get the same message: > > There don't seem to be any diffs! > > At this point if I commit it with the command git commit -m "my commit" I > have the following message (obviously): > > [master 027e044] my commit 1 file changed, 1 insertion(+) > > and I run again the post-review command I have the output: > > Review request #22 posted. > > http://192.168.133.218/r/22/ > This puzzles me because If you go to read the ReviewBoard FAQ here's the > message: > > A basic pre-commit workflow with git would look like this: > > Clone the central repository. > Make a change you want reviewed, but do not commit it yet. > Run post-review (or otherwise submit a diff). > Get reviews, update your change as needed. > When the change is marked to ship, commit it to master and push it to the > origin. > Since my intention was doing a pre-commit, can you explain to me why there > are no diff after I stage changes for commit? > > -- > Want to help the Review Board project? Donate today at > http://www.reviewboard.org/donate/ > Happy user? Let us know at http://www.reviewboard.org/users/ > -~----------~----~----~----~------~----~------~--~--- > To unsubscribe from this group, send email to > reviewboard+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/reviewboard?hl=en > --- > You received this message because you are subscribed to the Google Groups > "reviewboard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to reviewboard+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~----------~----~----~----~------~----~------~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en --- You received this message because you are subscribed to the Google Groups "reviewboard" group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.