From: Jonas Fonseca <fonseca@diku.dk>
To: Petr Baudis <pasky@ucw.cz>
Cc: git@vger.kernel.org
Subject: [PATCH] cg-object-id: accept $id when .git/refs/$id exists
Date: Wed, 30 Nov 2005 00:57:32 +0100 [thread overview]
Message-ID: <20051129235732.GA5365@diku.dk> (raw)
Makes the (universal) -r argument work better with tools like bisect.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
... until cg-object-id will use git-rev-parse.
commit c0a9b8feb79d72f7c02f37392da840dbad446dbd
tree 8a44e96d29c2171ce1915165ce84d1b1f3e27807
parent f3576824058588cf3fdeca0a8b5ae46b9d37a812
author Jonas Fonseca <fonseca@diku.dk> Mon, 28 Nov 2005 03:49:11 +0100
committer Jonas Fonseca <fonseca@antimatter.localdomain> Mon, 28 Nov 2005 03:49:11 +0100
cg-object-id | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cg-object-id b/cg-object-id
index f2cb54e..ec0362a 100755
--- a/cg-object-id
+++ b/cg-object-id
@@ -59,6 +59,9 @@ normalize_id()
elif [ -r "$_git/refs/heads/$id" ]; then
read id < "$_git/refs/heads/$id"
+ elif [ -r "$_git/refs/$id" ]; then
+ read id < "$_git/refs/$id"
+
# Short id's must be lower case and at least 4 digits.
elif [[ "$id" == [0-9a-f][0-9a-f][0-9a-f][0-9a-f]* ]]; then
idpref=${id:0:2}
--
Jonas Fonseca
reply other threads:[~2005-11-29 23:57 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=20051129235732.GA5365@diku.dk \
--to=fonseca@diku.dk \
--cc=git@vger.kernel.org \
--cc=pasky@ucw.cz \
/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).