git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonas Fonseca <fonseca@diku.dk>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PROBE] cg-commit: show and enable editing of changes with --review
Date: Thu, 1 Dec 2005 14:20:25 +0100	[thread overview]
Message-ID: <20051201132025.GA3874@diku.dk> (raw)
In-Reply-To: <7vbr03564t.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano <junkio@cox.net> wrote Tue, Nov 29, 2005:
> 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 curious since you have also used this phrase in the past: didn't
you do your own jit porcelain once and are you saying that git does not
ship with it's own porcelain?

> 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...

I see your point. I mostly intend to use it for fixing small typos in
comments and documentation. It can help to cure some "post-commit
stress".  Also I hope you will agree that it is always a good idea to
review your changes one more time although I agree it might be a little
silly.

> > +		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.

Oh, great, thanks. I guess I should work some more on the git docs to
get to know these kind of things.

-- 
Jonas Fonseca

      reply	other threads:[~2005-12-01 13:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-30  0:01 [PROBE] cg-commit: show and enable editing of changes with --review Jonas Fonseca
2005-11-30  0:30 ` Junio C Hamano
2005-12-01 13:20   ` Jonas Fonseca [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051201132025.GA3874@diku.dk \
    --to=fonseca@diku.dk \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).