Re: [PATCH v2 04/13] Teach rebase interactive the mark command

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

 



Junio C Hamano <junio@xxxxxxxxx> writes:

>> +mark_prefix=refs/rebase-marks/
>> +
>>  warn () {
>>  	echo "$*" >&2
>>  }
>> @@ -105,7 +107,13 @@ die_with_patch () {
>>  }
>>  
>>  cleanup_before_quit () {
>> -	rm -rf "$DOTEST"
>> +	rm -rf "$DOTEST" &&
>> +	for ref in "$GIT_DIR/$mark_prefix"*
>> +	do
>> +		test "$ref" = "$GIT_DIR/$mark_prefix*" && continue
>> +		git update-ref -d "${ref#$GIT_DIR/}" "${ref#$GIT_DIR/}" || \
>> +			return 1
>> +	done
>
> In practice nobody would "run" pack-refs during the rebase session, but I
> have to wonder if it can be triggered to run as part of automated gc or
> something, in which case this loop does not work as intended. It needs to
> be rewritten using for-each-ref.
>
>> @@ -244,6 +252,19 @@ peek_next_command () {
>>  	sed -n "1s/ .*$//p" < "$TODO"
>>  }
>>  
>> +mark_to_ref () {
>> +	case "$1" in
>> +	:[!/]*)
>> +		# :/SOMETHING is a reference for the last commit whose
>> +                # message starts with SOMETHING
>> +		echo "$mark_prefix${1#:}"
>> +		;;
>
> What was the conclusion of the mark-syntax discussion?

Eh, sorry, I was commenting on a stale one.  Disregard this part please.

But the "$GIT_DIR/$mark_prefix/*" comment still stands.  I've applied the
series as is to 'next' so let's fix them up in-tree as needed.

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

  Powered by Linux