Commit 7091a2d
Documentation/git-svn: Promote the use of --prefix in docs + examples
Currently, the git-svn defaults to using an empty prefix, which ends
up placing the SVN-tracking refs directly in refs/remotes/*. This
placement runs counter to Git's convention of placing remote-tracking
branches in refs/remotes/$remote/*.
Furthermore, combining git-svn with "regular" Git remotes run the risk
of clobbering refs under refs/remotes (e.g. if you have a git remote
called "tags" with a "v1" branch, it will overlap with the git-svn's
tracking branch for the "v1" tag from Subversion.
Even though the git-svn refs stored in refs/remotes/* are not "proper"
remote-tracking branches (since they are not covered by a proper git
remote's refspec), they clearly represent a similar concept, and would
benefit from following the same convention.
For example, if git-svn tracks Subversion branch "foo" at
refs/remotes/foo, and you create a local branch refs/heads/foo to add
some commits to be pushed back to Subversion (using "git svn dcommit),
then it is clearly unhelpful of Git to throw
warning: refname 'foo' is ambiguous.
every time you checkout, rebase, or otherwise interact with the branch.
At this time, the user is better off using the --prefix=foo/ (the
trailing slash is important) to git svn init/clone, to cause the
SVN-tracking refs to be placed at refs/remotes/foo/* instead of
refs/remotes/*. This patch updates the documentation to encourage
use of --prefix.
This is also in preparation for changing the default value of --prefix
at some point in the future.
Cc: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>1 parent 945b9c1 commit 7091a2d
1 file changed
+25
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| |||
811 | 816 | | |
812 | 817 | | |
813 | 818 | | |
814 | | - | |
| 819 | + | |
815 | 820 | | |
816 | | - | |
| 821 | + | |
817 | 822 | | |
818 | 823 | | |
819 | 824 | | |
820 | 825 | | |
821 | 826 | | |
822 | 827 | | |
823 | | - | |
| 828 | + | |
824 | 829 | | |
825 | 830 | | |
826 | 831 | | |
| |||
834 | 839 | | |
835 | 840 | | |
836 | 841 | | |
837 | | - | |
| 842 | + | |
838 | 843 | | |
839 | 844 | | |
840 | 845 | | |
| |||
847 | 852 | | |
848 | 853 | | |
849 | 854 | | |
850 | | - | |
851 | | - | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
852 | 858 | | |
853 | 859 | | |
854 | 860 | | |
| |||
980 | 986 | | |
981 | 987 | | |
982 | 988 | | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
983 | 998 | | |
984 | 999 | | |
985 | 1000 | | |
| |||
1042 | 1057 | | |
1043 | 1058 | | |
1044 | 1059 | | |
1045 | | - | |
1046 | | - | |
| 1060 | + | |
| 1061 | + | |
1047 | 1062 | | |
1048 | 1063 | | |
1049 | 1064 | | |
| |||
0 commit comments