From: Paul Jackson <pj@sgi.com>
To: pasky@ucw.cz
Cc: git@vger.kernel.org
Subject: Re: optimize gitdiff-do script
Date: Mon, 18 Apr 2005 08:23:34 -0700 [thread overview]
Message-ID: <20050418082334.25359013.pj@sgi.com> (raw)
In-Reply-To: <20050416171009.0bedbab4.pj@sgi.com>
Pasky,
Looks like a couple of questions I asked over the weekend
got lost along the way.
1) How do you want me to fix the indentation on my patch
to optimize gitdiff-do script:
- forget my first patch and resend from scratch, or
- a second patch restoring indentation, on top of my first one.
2) Would you be interested in a patch that used a more robust tmp
file creation, along the lines of replacing
t=${TMPDIR:-/usr/tmp}/gitdiff.$$
trap 'set +f; rm -fr $t.?; trap 0; exit 0' 0 1 2 3 15
with:
tmp=${TMPDIR-/tmp}
tmp=$tmp/gitdiff-do.$RANDOM.$RANDOM.$RANDOM.$$
(umask 077 && mkdir $tmp) || {
echo "Could not create temporary directory! Exiting." 1>&2
exit 1
}
trap 'rm -fr $tmp; trap 0; exit 0' 0 1 2 3 15
t=$tmp/tmp
From the www.linuxsecurity.com link that Dave Jones provided, the
above $tmp directory is about as good as using mktemp, while
avoiding both dependency on mktemp options not everyone has.
3) If interested in (2), would you want it instead of my previous mktemp
removal patch, or on top of it?
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@engr.sgi.com> 1.650.933.1373, 1.925.600.0401
next prev parent reply other threads:[~2005-04-18 15:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-16 23:27 [PATCH] fix mktemp (remove mktemp ;) Paul Jackson
2005-04-16 23:27 ` [PATCH] missing mkdir -p flag in gitdiff-do Paul Jackson
2005-04-16 23:28 ` [PATCH] optimize gitdiff-do script Paul Jackson
2005-04-16 23:43 ` Petr Baudis
2005-04-17 0:10 ` Paul Jackson
2005-04-18 15:23 ` Paul Jackson [this message]
2005-04-18 18:30 ` Petr Baudis
2005-04-18 19:17 ` Paul Jackson
2005-05-10 2:56 ` Paul Jackson
2005-04-16 23:36 ` [PATCH] fix mktemp (remove mktemp ;) Jan-Benedict Glaw
2005-04-16 23:46 ` Paul Jackson
2005-04-16 23:37 ` Petr Baudis
2005-04-17 0:02 ` Paul Jackson
2005-04-17 0:33 ` Dave Jones
2005-04-17 0:44 ` Paul Jackson
2005-04-17 0:57 ` Dave Jones
2005-04-17 1:03 ` David Lang
2005-04-17 1:15 ` Paul Jackson
2005-04-17 2:38 ` Brian O'Mahoney
2005-04-17 2:46 ` Paul Jackson
2005-04-17 0:51 ` Erik van Konijnenburg
2005-04-17 1:18 ` Paul Jackson
2005-04-18 3:01 ` Herbert Xu
2005-04-18 4:47 ` Paul Jackson
2005-04-18 12:12 ` Florian Weimer
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=20050418082334.25359013.pj@sgi.com \
--to=pj@sgi.com \
--cc=git@vger.kernel.org \
--cc=pasky@ucw.cz \
/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).