From: André Goddard Rosa <hidden> Date: 2016-06-15 22:43:53
Hi, all!
Please cc: me as I'm not subscribed. I'm sending the patch inline
only for review, probably it is mangled.
Please use the attached patch if you agree with it. Sorry about
sending it attached.
From b6b05d9f8d8e053df4e971cd229e03b778c4d163 Mon Sep 17 00:00:00 2001
From: Andre Goddard Rosa <redacted>
Date: Tue, 27 Nov 2007 10:17:54 -0200
Subject: [PATCH] Avoid recalculating filename string pointer.
Signed-off-by: Andre Goddard Rosa <redacted>
---
fast-import.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
From: Mike Hommey <hidden> Date: 2016-06-15 22:43:53
On Wed, Nov 21, 2007 at 10:59:41PM -0200, André Goddard Rosa wrote:
quoted hunk
--- a/fast-import.c+++ b/fast-import.c
@@ -2304,11 +2304,13 @@ int main(int argc, const char **argv)elseif(!prefixcmp(a,"--export-marks="))mark_file=a+15;elseif(!prefixcmp(a,"--export-pack-edges=")){+char*filename=a+20;+if(pack_edges)fclose(pack_edges);-pack_edges=fopen(a+20,"a");+pack_edges=fopen(filename,"a");if(!pack_edges)-die("Cannot open %s: %s",a+20,strerror(errno));+die("Cannot open %s: %s",filename,strerror(errno));}elseif(!strcmp(a,"--force"))force_update=1;elseif(!strcmp(a,"--quiet"))
Normally, the compiler takes care of such optimizations. It actually
takes care of it much better than you can do yourself, and doing it
yourself can even sometimes generate less optimized code because it
gets in the compiler optimizations'way.
Mike