Re: git symbolic-ref vs. reflog (vs. rebase)

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

 



On Sat, Apr 30, 2011 at 9:43 AM, Jeff King <peff@xxxxxxxx> wrote:
> On Fri, Apr 29, 2011 at 10:51:31PM +0530, Csaba Henk wrote:
>
>> > Yes, it is.  But you can choose to do:
>> >
>> >        $ git branch side
>> >        $ git symoblic-ref -m "move to side" HEAD refs/heads/side
>> >        $ git log --oneline -g HEAD@{0}
>> >        05ddb9b HEAD@{0}: move to side
>> >        e69de29 HEAD@{1}: commit (initial): first commit
>> >
>> > if you wanted to.
>>
>> So do you think the following patch would be the correct fix for the
>> rebase issue:
>>
>> diff --git a/git-rebase.sh b/git-rebase.sh
>> index cbb0ea9..10c1727 100755
>> --- a/git-rebase.sh
>> +++ b/git-rebase.sh
>> @@ -284,7 +284,7 @@ do
>>                 head_name="$(cat "$dotest"/head-name)" &&
>>                 case "$head_name" in
>>                 refs/*)
>> -                       git symbolic-ref HEAD $head_name ||
>> +                       git symbolic-ref -m "rebase: aborting" HEAD
>> $head_name ||
>>                         die "Could not move back to $head_name"
>>                         ;;
>>                 esac
>
> I count 2 uses of symbolic-ref without reflogs in git-rebase, one more
> in git-rebase--interactive, and one in git-cvsexportcommit. Should all
> be fixed to write a reflog entry?

Yeah, that's why I didn't set the above patch as PATCH -- I lack the insight
to rebase / plumbing in general to be able to propose a change with the right
impact.

Csaba
--
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]