git svn dcommit fails with empty commits

From: Vallon, Justin <hidden>
Date: 2016-06-15 22:50:13

I am trying to get git-svn to cooperate with the master branch by doing some merges after the rebase in dcommit.  This ends up creating an empty merge commit (since the trees are identical).  Then, later git commits appear on top of that merge.

However dcommit has a problem with the empty merge (or an empty commit, to be more accurate).  The problem seems to be around the "No changes" case in git-svn.perl/cmd_dcommit.  If there were no changes (apply_diff returns false), then the editor_cb is not called, and $cmt_rev is not updated.  Then $last_rev is set to $cmt_rev, which is now empty.

It seems either:

1) In editor_cb, just assign to $last_rev directly, and remove the $last_rev setting.
2) Use: $last_rev = $cmt_rev if defined $cmt_rev

-- 
-Justin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help