Re: [PATCH 2/3] Implement --dirty for git-rebase--interactive.

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

 



Simon Sasburg <simon.sasburg@xxxxxxxxx> writes:

> +restore_dirty_state () {
> +	lastmsg=$(git-rev-list HEAD^..HEAD --pretty=oneline | sed "s:[^ ]* ::")
> +	if test "$lastmsg" = "REBASE--dirty: store index..workingtree diff"
> +	then
> +		echo "Restoring dirty index state"
> +		git reset --mixed HEAD^
> +	fi
> +	lastmsg=$(git-rev-list HEAD^..HEAD --pretty=oneline | sed "s:[^ ]* ::")
> +	if test "$lastmsg" = "REBASE--dirty: store HEAD..index diff"
> +	then
> +		echo "Restoring dirty working dir state"
> +		git reset --soft HEAD^
> +	fi
> +}

This forces the user to pay the two rev-list overhead, even when
running rebase without --dirty option.  Can we avoid paying any,
when not giving the option?

Also it pollutes the reflog of the branch, but that won't be a
huge issue with Dscho's "detach HEAD while rebasing" patch.
-
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