* git fetch documentation
@ 2013-06-01 11:04 Nicolas Richard
2013-06-01 11:25 ` Ramkumar Ramachandra
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Richard @ 2013-06-01 11:04 UTC (permalink / raw)
To: git
Hello,
Regarding the git-fetch man page (IIUC, in pull-fetch-param.txt), in
particular the <refspec> explanation, I feel that two facts are missing:
- A '*' can be used both in src and dest, and it matches any name,
including subdirectories, but not partial names (i.e. refs/heads/foo*
is invalid).
- multiple fetch lines can be given in .git/config, each of them will be
obeyed
These are probably obvious for most users, but I think documenting them
would be good for newcomers. (I tried to come up with a patch but I
can't find a precise yet concise way to explain the role of '*' in
english.)
--
Nico.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: git fetch documentation
2013-06-01 11:04 git fetch documentation Nicolas Richard
@ 2013-06-01 11:25 ` Ramkumar Ramachandra
0 siblings, 0 replies; 2+ messages in thread
From: Ramkumar Ramachandra @ 2013-06-01 11:25 UTC (permalink / raw)
To: Nicolas Richard; +Cc: git
Nicolas Richard wrote:
> - A '*' can be used both in src and dest, and it matches any name,
> including subdirectories, but not partial names (i.e. refs/heads/foo*
> is invalid).
> - multiple fetch lines can be given in .git/config, each of them will be
> obeyed
>
> These are probably obvious for most users, but I think documenting them
> would be good for newcomers. (I tried to come up with a patch but I
> can't find a precise yet concise way to explain the role of '*' in
> english.)
Good. Yes, we don't even have examples showing that a rewrite like
refs/heads/nr/*:refs/heads/* can be done. The documentation is
definitely lacking. However, I'd urge you to get started by
submitting an initial draft: we will review it and help you learn and
contribute. Some pointers:
- What you are attempting to document is called a refspec. Look at
'struct refspec' in remote.h, and attempt to understand what its
fields mean by looking at how it is used in remote.c.
- Notice that there is a push refspec corresponding to the fetch
refspec. This feature is even more obscure and undocumented.
- See remote.c:get_ref_match(); specifically,
match_name_with_pattern() is doing the pattern matching. As you can
see, match_name_with_pattern() hard-codes a '*' and tries to match
just that: there is no support for anything else. Try to skim through
the code once.
- Read Documentation/SubmittingPatches and submit a first version
quickly. It doesn't have to be perfect at all.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-01 11:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-01 11:04 git fetch documentation Nicolas Richard
2013-06-01 11:25 ` Ramkumar Ramachandra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox