From: Marco Costalba Date: Fri, 06 Jul 2007 07:54:54 GMT Subject: Re: [Qgit RFC] commit --amend Message-ID: In-Reply-To: <20070704182806.GA3268@efreet.light.src> On 7/4/07, Jan Hudec wrote: > > > 3- More robust to API change > > 4- Less easy to break by changes in git. > > Actually, no. The porcelains are more likely to change than the plumbing. > Well, changing internal API does not break compatibility, _modifying_ user commands behaviour yes and you need to release a new version for this. If for "change" you mean adding stuff then, yes, I agree with you, but adding stuff is not a problem. > > Having said that, from '-F' option documentation: > > > > -F :: > > Take the commit message from the given file. Use '-' to > > read the message from the standard input. > > > > Jan, what about to use '-' and feed message from stdin? > > I actually am, because I am rewriting it to use plumbing, which means > git-write-tree and git-commit-tree directly. And git-commit-tree always reads > commit message from stdin. > > > Indeed the full signature of run() is: > > > > bool Git::run(SCRef runCmd, QString* runOutput, QObject* receiver, SCRef > > buf) > > > > Where the last parameter 'buf' it's a string that, if not empty, is > > passed to the launched program stdin. > > ... except if I read the code correctly, it will create a temporary file > anyway. The comment in QGit::startProcess says it is because of windows, but > there is nothing to disable it in Unix, so to me it seems temporary file is > used anyway. > Yes you are right, but the file is redirected to process stdin by the call proc->setStandardInputFile() just below the comment you reported. I can assure you it works because to read file names it is used "git diff-tree -r -C --stdin" without problems. Sorry for mt late reply, but I'm abroad this week and can access the email only seldom. Marco