public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsay1•demon.co.uk>
To: Junio C Hamano <gitster@pobox•com>
Cc: GIT Mailing-list <git@vger•kernel.org>
Subject: t2017 test failure in pu
Date: Mon, 08 Sep 2014 11:56:03 +0100	[thread overview]
Message-ID: <540D8B43.9060806@ramsay1.demon.co.uk> (raw)

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

                 reply	other threads:[~2014-09-08 10:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=540D8B43.9060806@ramsay1.demon.co.uk \
    --to=ramsay@ramsay1$(echo .)demon.co.uk \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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