git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH] t3400 (rebase): add failing test for a peculiar rev spec
Date: Fri, 19 Apr 2013 10:53:37 -0700	[thread overview]
Message-ID: <7vy5ce1k66.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CALkWK0=RDCCSxOJ2TU4=tniSRTg9VJohJ8Pf6uN9E=fd3jg=_Q@mail.gmail.com> (Ramkumar Ramachandra's message of "Fri, 19 Apr 2013 13:13:46 +0530")

Ramkumar Ramachandra <artagnon@gmail.com> writes:

> Junio C Hamano wrote:
>>         peel_committish () {
>>                 case "$1" in
>>                 :/*)
>>                         peeltmp=$(git rev-parse --verify "$1") &&
>>                         git rev-parse --verify "$peeltmp^0"
>>                         ;;
>>                 *)
>>                         git rev-parse --verify "$1^0"
>>                         ;;
>>                 esac
>>         }
>
> Thanks.  Yeah, that's the obvious "hack solution": special handling
> for refspecs of the kind :/text.

By the way, that is not a "hack", but is merely "working within the
given constraints".  Welcome to the real life.

Unlike "rebase" that has the luxury of possibly update the
underlying plumbing, third-party tools have to work within the
constraints of existing versions of Git.  It is better to learn that
you sometimes need to do so, and how to do so when you need to.

      parent reply	other threads:[~2013-04-19 17:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18  8:52 [PATCH] t3400 (rebase): add failing test for a peculiar rev spec Ramkumar Ramachandra
2013-04-18 16:39 ` Junio C Hamano
2013-04-19  7:43   ` Ramkumar Ramachandra
2013-04-19 16:21     ` Junio C Hamano
2013-04-19 17:28       ` Junio C Hamano
2013-04-19 17:53     ` 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=7vy5ce1k66.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=artagnon@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 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).