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

git-svn Rewrites Some Commits, but not All

From
ALAaron Laws <dartme18@gmail.com>
Date
Apr 28, 2014, 19:26 UTC
Message-ID
<CADu-kvcXWXAd2iBt+oQOVt5znxLmU0fmJ-tgOaogyfGjS5R0vA@mail.gmail.com>
Hello.

I've been using git-svn for some time now, and I'm very happy with it. There is one thing that I'm wondering about, however.

The way I understand it, when `git svn dcommit` is run, new commits are created (A' is created from A adding SVN information), then the current branch is moved to point to A'. Why don't we move any other refs that were pointing to A over to A' ? What would be the point of continuing to point to A? I'm interested in looking into coding this change to git-svn, but I would like to hear some feedback first.

If you understand what I'm saying, feel free to stop now, otherwise, a more verbose explanation follows:

Consider the following workflow:

Create a local branch tracking a SVN branch (I'll call it "master") On that branch, git checkout -b topic; Do some work, and git commit; git checkout master; git merge topic; git log --oneline --decorate --graph topic master Note that topic and master point to the same commit (it was a fast-forward) git svn dcommit; git log --oneline --decorate --graph topic master

Now we see that topic and master now point to different commits. git svn rewrote the master commits to add information about where those commits went in SVN (their rev number, the url, etc.).

I'm proposing that both master and topic should now be pointing to A'. This would allow numerous things to happen automatically that are pleasing, for instance: git branch -d topic; should succeed rather than warn about unmerged changes.

Thanks for listening; I look forward to hearing your thoughts.

In Christ, Aaron Laws

Next: Piotr Krukowiecki
Message 1 of 4 in “git-svn Rewrites Some Commits, but not All”
  1. Aaron LawsApr 28, 2014
  2. Piotr KrukowieckiApr 29, 2014
  3. Eric WongApr 30, 2014
  4. Aaron LawsMay 1, 2014

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.