{"thread":{"id":"28834","subject":"git svn dcommit COMMIT silently checks in everything if COMMIT is not a complete revision","startedAt":"2011-11-03T15:12:04Z","lastAt":"2011-11-03T16:28:05Z","messageCount":3,"participants":["Reuben Thomas","Frans Klaver","Thomas Rast"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"178774","messageId":"CAOnWdoj1eUipRd8M=jsAPdDTNcgEbT7adWR78iU5Oac9DvODkQ@mail.gmail.com","threadId":"28834","inReplyTo":null,"subject":"git svn dcommit COMMIT silently checks in everything if COMMIT is not a complete revision","fromName":"Reuben Thomas","fromEmail":"rrt@sc3d.org","sentAt":"2011-11-03T15:12:04Z","receivedAt":"2011-11-03T15:12:04Z","isPatch":false,"sender":{"key":"rrt@sc3d.org","avatar":"https://gravatar.com/avatar/f1d2fd8cb53a9a1876636e095ed6c2e4f8ed357692bc1250cb91fdda23a2ac0a?d=mp&s=160"},"body":"If I run\n\ngit svn dcommit COMMIT\n\nwith COMMIT being an unambiguous, but partial revision string, it\nbehaves like git svn dcommit, i.e. commits everything. (If I remember\nto copy and paste the whole nine yards of the revision string, it\nworks as expected, i.e. commits just that revision.)\n\nI'd expect it to work like other git commands, and understand partial\nrevision strings, or at least bail out saying it was an invalid\nrevision.\n\n-- \nhttp://rrt.sc3d.org\n"},{"id":"178775","messageId":"CAH6sp9N9_nTnpEFBWHw39umcBageNwMKaxD5963CPaRv0UnUfw@mail.gmail.com","threadId":"28834","inReplyTo":"CAOnWdoj1eUipRd8M=jsAPdDTNcgEbT7adWR78iU5Oac9DvODkQ@mail.gmail.com","subject":"Re: git svn dcommit COMMIT silently checks in everything if COMMIT is not a complete revision","fromName":"Frans Klaver","fromEmail":"fransklaver@gmail.com","sentAt":"2011-11-03T15:56:03Z","receivedAt":"2011-11-03T15:56:03Z","isPatch":false,"sender":{"key":"fransklaver@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1876483?v=4"},"body":"Hi,\n\nOn Thu, Nov 3, 2011 at 4:12 PM, Reuben Thomas <rrt@sc3d.org> wrote:\n> If I run\n>\n> git svn dcommit COMMIT\n>\n> with COMMIT being an unambiguous, but partial revision string, it\n> behaves like git svn dcommit, i.e. commits everything. (If I remember\n> to copy and paste the whole nine yards of the revision string, it\n> works as expected, i.e. commits just that revision.)\n>\n> I'd expect it to work like other git commands, and understand partial\n> revision strings, or at least bail out saying it was an invalid\n> revision.\n\n\nSounds like git-svn skips the rev-parse, or doesn't verify. Which\nversion of git is this?\n\nWorkaround would probably be something like\n\ndcommit.sh:\n#!/bin/sh\nCOMMIT=$1\nTHINGY=$(git rev-parse --verify $COMMIT) || exit $?\ngit svn dcommit THINGY\n\n$ dcommit.sh COMMIT\n\n\nMeh. Better fix git-svn.\n\nCheers,\nFrans\n"},{"id":"178780","messageId":"201111031728.05121.trast@student.ethz.ch","threadId":"28834","inReplyTo":"CAOnWdoj1eUipRd8M=jsAPdDTNcgEbT7adWR78iU5Oac9DvODkQ@mail.gmail.com","subject":"Re: git svn dcommit COMMIT silently checks in everything if COMMIT is not a complete revision","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2011-11-03T16:28:05Z","receivedAt":"2011-11-03T16:28:05Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Reuben Thomas wrote:\n> If I run\n> \n> git svn dcommit COMMIT\n> \n> with COMMIT being an unambiguous, but partial revision string, it\n> behaves like git svn dcommit, i.e. commits everything.\n\nIn what git version?  How do I reproduce?  I just ran a simple test\nand can't:\n\n  svnadmin create svnrepo\n  svn co file://$(pwd)/svnrepo svnwt\n  cd svnwt\n  echo a > a\n  svn add a\n  svn ci -m'do a'\n  cd ..\n  git svn clone file://$(pwd)/svnrepo gitwt\n  cd gitwt\n  echo b > a\n  git add a\n  git commit -mb\n  echo c>a\n  git add a\n  git commit -mc\n  git log --oneline\n  git svn dcommit 1b4c4e1\n\nwhere 1b4c4e1 was the abbreviated hash of the parent commit (i.e., the\ncommit 'b').  As expected, it commits everything *up to* 1b4c4e1 from\na detached HEAD, not affecting the current branch.\n\nNote that this is different from what you describe:\n\n> (If I remember to copy and paste the whole nine yards of the\n> revision string, it works as expected, i.e. commits just that\n> revision.)\n\nIt was never designed to commit \"just that revision\".\n\nBy \"it\" I mean 5eec27e (git-svn: let 'dcommit $rev' work on $rev\ninstead of HEAD, 2009-05-29), which changed it to the current\nsemantics and went into 1.6.4.  Before that, 'git svn dcommit <foo>'\ndid something weird and you should avoid giving it arguments.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"}]}