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

Re: git svn dcommit COMMIT silently checks in everything if COMMIT is not a complete revision

From
Frans Klaver <fransklaver@gmail.com>
Date
Nov 3, 2011, 15:56 UTC
Message-ID
<CAH6sp9N9_nTnpEFBWHw39umcBageNwMKaxD5963CPaRv0UnUfw@mail.gmail.com>
In-Reply-To
<CAOnWdoj1eUipRd8M=jsAPdDTNcgEbT7adWR78iU5Oac9DvODkQ@mail.gmail.com>
Hi,
On Thu, Nov 3, 2011 at 4:12 PM, Reuben Thomas <rrt@sc3d.org> wrote:
Show 12 quoted lines
> If I run
>
> git svn dcommit COMMIT
>
> with COMMIT being an unambiguous, but partial revision string, it
> behaves like git svn dcommit, i.e. commits everything. (If I remember
> to copy and paste the whole nine yards of the revision string, it
> works as expected, i.e. commits just that revision.)
>
> I'd expect it to work like other git commands, and understand partial
> revision strings, or at least bail out saying it was an invalid
> revision.

Sounds like git-svn skips the rev-parse, or doesn't verify. Which version of git is this?

Workaround would probably be something like

dcommit.sh: #!/bin/sh COMMIT=$1 THINGY=$(git rev-parse --verify $COMMIT) || exit $? git svn dcommit THINGY

$ dcommit.sh COMMIT
Meh. Better fix git-svn.

Cheers, Frans

Previous: Reuben ThomasNext: Thomas Rast
Message 2 of 3 in “git svn dcommit COMMIT silently checks in everything if COMMIT is not a complete revision”
  1. Reuben ThomasNov 3, 2011
  2. Frans KlaverNov 3, 2011
  3. Thomas RastNov 3, 2011

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.