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

Re: git-svn problem: unexpected files/diffs in commit

From
EWEric Wong <normalperson@yhbt.net>
Date
Aug 26, 2006, 07:33 UTC
Message-ID
<20060826073354.GB10801@localdomain>
In-Reply-To
<m2lkpcfhml.fsf@ziti.local>
Seth Falcon <sethfalcon@gmail.com> wrote:
> Eric Wong <normalperson@yhbt.net> writes:
Show 6 quoted lines
> > Outside of the SSL problems, the mis-commit isn't strictly user-error,
> > but git-svn is confusing in this case, as the documentation is unclear
> > about what git-svn should do in this case :x
> 
> > I usually check with git log remotes/git-svn..HEAD instead of git
> > diff.  Perhaps adding --no-merges would be more correct?
No, --no-merges is not correct (see below).
> I'm not sure how to reproduce the situation I was in, but what would
> git log have shown me that git diff didn't -- IOW, would it have been
> obvious that the commit op was going to add extra stuff and
> effectively undo a rev in svn?
> > I've been really slacking on the git-svn documentation the past few
> > months, help would be much appreciated.
> 
> I will try to send some doc patches.  But I may have a few questions ;-)
Show 6 quoted lines
> I think commit-diff might be what I want to be using too, but I need
> to contribute some documentation for it before I can read the man page
> and start using it ;-)
> 
> An example call to git-svn commit-diff would be very helpful, I
> suspect.

git-svn commit-diff <a> <b> (git diff-tree <a> <b> to check the result)

My new command, 'dcommit' wraps it.

'commit-diff' very low-level command that does exactly what you tell it to do, compute the delta of two trees, and send it to the SVN repo. The <a> tree doesn't even have to strictly match what's in the SVN repo at the given moment if you're using the SVN:: libs.

'commit' was the original command, that meant: write this tree to SVN. Period. This was before SVN:: library support was available, so it had to be stupidly simple.

foo..bar notation was supported, which in hindsight was a mistake that has probably confused lots of people....

Show 6 quoted lines
> I will have a look...
> 
> While I'm thinking of it, it would be really nice for git-svn's commit and
> commit-diff to have a dry-run type of flag.  Commits to your own git
> repos are easy to correct, but those made on some other public scm are
> less pretty.

I think everything is somewhat documented in the commit logs, but most of those were back when git-svn was in contrib/

Otherwise, git-svn help attempts to be reasonably self-documenting, and I've tried to keep the code to git-svn fairly readable (except the code to generate the aforementioned help output :)

-- 
Eric Wong
Previous: Seth FalconNext: Eric Wong
Message 6 of 8 in “git-svn problem: unexpected files/diffs in commit”
  1. Seth FalconAug 25, 2006
  2. Eric WongAug 25, 2006
  3. git-svn: establish new connections on commit after forkEric Wong, Aug 25, 2006
  4. git-svn: recommend rebase for syncing against an SVN repoEric Wong, Aug 25, 2006
  5. Seth FalconAug 26, 2006
  6. Eric WongAug 26, 2006
  7. git-svn: add the 'dcommit' commandEric Wong, Aug 26, 2006
  8. git-svn: stop repeatedly reusing the first commit message with dcommitEric Wong, Aug 26, 2006

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.