On Thu, 29 Sep 2011 20:27:43 +0200, René Scharfe wrote:
Am 29.09.2011 04:19, schrieb Julian Phillips:
Does the following help?
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 5e356a6..f0f4ca1 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -605,7 +605,7 @@ static int add_one_ref_to_rev_list_arg(const
char
*refname,
int flags,
void *cb_data)
{
- add_one_rev_list_arg(cb_data, refname);
+ add_one_rev_list_arg(cb_data, strdup(sha1_to_hex(sha1)));
return 0;
}
Hmm. Can we get rid of the multiple ref lookups fixed by the above
*and* the overhead of dealing with a textual argument list at the
same
time by calling add_pending_object directly, like this? (Factoring
out add_pending_sha1 should be a separate patch..)
Seems like a good idea. I get the same sort of times as with my patch,
but it makes the code _feel_ much nicer (and slightly smaller). Mine
was definitely more of a "it's 2am, but I think the problem is here"
type of patch ;)
--
Julian
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html