Re: [PATCH 2/2] learn to pick/revert into unborn branch

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

 



Martin von Zweigbergk <martinvonz@xxxxxxxxx> writes:

> @@ -435,8 +437,9 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
>  	else
>  		parent = commit->parents->item;
>  
> -	if (opts->allow_ff && parent && !hashcmp(parent->object.sha1, head))
> -		return fast_forward_to(commit->object.sha1, head);
> +	if (opts->allow_ff &&
> +	    (parent && !hashcmp(parent->object.sha1, head) || !parent && unborn))

Style (from GNU); please avoid (A && B || C) and spell the
precedence between && and || explicitly, i.e.

	((A && B) || C)

> +	git rm --cached -r . &&
> +	rm -rf * &&

Not "git rm -rf ." and as two separate steps?
--
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]