Re: [PATCH/RFCv4 2/2] git rebase -i: warn about removed commits

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

 



Galan Rémi <remi.galan-alfonso@xxxxxxxxxxxxxxxxxxxxxxx> writes:
> +                comm -2 -3 "$todo".oldsha1 "$todo".newsha1 >"$todo".miss
> +
> +                # Make the list user-friendly
> +                opt="--no-walk=sorted --format=oneline --abbrev-commit --stdin"
> +                git rev-list $opt <"$todo".miss >"$todo".miss+
> +                mv "$todo".miss+ "$todo".miss
> +
> +                # Check missing commits

Found a bug here, got an error message from git rev-list if
"$todo".miss is empty.

Now it looks like:
> 		# Check missing commits
> 		if test -s "$todo".miss
> 		then
> 			# Make the list user-friendly
> 			opt="--no-walk=sorted --format=oneline --abbrev-commit --stdin"
> 			git rev-list $opt <"$todo".miss >"$todo".miss+
> 			mv "$todo".miss+ "$todo".miss
> 
> 			warn "Warning: some commits may have been dropped" \

Thus the empty case is tested by the test -s of the warnings.

By the way, should I add --quiet to the options of the call to git
rev-list?

Rémi
--
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]