Re: [Qgit RFC] commit --amend
- From
- Marco Costalba <mcostalba@gmail.com>
- Date
- Jul 6, 2007, 07:54 UTC
- Message-ID
- <e5bfff550707060054qdbe7e50ic217b8ed6927408e@mail.gmail.com>
- In-Reply-To
- <20070704182806.GA3268@efreet.light.src>
On 7/4/07, Jan Hudec <bulb@ucw.cz> wrote:
Show 6 quoted lines
> > > 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.
Show 25 quoted lines
> > Having said that, from '-F' option documentation: > > > > -F <file>:: > > 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