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
Thomas Rast <trast@student.ethz.ch>
Date
Nov 3, 2011, 16:28 UTC
Message-ID
<201111031728.05121.trast@student.ethz.ch>
In-Reply-To
<CAOnWdoj1eUipRd8M=jsAPdDTNcgEbT7adWR78iU5Oac9DvODkQ@mail.gmail.com>
Reuben Thomas wrote:
Show 6 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.

In what git version? How do I reproduce? I just ran a simple test and can't:

  svnadmin create svnrepo
  svn co file://$(pwd)/svnrepo svnwt
  cd svnwt
  echo a > a
  svn add a
  svn ci -m'do a'
  cd ..
  git svn clone file://$(pwd)/svnrepo gitwt
  cd gitwt
  echo b > a
  git add a
  git commit -mb
  echo c>a
  git add a
  git commit -mc
  git log --oneline
  git svn dcommit 1b4c4e1

where 1b4c4e1 was the abbreviated hash of the parent commit (i.e., the commit 'b'). As expected, it commits everything *up to* 1b4c4e1 from a detached HEAD, not affecting the current branch.

Note that this is different from what you describe:
> (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.)
It was never designed to commit "just that revision".

By "it" I mean 5eec27e (git-svn: let 'dcommit $rev' work on $rev instead of HEAD, 2009-05-29), which changed it to the current semantics and went into 1.6.4. Before that, 'git svn dcommit <foo>' did something weird and you should avoid giving it arguments.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Frans Klaver
Message 3 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.