Re: [PATCH 24/31] rebase: extract code for writing basic state

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

 



Martin von Zweigbergk wrote:
> Note that non-interactive rebase stores the sha1 of the original head
> in a file called orig-head, while interactive rebase stores it in a
> file called head.
[...]
> +	if test "$type" = interactive
> +	then
> +		echo "$orig_head" > "$state_dir"/head
> +	else
> +		echo "$orig_head" > "$state_dir"/orig-head
> +	fi &&

Do we have to cater to the use-case where the user starts a rebase,
downgrades at a conflict, and then continues?

If not, you could read 'orig-head' first and fall back to 'head', only
writing 'orig-head' in the state saving independent of the mode.  That
would give us the chance of removing the redundancy at some point.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
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]