Code

Merge branch 'jk/maint-tag-show-fixes' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 14 Feb 2012 07:31:27 +0000 (23:31 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Feb 2012 07:31:27 +0000 (23:31 -0800)
* jk/maint-tag-show-fixes:
  tag: do not show non-tag contents with "-n"
  tag: die when listing missing or corrupt objects
  tag: fix output of "tag -n" when errors occur

Conflicts:
t/t7004-tag.sh

1  2 
builtin/tag.c
t/t7004-tag.sh

diff --cc builtin/tag.c
Simple merge
diff --cc t/t7004-tag.sh
index e93ac73829f332cdbf53b05fcc611d4ea38c4c55,7687e62cc5c0366d69e1f6898a3181945c628799..4ef79aabc47a4ef2e9def65253edf6bcd8ce91a3
@@@ -586,6 -585,37 +586,19 @@@ test_expect_success 
        test_cmp expect actual
  '
  
 -# subsequent tests require gpg; check if it is available
 -gpg --version >/dev/null 2>/dev/null
 -if [ $? -eq 127 ]; then
 -      say "# gpg not found - skipping tag signing and verification tests"
 -else
 -      # As said here: http://www.gnupg.org/documentation/faqs.html#q6.19
 -      # the gpg version 1.0.6 didn't parse trust packets correctly, so for
 -      # that version, creation of signed tags using the generated key fails.
 -      case "$(gpg --version)" in
 -      'gpg (GnuPG) 1.0.6'*)
 -              say "Skipping signed tag tests, because a bug in 1.0.6 version"
 -              ;;
 -      *)
 -              test_set_prereq GPG
 -              ;;
 -      esac
 -fi
 -
+ test_expect_success 'annotations for blobs are empty' '
+       blob=$(git hash-object -w --stdin <<-\EOF
+       Blob paragraph 1.
+       Blob paragraph 2.
+       EOF
+       ) &&
+       git tag tag-blob $blob &&
+       echo "tag-blob        " >expect &&
+       git tag -n1 -l tag-blob >actual &&
+       test_cmp expect actual
+ '
  # trying to verify annotated non-signed tags:
  
  test_expect_success GPG \