From: Junio C Hamano <gitster@pobox.com>
To: Pieter de Bie <pdebie@ai.rug.nl>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Git Mailinglist <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] builtin-reflog: fix deletion of HEAD entries
Date: Sat, 09 Aug 2008 18:01:41 -0700 [thread overview]
Message-ID: <7vd4kh4r9m.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vhc9t4s2c.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Sat, 09 Aug 2008 17:44:27 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Pieter de Bie <pdebie@ai.rug.nl> writes:
>
>> dwim_ref() used to resolve HEAD to its symlink (like refs/heads/master),
>> making a call to 'git reflog delete HEAD@{1}' to actually delete the second
>> entry in the master reflog.
>>
>> This patch makes a special case for HEAD (as that's the only non-branch
>> reflog we keep), fixing the issue.
>
> What happens to remotes/origin/HEAD that points at remotes/origin/master?
Perhaps this might work better?
builtin-reflog.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-reflog.c b/builtin-reflog.c
index 0c34e37..a48f664 100644
--- a/builtin-reflog.c
+++ b/builtin-reflog.c
@@ -604,7 +604,7 @@ static int cmd_reflog_delete(int argc, const char **argv, const char *prefix)
continue;
}
- if (!dwim_ref(argv[i], spec - argv[i], sha1, &ref)) {
+ if (!dwim_log(argv[i], spec - argv[i], sha1, &ref)) {
status |= error("%s points nowhere!", argv[i]);
continue;
}
next prev parent reply other threads:[~2008-08-10 1:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-09 23:33 [PATCH 1/2] reflog test: add more tests for 'reflog delete' Pieter de Bie
2008-08-09 23:33 ` [PATCH 2/2] builtin-reflog: fix deletion of HEAD entries Pieter de Bie
2008-08-10 0:44 ` Junio C Hamano
2008-08-10 1:01 ` Junio C Hamano [this message]
2008-08-10 9:35 ` Pieter de Bie
2008-08-10 11:12 ` Johannes Sixt
2008-08-10 18:52 ` Junio C Hamano
2008-08-10 19:04 ` Pieter de Bie
2008-08-10 20:22 ` [PATCH] builtin-reflog: Allow reflog expire to name partial ref Pieter de Bie
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=7vd4kh4r9m.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=pdebie@ai.rug.nl \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).