git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git svn dcommit fails with empty commits

From
VJVallon, Justin <justin.vallon@deshaw.com>
Date
Dec 10, 2010, 16:25 UTC
Message-ID
<982E526FA742C94E9AC26DA766FD07090A3373@NYCMBX3.winmail.deshaw.com>
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
Message 1 of 1 in “git svn dcommit fails with empty commits”
  1. Vallon, JustinDec 10, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.