git/list[1] front-page[2] threads[3] people[4] search[5] about
 

t2017 test failure in pu

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Sep 8, 2014, 10:56 UTC
Message-ID
<540D8B43.9060806@ramsay1.demon.co.uk>
Hi Junio,

The current 'pu' branch has a test failure for me, namely test t2017-checkout-orphan.sh #9.

I had a quick squint at the conflict resolution in commit acdbdf99 and the only thing that seemed relevant was the dropping of the 'log_all_ref_updates' dance. So, I quickly put it back, like so:

    diff --git a/builtin/checkout.c b/builtin/checkout.c
    index 18a4519..de27a1b 100644
    --- a/builtin/checkout.c
    +++ b/builtin/checkout.c
    @@ -602,9 +602,15 @@ static void update_refs_for_switch(const struct checkout_opts *opts,
     		if (opts->new_orphan_branch) {
     			if (opts->new_branch_log && !log_all_ref_updates) {
     				const char *ref_name;
    +				int ret, temp;
     
     				ref_name = mkpath("refs/heads/%s", opts->new_orphan_branch);
    -				if (create_reflog(ref_name)) {
    +				temp = log_all_ref_updates;
    +				log_all_ref_updates = 1;
    +				ret = create_reflog(ref_name);
    +				log_all_ref_updates = temp;
    +
    +				if (ret) {
     					fprintf(stderr, _("Can not do reflog for '%s'\n"),
     					    opts->new_orphan_branch);
     					return;

and everything works again. (I've only just noticed that the 'dance' is now within a conditional such that "!log_all_ref_updates" is true, so that the above can be simplified!)

I guess 'create_reflog' should be called 'maybe_create_reflog' :-D
HTH

ATB, Ramsay Jones

Message 1 of 1 in “t2017 test failure in pu”
  1. Ramsay JonesSep 8, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.