git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git fetch documentation problem or bug
@ 2012-10-08 18:59 Angelo Borsotti
  2012-10-08 19:16 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Angelo Borsotti @ 2012-10-08 18:59 UTC (permalink / raw)
  To: git

Hello,

git fetch <repository> <refspec> does not create the remote refs in
the current (local)
repository, as shown by the following script:

git init remote
git clone remote local

# populate the remote repository with a commit
cd remote
touch f1
git add f1
git commit -m A

cd ../local
git fetch origin master
git branch -avv

No ref is created.

However, if a git fetch origin is executed, the refs are properly created:

git fetch origin
 * [new branch]      master     -> origin/master
  remotes/origin/master 8a9186d A

I have not seen any clue in the documentation that tells the user
about this difference. The user may (naively) think that git fetch
origin downloads all branches, while git fetch origin <branch>
downloads only <branch>, but it is not so.
I am wandering if this is a documentation problem or a bug.

-Angelo

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-21 19:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-08 18:59 git fetch documentation problem or bug Angelo Borsotti
2012-10-08 19:16 ` Junio C Hamano
2012-10-08 19:18   ` Junio C Hamano
2012-10-08 23:33     ` Junio C Hamano
2012-10-09  1:57       ` Nguyen Thai Ngoc Duy
2012-10-21 12:15       ` Drew Northup
2012-10-21 19:30         ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).