Thread (16 messages) flat view 16 messages, 3 authors, 2016-06-15

Re: [Qgit RFC] commit --amend

From: Jan Hudec <hidden>
Date: 2016-06-15 22:43:19

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 [off-list ref]

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help