Junio C Hamano <gits...@pobox.com> writes:

> Jeff King <p...@peff.net> writes:
>
>>  - Branch rename breaks local downstream branches
>>    http://article.gmane.org/gmane.comp.version-control.git/241228
>
> If you have a branch B that builds on A, if you are renaming A to C,
> you may want B to automatically set to build on C in some cases, and
> in other cases your renaming A is done explicitly in order to severe
> the tie between A and B and setting the latter to build on C can be
> a bad thing---after all, the user's intention may be to create a
> branch A starting at some commit immediately after this rename so
> that B will keep building on that updated A.
>
> So I am not sure if this is a bug.

Having said that, the current behaviour of leaving B half-configured
to build on a missing branch is undesirable. If we were to change
this so that any branch B that used to build on branch A being
renamed to build on the branch under the new name C, the user may
have to do an extra "--set-upstream-to A" on B after recreating A if
this was done to save away the current state of A to C and then keep
building B on an updated A, so we may have to give _some_ clue what
we are doing behind their back when we rename, e.g.

        $ git branch -m A C
        warning: branch B is set to build on C now.

or something.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to