All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: David Aguilar <davvid@gmail.com>
Cc: Fabian Ruch <bafain@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] t1503: test rev-parse --verify --quiet with deleted reflogs
Date: Mon, 15 Sep 2014 11:25:42 -0700	[thread overview]
Message-ID: <xmqqppew7nbt.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140914185403.GA93515@gmail.com> (David Aguilar's message of "Sun, 14 Sep 2014 11:54:04 -0700")

David Aguilar <davvid@gmail.com> writes:

>> > +test_expect_success 'fails silently when using -q with deleted reflogs' '
>> > +	ref=$(git rev-parse HEAD) &&
>> > +	: >.git/logs/refs/test &&
>> > +	git update-ref -m test refs/test "$ref" &&
>> 
>> I'm just curious, why not simply
>> 
>>    git branch test
>> ?
>
> Maybe it's a bad reason, but I wanted to replicate the behavior
> that git stash expects -- it writes to a ref outside of
> refs/heads/.  I thought it'd be good to exercise that same
> machinery since it will involve different code paths.

I think that is a very sensible thing to do.  Another reason to
avoid using "branch" when you care about what "update-ref" does is
that "branch" does more than what "update-ref" does.

      parent reply	other threads:[~2014-09-15 18:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-14  8:30 [PATCH] t1503: test rev-parse --verify --quiet with deleted reflogs David Aguilar
2014-09-14 16:20 ` Fabian Ruch
2014-09-14 18:54   ` David Aguilar
2014-09-15 18:17     ` Junio C Hamano
2014-09-15 18:25     ` Junio C Hamano [this message]

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=xmqqppew7nbt.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=bafain@gmail.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.