All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Staudt <koraktor@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	Duy Nguyen <pclouds@gmail.com>,
	Sebastian Staudt <koraktor@gmail.com>
Subject: [PATCH v5 2/2] t6120: test for describe with a bare repository
Date: Sun,  3 Feb 2019 07:00:25 +0100	[thread overview]
Message-ID: <20190203060025.7486-2-koraktor@gmail.com> (raw)
In-Reply-To: <20190203060025.7486-1-koraktor@gmail.com>

This ensures that nothing breaks the basic functionality of describe for
bare repositories. Please note that --broken and --dirty need a working
tree.

Signed-off-by: Sebastian Staudt <koraktor@gmail.com>
---
 t/t6120-describe.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index a9e3bf0ce0..ee5b03ee18 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -143,6 +143,12 @@ test_expect_success 'rename tag Q back to A' '
 test_expect_success 'pack tag refs' 'git pack-refs'
 check_describe A-* HEAD
 
+test_expect_success 'describe works from outside repo using --git-dir' '
+	git clone --bare "$TRASH_DIRECTORY" "$TRASH_DIRECTORY/bare" &&
+	git --git-dir "$TRASH_DIRECTORY/bare" describe >out &&
+	grep "^A-[1-9][0-9]\?-g[0-9a-f]\+$" out
+'
+
 check_describe "A-*[0-9a-f]" --dirty
 
 test_expect_success 'describe --dirty with --work-tree' '
-- 
2.20.1


      reply	other threads:[~2019-02-03  6:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-03  6:00 [PATCH v5 1/2] describe: setup working tree for --dirty Sebastian Staudt
2019-02-03  6:00 ` Sebastian Staudt [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=20190203060025.7486-2-koraktor@gmail.com \
    --to=koraktor@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.