Re: [git] Re: [PATCH v3 4/9] user-manual: Mention 'git remote add' for remote branch config

2013-02-17 Thread W. Trevor King
On Sun, Feb 17, 2013 at 06:26:25PM -0800, Junio C Hamano wrote:
> "W. Trevor King"  writes:
> >  -
> > +$ git fetch git://example.com/proj.git +refs/heads/*:refs/remotes/example/*
> > +$ git fetch example +refs/heads/*:refs/remotes/example/*
> >  $ git fetch example
> >  -
> 
> These _three_ commands will do the same.

Oops.  Feel free to fix this for me, and consider the revised version
signed off by me ;).

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy


signature.asc
Description: OpenPGP digital signature


Re: [PATCH v3 4/9] user-manual: Mention 'git remote add' for remote branch config

2013-02-17 Thread Junio C Hamano
"W. Trevor King"  writes:

> From: "W. Trevor King" 
>
> I hardly ever setup remote..url using 'git config'.  While it
> may be instructive to do so, we should also point out 'git remote
> add'.
>
> Signed-off-by: W. Trevor King 
> ---

This looks like a good 'maint' material that can be applied straight
away there in preparation for 1.8.1.4 to me (modulo one nit);
reviewers watching from the sideline, please stop me if you see
issues.

> +After configuring the remote, the following two commands will do the
> +same thing:
>  
>  -
> +$ git fetch git://example.com/proj.git +refs/heads/*:refs/remotes/example/*
> +$ git fetch example +refs/heads/*:refs/remotes/example/*
>  $ git fetch example
>  -

These _three_ commands will do the same.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 4/9] user-manual: Mention 'git remote add' for remote branch config

2013-02-17 Thread W. Trevor King
From: "W. Trevor King" 

I hardly ever setup remote..url using 'git config'.  While it
may be instructive to do so, we should also point out 'git remote
add'.

Signed-off-by: W. Trevor King 
---
 Documentation/user-manual.txt | 40 +---
 1 file changed, 13 insertions(+), 27 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index ba06b7e..91f1822 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -2878,48 +2878,34 @@ branch.master.merge=refs/heads/master
 
 If there are other repositories that you also use frequently, you can
 create similar configuration options to save typing; for example,
-after
 
 -
-$ git config remote.example.url git://example.com/proj.git
+$ git remote add example git://example.com/proj.git
 -
 
-then the following two commands will do the same thing:
+adds the following to `.git/config`:
 
 -
-$ git fetch git://example.com/proj.git master:refs/remotes/example/master
-$ git fetch example master:refs/remotes/example/master
+[remote "example"]
+   url = git://example.com/proj.git
+   fetch = +refs/heads/*:refs/remotes/example/*
 -
 
-Even better, if you add one more option:
-
--
-$ git config remote.example.fetch master:refs/remotes/example/master
--
+Also note that the above configuration can be performed by directly
+editing the file `.git/config` instead of using linkgit:git-remote[1].
 
-then the following commands will all do the same thing:
+After configuring the remote, the following two commands will do the
+same thing:
 
 -
-$ git fetch git://example.com/proj.git master:refs/remotes/example/master
-$ git fetch example master:refs/remotes/example/master
+$ git fetch git://example.com/proj.git +refs/heads/*:refs/remotes/example/*
+$ git fetch example +refs/heads/*:refs/remotes/example/*
 $ git fetch example
 -
 
-You can also add a "+" to force the update each time:
-
--
-$ git config remote.example.fetch +master:refs/remotes/example/master
--
-
-Don't do this unless you're sure you won't mind "git fetch" possibly
-throwing away commits on 'example/master'.
-
-Also note that all of the above configuration can be performed by
-directly editing the file .git/config instead of using
-linkgit:git-config[1].
-
 See linkgit:git-config[1] for more details on the configuration
-options mentioned above.
+options mentioned above and linkgit:git-fetch[1] for more details on
+the refspec syntax.
 
 
 [[git-concepts]]
-- 
1.8.1.336.g94702dd

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html