Re: [PROBE] cg-commit: show and enable editing of changes with --review

From: Junio C Hamano <junkio@cox.net>
Date: 2005-11-30 11:30:42
Jonas Fonseca <fonseca@diku.dk> writes:

> Show changes being commited as a patch appended to the commit message
> buffer. If the original patch is different from the patch extracted from
> the commit message file the original patch will be reverted and the edited
> patch applied before completing the commit.
>
> Due to limitations with cg-patch this can only be used when commiting
> from the project root directory. The error handling if the either the
> original patch or the edited patch does not apply is not optimal, since
> cg-patch will not report errors properly.

I do not do Porcelains, I am not a Cogito user, and I generally
do not like encouraging people who are playing an individual
developer role to commit something that has never existed in
their working tree (hence by definition never been tested),
but...

> +		echo "Updating changes to edited patch"
> +		# FIXME: Can only be run from the top level
> +		# FIXME: Is very 'fragile' error handling. We should probably
> +		# save the original patch in a local file for recovery?
> +		if ! cg-patch -R < $PATCH; then
> +			backup=$(mktemp commit-backup.XXXXXX)
> +			cp $PATCH $backup
> +			error_msg="unable to revert original patch, backup saved to $backup"

I suspect at least you should be able to use checkout-index for
the first one instead of cg-patch.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Nov 30 11:31:20 2005

This archive was generated by hypermail 2.1.8 : 2005-11-30 11:31:27 EST