t2017 test failure in pu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]