git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git <git@vger.kernel.org>, Marco Costalba <mcostalba@yahoo.it>
Subject: Re: qgit reports errors in the git repository
Date: Thu, 15 Dec 2005 00:27:57 -0500	[thread overview]
Message-ID: <1134624477.5360.6.camel@dv> (raw)
In-Reply-To: <Pine.LNX.4.64.0512121700010.15597@g5.osdl.org>

On Mon, 2005-12-12 at 17:06 -0800, Linus Torvalds wrote:
> 
> Basically, qgit should do either:
> 
>  - check the type of the object by hand first (using "git-cat-file -t" and 
>    then follow any tags it finds by hand)

I'm a complete Qt newbie, but this patch seems to work for me.

Signed-off-by: Pavel Roskin <proski@gnu.org>

diff --git a/src/git_startup.cpp b/src/git_startup.cpp
index e08d466..1f6e9ad 100644
--- a/src/git_startup.cpp
+++ b/src/git_startup.cpp
@@ -111,6 +111,10 @@ bool Git::getRefs() {
 
 		if (itNext != rLst.constEnd() && (*itNext).right(3) == "^{}") {
 			signedTag = true;
+			if (!run("git-cat-file -t " + refSha, &runOutput))
+				continue; // invalid SHA1
+			if (runOutput != "tag\n")
+				continue; // not a tag
 			if (run("git-cat-file tag " + refSha, &runOutput)) {
 				QString msg(runOutput.section("\n\n", 1));
 				if (!msg.isEmpty())


-- 
Regards,
Pavel Roskin

  reply	other threads:[~2005-12-15  5:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-13  0:24 qgit reports errors in the git repository Pavel Roskin
2005-12-13  1:06 ` Linus Torvalds
2005-12-15  5:27   ` Pavel Roskin [this message]
     [not found]     ` <e5bfff550512150501v48bb65abwf44b3fc21f33bdf6@mail.gmail.com>
2005-12-15 16:44       ` Pavel Roskin
     [not found]         ` <e5bfff550512151100k33a66db5tdb2eb1ff2da10a59@mail.gmail.com>
2005-12-16  0:35           ` Pavel Roskin
     [not found]             ` <e5bfff550512152258t3f7b2eb1i1c709572b18fe3f7@mail.gmail.com>
     [not found]               ` <1134757942.2248.11.camel@dv>
     [not found]                 ` <e5bfff550512161247v4c187cc0gedae8234d454c3b6@mail.gmail.com>
2005-12-16 21:37                   ` Junio C Hamano
2005-12-17  6:55                   ` Junio C Hamano
     [not found]                     ` <e5bfff550512170044v59f96262ica6511e981889ea9@mail.gmail.com>
2005-12-17  9:36                       ` Junio C Hamano
2005-12-20  2:11                       ` Pavel Roskin

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=1134624477.5360.6.camel@dv \
    --to=proski@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=mcostalba@yahoo.it \
    --cc=torvalds@osdl.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).