git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marco Costalba" <mcostalba@gmail.com>
To: "Jan Hudec" <bulb@ucw.cz>
Cc: "Junio C Hamano" <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [Qgit RFC] commit --amend
Date: Fri, 6 Jul 2007 09:54:54 +0200	[thread overview]
Message-ID: <e5bfff550707060054qdbe7e50ic217b8ed6927408e@mail.gmail.com> (raw)
In-Reply-To: <20070704182806.GA3268@efreet.light.src>

On 7/4/07, Jan Hudec <bulb@ucw.cz> 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 <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

  parent reply	other threads:[~2007-07-06  7:55 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
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 [this message]
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=e5bfff550707060054qdbe7e50ic217b8ed6927408e@mail.gmail.com \
    --to=mcostalba@gmail.com \
    --cc=bulb@ucw.cz \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).