Skip to content

Conversation

@javabrett
Copy link
Contributor

Prior to Git 2.0, git-svn init/clone operations used an empty --prefix by-default. In 2.0, the default prefix is changed to "origin/". This is for good reason - it avoids the non-standard, non-prefixed branch-names previously-created by git-svn when importing remote branches.

The git-svn-diff script, when working on non-trunk (i.e. a branch under /branches) made the assumption that remote branch-names were non-prefixed, e.g. "my-branch" instead of "origin/my-branch" when looking for the current commit.

This commit adds support for discovering and using the git-svn prefix. It should work with both Git <2.0 and >=2.0, and with empty and non-empty prefixes.

jwiegley added a commit that referenced this pull request Jan 18, 2016
Added support for non-empty git-svn prefix
@jwiegley jwiegley merged commit 7507a46 into jwiegley:master Jan 18, 2016
@javabrett javabrett deleted the git-svn-diff-prefix-support branch January 19, 2016 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants