{"thread":{"id":"37514","subject":"t2017 test failure in pu","startedAt":"2014-09-08T10:56:03Z","lastAt":"2014-09-08T10:56:03Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"249029","messageId":"540D8B43.9060806@ramsay1.demon.co.uk","threadId":"37514","inReplyTo":null,"subject":"t2017 test failure in pu","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2014-09-08T10:56:03Z","receivedAt":"2014-09-08T10:56:03Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Hi Junio,\n\nThe current 'pu' branch has a test failure for me, namely test\nt2017-checkout-orphan.sh #9.\n\nI had a quick squint at the conflict resolution in commit acdbdf99 and\nthe only thing that seemed relevant was the dropping of the\n'log_all_ref_updates' dance. So, I quickly put it back, like so:\n\n    diff --git a/builtin/checkout.c b/builtin/checkout.c\n    index 18a4519..de27a1b 100644\n    --- a/builtin/checkout.c\n    +++ b/builtin/checkout.c\n    @@ -602,9 +602,15 @@ static void update_refs_for_switch(const struct checkout_opts *opts,\n     \t\tif (opts->new_orphan_branch) {\n     \t\t\tif (opts->new_branch_log && !log_all_ref_updates) {\n     \t\t\t\tconst char *ref_name;\n    +\t\t\t\tint ret, temp;\n     \n     \t\t\t\tref_name = mkpath(\"refs/heads/%s\", opts->new_orphan_branch);\n    -\t\t\t\tif (create_reflog(ref_name)) {\n    +\t\t\t\ttemp = log_all_ref_updates;\n    +\t\t\t\tlog_all_ref_updates = 1;\n    +\t\t\t\tret = create_reflog(ref_name);\n    +\t\t\t\tlog_all_ref_updates = temp;\n    +\n    +\t\t\t\tif (ret) {\n     \t\t\t\t\tfprintf(stderr, _(\"Can not do reflog for '%s'\\n\"),\n     \t\t\t\t\t    opts->new_orphan_branch);\n     \t\t\t\t\treturn;\n\nand everything works again. (I've only just noticed that the 'dance'\nis now within a conditional such that \"!log_all_ref_updates\" is true, so\nthat the above can be simplified!)\n\nI guess 'create_reflog' should be called 'maybe_create_reflog' :-D\n\nHTH\n\nATB,\nRamsay Jones\n"}]}