I'm digging this topic up from the ground because if it was fixed, I
would not have spent many confusing (and a little bit panicking)
minutes wondering how the hell I managed to push to "origin/master"
which I did not have push access to begin with, which turned out to be
the local branch, refs/hea
Michael Haggerty writes:
> I wonder whether we could give a way to specify a reference in an
> unambiguous, canonical fashion like I expected, for example by using a
> leading slash: "/refs/heads/mybranch". This could be a way for the user
> to ask for DWIMming to be turned off without having to
On 02/18/2014 08:51 PM, Junio C Hamano wrote:
> John Keeping writes:
>
>> There's already the arbitrary set of prefixes in
>> refs.c::prettify_refname() and refs.c::ref_rev_parse_rules(). I can see
>> how a user might think that since "git log refs/heads/name" is
>> equivalent to "git log master
David Kastrup writes:
> Junio C Hamano writes:
>
>> Duy Nguyen writes:
>>
>>> + if (!force && dwim_ref(name, strlen(name), sha1, &real_ref))
>>> + die(_("creating ref refs/heads/%s makes %s ambiguous.\n"
>>> + "Use -f to create it anyway."),
>>> + name,
On Tue, Feb 18, 2014 at 11:51:05AM -0800, Junio C Hamano wrote:
> John Keeping writes:
>
> > There's already the arbitrary set of prefixes in
> > refs.c::prettify_refname() and refs.c::ref_rev_parse_rules(). I can see
> > how a user might think that since "git log refs/heads/name" is
> > equival
John Keeping writes:
> There's already the arbitrary set of prefixes in
> refs.c::prettify_refname() and refs.c::ref_rev_parse_rules(). I can see
> how a user might think that since "git log refs/heads/name" is
> equivalent to "git log master" then "git branch refs/heads/name" should
> be equiva
Junio C Hamano writes:
> Duy Nguyen writes:
>
>> +if (!force && dwim_ref(name, strlen(name), sha1, &real_ref))
>> +die(_("creating ref refs/heads/%s makes %s ambiguous.\n"
>> + "Use -f to create it anyway."),
>> +name, name);
>
> Does this check s
On Tue, Feb 18, 2014 at 11:03:10AM -0800, Junio C Hamano wrote:
> Duy Nguyen writes:
>
> > Prevent is a strong word. I meant we only do it if they force
> > it. Something like this..
> >
> > -- 8< --
> > diff --git a/branch.c b/branch.c
> > index 723a36b..3f0540f 100644
> > --- a/branch.c
> > +++
Duy Nguyen writes:
> Prevent is a strong word. I meant we only do it if they force
> it. Something like this..
>
> -- 8< --
> diff --git a/branch.c b/branch.c
> index 723a36b..3f0540f 100644
> --- a/branch.c
> +++ b/branch.c
> @@ -251,6 +251,11 @@ void create_branch(const char *head,
>
Duy Nguyen gmail.com> writes:
> Prevent is a strong word. I meant we only do it if they force
> it. Something like this..
>
I would propose to make this even stronger:
Forbid to create any branches which start with any of:
- "refs/"
- "heads/"
- "remotes/"
- "tags/"
as long as you do not use th
On Fri, Feb 14, 2014 at 08:32:07AM -0800, Junio C Hamano wrote:
> Duy Nguyen writes:
>
> > On Fri, Feb 14, 2014 at 7:45 PM, Andreas Schwab
> > wrote:
> >> Josef Wolf writes:
> >>
> >>> Notice the refs/heads _within_ refs/heads!
> >>>
> >>> Now I wonder how I managed to get into this situation
On Fri, Feb 14, 2014 at 08:32:07AM -0800, Junio C Hamano wrote:
> A. You are not allowed to call your branch with a string that begins with
> 'refs/heads/'.
> B. Why?
> A. Because it will confuse you.
> B. I know what I am doing.
> A. ???
Your reply in
http://git.661346.n2.nabble.com/1-8-
David Kastrup writes:
> Junio C Hamano writes:
> ...
>> A. Because it will confuse you.
>> B. I know what I am doing.
>> A. ???
>
> A. But maybe Git will no longer know what you are doing. Its standard
> way of resolving references will mean that once a branch
> refs/heads/wibble exists, ref
On Fri, Feb 14, 2014 at 04:35:14PM +0100, David Kastrup wrote:
> Josef Wolf writes:
> > The only command in this script that uses "heads" is
> >
> > git symbolic-ref HEAD "refs/heads/$new_branch"
> >
> You probably should check how $new_branch comes about.
This is the line of code where $new_br
Junio C Hamano writes:
> Duy Nguyen writes:
>
>> On Fri, Feb 14, 2014 at 7:45 PM, Andreas Schwab
>> wrote:
>>> Josef Wolf writes:
>>>
Notice the refs/heads _within_ refs/heads!
Now I wonder how I managed to get into this situation and what's the best
way
to recover?
Duy Nguyen writes:
> On Fri, Feb 14, 2014 at 7:45 PM, Andreas Schwab wrote:
>> Josef Wolf writes:
>>
>>> Notice the refs/heads _within_ refs/heads!
>>>
>>> Now I wonder how I managed to get into this situation and what's the best
>>> way
>>> to recover?
>>
>> Probably you did something like "g
Josef Wolf writes:
> On Fri, Feb 14, 2014 at 07:59:18PM +0700, Duy Nguyen wrote:
>> On Fri, Feb 14, 2014 at 7:45 PM, Andreas Schwab
>> wrote:
>> > Josef Wolf writes:
>> >
>> >> Notice the refs/heads _within_ refs/heads!
>> > Probably you did something like "git branch refs/heads/master". You
On Fri, Feb 14, 2014 at 07:59:18PM +0700, Duy Nguyen wrote:
> On Fri, Feb 14, 2014 at 7:45 PM, Andreas Schwab wrote:
> > Josef Wolf writes:
> >
> >> Notice the refs/heads _within_ refs/heads!
> > Probably you did something like "git branch refs/heads/master". You can
> > remove it again with "gi
On Fri, Feb 14, 2014 at 7:45 PM, Andreas Schwab wrote:
> Josef Wolf writes:
>
>> Notice the refs/heads _within_ refs/heads!
>>
>> Now I wonder how I managed to get into this situation and what's the best way
>> to recover?
>
> Probably you did something like "git branch refs/heads/master". You c
Josef Wolf writes:
> Notice the refs/heads _within_ refs/heads!
>
> Now I wonder how I managed to get into this situation and what's the best way
> to recover?
Probably you did something like "git branch refs/heads/master". You can
remove it again with "git branch -d refs/heads/master".
Andrea
Hello folks,
after some commits to my master branch, I tried to push to the bare upstream
repository and got this error message:
error: src refspec refs/heads/master matches more than one.
A quick check shows that there's indeed something wrong:
jw@kiste:/git/scan$ git branch -a |
21 matches
Mail list logo