threads / patch / 16330

patchDocumentation: git-svn: fix example for centralized SVN clone

Subject: [PATCH resend] Documentation: git-svn: fix example for centralized SVN clone

## tl;dr

4 messages between Nov 14, 2008 and Nov 15, 2008. Diffs are folded; open one to read it.

replies: 3people: 3as markdown or json

Jan Krüger· Nov 14, 2008, 17:45 UTC · lore

The example that tells users how to centralize the effort of the initial git svn clone operation doesn't work properly. It uses rebase but that only works if HEAD exists. This adds one extra command to create a somewhat sensible HEAD that should work in all cases.

Signed-off-by: Jan Krüger <jk@jk.gs>
---
When I first sent this one I said I didn't like the solution all that
much (it would be nicer to use origin/HEAD but we didn't fetch that)
but Eric said he thinks it's okay and the original author of the
section hasn't piped in. It's still better than a nonfunctional example
in any case.

Previous discussion at <http://thread.gmane.org/gmane.comp.version-control.git/100472>.

 Documentation/git-svn.txt |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Show changes to Documentation/git-svn.txt +2 −0
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 84c8f3c..ba94cd1 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -544,6 +544,8 @@ have each person clone that repository with 'git-clone':
 	git remote add origin server:/pub/project
 	git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
 	git fetch
+# Create a local branch from one of the branches just fetched
+	git checkout -b master FETCH_HEAD
 # Initialize git-svn locally (be sure to use the same URL and -T/-b/-t options as were used on server)
 	git svn init http://svn.example.com/project
 # Pull the latest changes from Subversion
-- 
1.6.0.3.578.g6a50
Junio C Hamano· Nov 15, 2008, 05:49 UTC · re: Jan Krüger · lore

Re: [PATCH resend] Documentation: git-svn: fix example for centralized SVN clone

"Jan Krüger" <jk@jk.gs> writes:
Show 12 quoted lines
> The example that tells users how to centralize the effort of the initial
> git svn clone operation doesn't work properly. It uses rebase but that
> only works if HEAD exists. This adds one extra command to create a
> somewhat sensible HEAD that should work in all cases.
>
> Signed-off-by: Jan Krüger <jk@jk.gs>
> ---
> When I first sent this one I said I didn't like the solution all that
> much (it would be nicer to use origin/HEAD but we didn't fetch that)
> but Eric said he thinks it's okay and the original author of the
> section hasn't piped in. It's still better than a nonfunctional example
> in any case.
I'll mark this Acked by Eric and apply to 'maint'.  Thanks, both.
Eric Wong· Nov 15, 2008, 06:30 UTC · re: Junio C Hamano · lore

Re: [PATCH resend] Documentation: git-svn: fix example for centralized SVN clone

Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> "Jan Krüger" <jk@jk.gs> writes:
> 
> > The example that tells users how to centralize the effort of the initial
> > git svn clone operation doesn't work properly. It uses rebase but that
> > only works if HEAD exists. This adds one extra command to create a
> > somewhat sensible HEAD that should work in all cases.
> >
> > Signed-off-by: Jan Krüger <jk@jk.gs>
> > ---
> > When I first sent this one I said I didn't like the solution all that
> > much (it would be nicer to use origin/HEAD but we didn't fetch that)
> > but Eric said he thinks it's okay and the original author of the
> > section hasn't piped in. It's still better than a nonfunctional example
> > in any case.
> 
> I'll mark this Acked by Eric and apply to 'maint'.  Thanks, both.
No problem.

I see what happened: I mis-CC-ed Adam as never had him in my aliases file :x

-- 
Eric Wong
Junio C Hamano· Nov 15, 2008, 07:56 UTC · re: Eric Wong · lore

Re: [PATCH resend] Documentation: git-svn: fix example for centralized SVN clone

Eric Wong <normalperson@yhbt.net> writes:
> I see what happened: I mis-CC-ed Adam as never had him in my aliases
> file :x
Ah, I see.  I should have checked with my "git who" alias.

← back to recent threads