On 04.04.2012 20:37, Tom Bachmann wrote:
(Maybe I'm wrong and we should really be doing five-line pull requests
as long as they are atomic. I'm not experienced enough with git to say
for sure whether that's idiocy or actually the best approach. Maybe
somebody should try this out.)
The real problem with such extremely short pull requests is that it
actually takes some amount of time to review anything. So if you were to
have so many short pull requests, you would have to manage locally
several different (tiny) branches waiting for review, and bigger
branches in which you actually work. I haven't managed to do this very
efficiently so far.
For maintaining a sequence of pull requests P1 -- P2 -- P3 -- ..., where
each contains the code from all previous PRs, I have found the following
workflow useful:
- always do all work on the latest branch
- even if you want to deal with a review request on a "lower level"
- use the following script to re-sync the branches (that is, run
update_branch latest_and_greatest my_pull_request)
#!/usr/bin/zsh
echo "Updating $2 from $1."
comment=$(git log $2 | head -5 | tail -1)
newrev=$(git log $1 | grep -B 4 -F "$comment" | head -1 | awk '{print $2}')
newcomment=$(git log $newrev | head -5 | tail -1)
if [ "x$comment" != "x$newcomment" ] ; then
echo "Comments do not match! Aborting." >> /dev/stderr
exit 1
fi
git checkout $1
git branch -D $2
git checkout -b $2 $newrev
git checkout $1
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.