Re: [PATCH] git-remote-helpers.txt: explain how import works with multiple refs
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Sep 3, 2011, 10:35 UTC
- Message-ID
- <vpqty8tc3rt.fsf@bauges.imag.fr>
- In-Reply-To
- <20110901231734.GA21945@elie>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 16 quoted lines
>> + is followed by a blank line). For example, the following would >> + be two batches of 'push', the first asking the remote-helper >> + to push the local ref 'master' to the remote ref 'master' and >> + the local 'HEAD' to the remote 'branch', and the second >> + asking to push ref 'foo' to ref 'bar' (forced update requested >> + by the '+'). >> ++ >> +------------ >> +push refs/heads/master:refs/heads/master >> +push HEAD:refs/heads/branch >> +\n >> +push +refs/heads/foo:refs/heads/bar >> +\n >> +------------ > > Probably examples like this could go in a later EXAMPLES section.
I think having a few examples within the explanations helps the reader visualize what commands look like, and understand better further explanations.
Plus, the example explains quickly the + which isn't documented otherwise (but people reading this probably already know what a refspec is and what the + normally means in this context so it's probably sufficient to explain it as a side remark in an example)
-- Matthieu Moy http://www-verimag.imag.fr/~moy/