git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Hudec <bulb@ucw.cz>
To: Marco Costalba <mcostalba@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [Qgit RFC] commit --amend
Date: Mon, 2 Jul 2007 20:03:09 +0200	[thread overview]
Message-ID: <20070702180309.GA4400@efreet.light.src> (raw)
In-Reply-To: <e5bfff550707010909p4eba184ekff2025fb158a4aee@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2152 bytes --]

On Sun, Jul 01, 2007 at 18:09:37 +0200, Marco Costalba wrote:
> [...]
> QGit::run() and QGit::runAsync()
> [...]
>
> A bool is the only flag returned, because error detect is done at
> lower level, in MyProcess::sendErrorMsg() in file myprocess.cpp that
> handles the low level of running an external process and is called by
> run().
>
> In case of an error MyProcess::sendErrorMsg() is called to inform the
> GUI (a popup dialog box) about the error and the stderr output
> received.

Thanks. That's the bit I didn't see in MyProcess. Ok, so I'll simply return
from the function when some of the run()s return false.

> [...]
> Hope this helps.

Thanks.

> P.S: Why 'git-commit --amend -F' it's explicitely forbidden?

The logic for preparing the commit message seems to be incompatible in
git-commit.sh for some reason and whoever wrote it fobode those flags
together instead of making it compatible. In any case, the error is reported
in git-commit.sh:291-296:

case "$log_given" in
tt*)
	die "Only one of -c/-C/-F/--amend can be used." ;;
*tm*|*mt*)
	die "Option -m cannot be combined with -c/-C/-F/--amend." ;;
esac

And in any case the git policy is, that frontends should not be using
porcelain commands. What I would really like to see is something between
git-commit and git-commit-tree, that would:
 - run pre-commit hook
 - write-tree
 - commit-tree
 - update-ref
 - rerere
 - run post-commit hook
But it does not exist and git-gui obviously does that manually, so I did it
manually as well. Now I have to test it.

The other thing that didn't work (or at least from reading the code it seems
it couldn't) is commiting merges, because when commiting merge, filename
arguments are forbidden on git-commit.

Commiting merges will require some special handling, because you have to at
least commit all files that were merged. And you can't re-create pristine
index with read-tree the way normal commit does it either.

Unfortunately I don't fully understand -- and remember the right commands for
working with it -- the multi-stage index.

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-07-02 18:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-10 15:08 [Qgit RFC] commit --amend Jan Hudec
2007-06-10 22:10 ` Marco Costalba
2007-06-11  4:42   ` Jan Hudec
2007-06-11  5:24     ` Marco Costalba
2007-06-11  5:45     ` Marco Costalba
2007-07-01 12:26       ` Jan Hudec
2007-07-01 16:09         ` Marco Costalba
2007-07-02 18:03           ` Jan Hudec [this message]
2007-07-04  5:10             ` Junio C Hamano
2007-07-04 12:44               ` Marco Costalba
2007-07-04 18:28                 ` Jan Hudec
2007-07-04 19:51                   ` Junio C Hamano
2007-07-06  7:54                   ` Marco Costalba
2007-07-05 18:54       ` Jan Hudec
2007-07-06  8:12         ` Marco Costalba
2007-07-08 13:38           ` Jan Hudec
2007-07-08 13:49             ` Marco Costalba

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=20070702180309.GA4400@efreet.light.src \
    --to=bulb@ucw.cz \
    --cc=git@vger.kernel.org \
    --cc=mcostalba@gmail.com \
    /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).