Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Jun 24, 2013, 14:13 UTC
- Message-ID
- <CALkWK0mC_SDR=wdPHkM5YBUXi3ntfBXfmVF468Nt_Ssembuntg@mail.gmail.com>
- In-Reply-To
- <CALKQrgfCR10nfP9tVuHyhCPOfe3XVvBzzQayhM7b9Ra5ZDGnMw@mail.gmail.com>
Johan Herland wrote:
Show 6 quoted lines
> But then, does it make sense to > say that we will only ever have exactly _one_ push refspec in the > current context, and we should therefore replace the "static const > char **refspec;" string array with a single "static const char > *refspec;" string? That would make it obvious that there is no room > for ambiguity with overlapping refspecs.
Multiple refspecs can be specified on the command-line; set_refspecs() is responsible for calling add_refspec() multiple times for each refspec, and _that_ is the primary use of the "refspec" variable. The single add_refspec() invocation in the push.default switch is a special case that reuses the variable.