Hey,

On Wednesday 24 March 2010 22:22:46 Hannu Koivisto wrote:

> I believe this change has the side-effect of making push to an empty
> repository (e.g. you set up a new shared repository for your project,
> clone it, commit to your clone and push) not work by default because
> the refspec argument is required in that case.

You're correct, I wasn't aware of that case. I don't think I have time
to fix this at the moment; writing documentation takes precedence.

However, I consider the current behavior harmful. Consider the following
setup that we use a lot at our company:

We have an official repository for an OpenSource project that's
reachable from the internet. We also develop special versions for
customers for whom we have separate repositories. We often port changes
between the OpenSource repo and the customer-specific repos. Therefore I
always add a remote called 'oss' or 'official' when working on a
customer repo.

Now I often port patches between customer branches and the OSS
branch. The local branch 'master' is obviously tracking customer/master,
and I have e.g. oss-master which tracks oss/master. So porting from
customer to master involves pushing from the local oss-master branch --
and that's when the problems occur. If I don't remember to config git
accordingly magit will happily tell git to create a new branch in the
OSS remote called oss-master. This branch is immediately visible to the
whole world; fixing it requires logging into the server hosting the
OSS repo and deleting the branch in that repo.

git makes it so easy to add remotes, fetch from and push to them that I
often enough forget to configure the branches to push to. git alone will
warn you about that, but if magit is calling 'push' with an explicit
refspec then that warning will not be shown.

That's why I consider the old behavior harmful and that it should be
changed even if it means introducing that minor regression you've
mentioned.

Regards,
Mosu

-- 
If Darl McBride was in charge, he'd probably make marriage
unconstitutional too, since clearly it de-emphasizes the commercial
nature of normal human interaction, and probably is a major impediment
to the commercial growth of prostitution. - Linus Torvalds

To unsubscribe from this group, send email to magit+unsubscribegooglegroups.com 
or reply to this email with the words "REMOVE ME" as the subject.

Reply via email to