Re: [PATCH 1/2] Prevent force-updating of the current branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 23, 2011 at 11:20 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Conrad Irwin <conrad.irwin@xxxxxxxxx> writes:
>
>> git branch -M <foo> <current-branch> could be used to change the branch
>> to which HEAD points, without the necessary house-keeping that git reset
>> normally does to make this operation sensible. It would leave the reflog
>> in a confusing state (you would be warned when trying to read it) and
>> had an apparently side-effect of staging the diff between <current branch>
>> and <foo>.
>
> The last two lines are redundant (it is "without the house-keeping of
> reset"); I'll remove "and had an apparently...".

That's fine by me.

>> git checkout -f already guarded against this problem, and aborted with
>> a fatal error.
>
> I assume you mean "branch -f". I'll rewrite it so, and in the present
> tense.

Yes. Thank you.

>
>> git branch -M, git checkout -B and git branch -f now use the same checks
>> before allowing a branch to be created. These prevent you from updating
>> the current branch.
>
> Looks good ;-). Also the patch looks good, too.
>

Glad to hear :).

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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]