Re: [PATCH 01/10] push: change push to fail if short refname does not exist
- From
Steffen Prohaska <prohaska@zib.de>
- Date
- Oct 30, 2007, 08:56 UTC
- Message-ID
- <AD10F15D-0F77-42BB-86CA-6404063C784B@zib.de>
- In-Reply-To
- <7vwst5m2eq.fsf@gitster.siamese.dyndns.org>
On Oct 30, 2007, at 9:29 AM, Junio C Hamano wrote:
Show 10 quoted lines
> Steffen Prohaska <prohaska@zib.de> writes: > >> Pushing a short refname used to create a new ref on on the >> remote side if it did not yet exist. If you specified the wrong >> branch accidentally it was created. A safety valve that pushes >> only existing branches may help to avoid errors. > > On the other hand, if you specified a wrong branch that exists > on the remote end accidentally, it still was pushed. Do we want > to have a new "--i-really-want-to-push" option to make it safer?
Maybe not a bad idea ;)
But not as a command line flag but after printing the results of a '--dry-run' and than asking the user for confirmation: "do you want to push this?".
> I do not think so. Why should a new branch be treated any > differently?
Because "updating an existing branch" and "creating a new branch" are two slightly different tasks.
If git provides a way to make this difference explicit, it would be safer to use.
> Will drop 1/10 and 2/10 for now.
Then they'll be dropped and I'll rely on the the --dry-run flag.
Or someone else needs to step in and support my point.
Steffen