From: Sergey Organov <sorganov@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: git pull unclear manual
Date: Thu, 04 Mar 2021 14:52:14 +0300 [thread overview]
Message-ID: <87blbzm901.fsf@osv.gnss.ru> (raw)
In-Reply-To: <xmqqv9a7emx6.fsf@gitster.c.googlers.com> (Junio C. Hamano's message of "Wed, 03 Mar 2021 17:18:45 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> Sergey Organov <sorganov@gmail.com> writes:
>
>> Here is how "git help pull" begins:
>>
>> <q>
>> NAME
>> git-pull - Fetch from and integrate with another repository or a local
>> branch
>>
>> SYNOPSIS
>> git pull [<options>] [<repository> [<refspec>...]]
>> </q>
>>
>> From this, how do one figures how to "integrate with ... local branch"?
>>
>> Is "git pull" useful to integrate with a local branch at all?
>
> Yes, you can refer to your local repository as ".", so
>
> git pull . another-branch
>
> will integrate the history of your local "another-branch" into
> the history of the branch you have currently checked out.
Nice, thanks!
Do you think the manual needs some improvement still?
I mean, I'd then expect something like this as the SYNOPSIS:
"git-pull - Fetch from and integrate with another or current repository"
with further clarification in the DESCRIPTION of how integration with
current repository could be useful.
The present description, if we drop "another repository" for the sake of
the argument, reads:
"git-pull - Fetch from and integrate with a local branch"
that sounds plain wrong to me.
Also, I got confused further as the manual consistently uses "remote
repository" to describe <repository>, and that doesn't easily maps to
"current repository" in my mind.
Further, the manual says that <refspec> is simply passed to the "git
fetch", and "git help fetch" adds to the confusion, as it says:
git-fetch - Download objects and refs from *another repository*
Fetch branches and/or tags (collectively, "refs") from one or more
*other repositories*, along with the objects necessary to complete
their histories.
that doesn't suggest "current repository" in some form is allowed
either.
BTW, why are these "other", "remote", "another" attributes there in
the manual in the first place? Why don't just say:
git-fetch - Download objects and refs from repositories
Fetch branches and/or tags (collectively, "refs") from one or more
repositories, along with the objects necessary to complete their
histories, into the current repository.
Thanks,
-- Sergey
next prev parent reply other threads:[~2021-03-04 11:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 14:18 git pull unclear manual Sergey Organov
2021-03-04 1:18 ` Junio C Hamano
2021-03-04 11:52 ` Sergey Organov [this message]
2021-03-04 23:24 ` Junio C Hamano
2021-03-07 18:57 ` Sergey Organov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87blbzm901.fsf@osv.gnss.ru \
--to=sorganov@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).