Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: David Aguilar <davvid@gmail.com>
Cc: git@vger.kernel.org, johannes.schindelin@gmx.de,
	markus.heidelberg@web.de, nick@incise.org
Subject: Re: [PATCH v3] diff: generate prettier filenames when using GIT_EXTERNAL_DIFF
Date: Mon, 25 May 2009 23:12:15 -0700	[thread overview]
Message-ID: <7vr5ycqtog.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1243316165-99065-1-git-send-email-davvid@gmail.com> (David Aguilar's message of "Mon\, 25 May 2009 22\:36\:05 -0700")

David Aguilar <davvid@gmail.com> writes:

> Naturally, prep_temp_blob() did not care about filenames.
> As a result, scripts that use GIT_EXTERNAL_DIFF ended up
> with filenames such as ".diff_XXXXXX".
>
> This specializes the GIT_EXTERNAL_DIFF code to generate
> prettier filenames.
>
> Diffing "name.ext" now generates "name.XXXX.ext".
> Diffing files with no extension now generates "name_XXXX".
>
> Signed-off-by: David Aguilar <davvid@gmail.com>
> ---
>
> I renamed a few variables and unrolled the inner loop in
> git_mkstemps() since the last patch to make things easier to read/review.

Thanks.

I actually think using mkstemps() where the function is natively
available, and using compat/mkstemps.c implementation where it is not, is
a saner approach.

It would make the implementation of git_mkstemps() easier to read, because
the interface to mkstemps(), even though it may not be in POSIX (nor in
glibc), is a well known quantity and people do not need to follow into its
implementation when they want to follow the logic of higher level code.

  parent reply	other threads:[~2009-05-26  6:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26  5:36 [PATCH v3] diff: generate prettier filenames when using GIT_EXTERNAL_DIFF David Aguilar
2009-05-26  6:01 ` Stephen Boyd
2009-05-26 17:37   ` David Aguilar
2009-05-26  6:12 ` Junio C Hamano [this message]
2009-05-26 20:31 ` Markus Heidelberg
2009-05-26 20:52   ` David Aguilar
2009-05-26 21:41     ` Junio C Hamano

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=7vr5ycqtog.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=markus.heidelberg@web.de \
    --cc=nick@incise.org \
    /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