All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: David Turner <dturner@twopensource.com>, git@vger.kernel.org
Cc: David Turner <dturner@twitter.com>
Subject: Re: [PATCH 3/3] cache-tree: Write index with updated cache-tree after commit
Date: Tue, 01 Jul 2014 06:26:19 +0200	[thread overview]
Message-ID: <53B2386B.4060802@web.de> (raw)
In-Reply-To: <1404173597-24713-3-git-send-email-dturner@twitter.com>

[]

diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh
index 5383258..d50acb8 100755
--- a/t/t0090-cache-tree.sh
+++ b/t/t0090-cache-tree.sh
@@ -16,8 +16,31 @@ cmp_cache_tree () {
  # We don't bother with actually checking the SHA1:
  # test-dump-cache-tree already verifies that all existing data is
  # correct.
+generate_expected_cache_tree () {
+	if [ -n "$1" ]
+	then
+		local dir="$1/"
+	else
+		local dir="$1"
+	fi

I think the Git test cases prefer "test" over "[]":

	if test -n "$1"
	then
		local dir="$1/"
	else
		local dir="$1"
	fi

And should there be a && after the "fi" ?
And as test -n tests for a non-zero string,
could we write like this (and drop the local ?)?

	if test -n "$1"
	then
		dir="$1/"
	else
		dir=""
	fi

  reply	other threads:[~2014-07-01  4:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01  0:13 [PATCH 1/3] cache-tree: Create/update cache-tree on checkout David Turner
2014-07-01  0:13 ` [PATCH 2/3] test-dump-cache-tree: Improve output format and exit code David Turner
2014-07-01  4:43   ` Eric Sunshine
2014-07-01  0:13 ` [PATCH 3/3] cache-tree: Write index with updated cache-tree after commit David Turner
2014-07-01  4:26   ` Torsten Bögershausen [this message]
2014-07-01  5:49     ` Johannes Sixt
2014-07-01  4:16 ` [PATCH 1/3] cache-tree: Create/update cache-tree on checkout Torsten Bögershausen
2014-07-01 19:15   ` David Turner
2014-07-01 21:03     ` Junio C Hamano
2014-07-01 22:09       ` David Turner
2014-07-01 20:15 ` Junio C Hamano
2014-07-06  4:04   ` David Turner
2014-07-07 16:58     ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2014-07-01 19:14 David Turner
2014-07-01 19:14 ` [PATCH 3/3] cache-tree: Write index with updated cache-tree after commit David Turner
2014-07-01 22:45   ` Junio C Hamano
2014-07-01 22:58     ` David Turner
2014-06-28  0:20 [PATCH 1/3] cache-tree: Create/update cache-tree on checkout David Turner
2014-06-28  0:20 ` [PATCH 3/3] cache-tree: Write index with updated cache-tree after commit David Turner
2014-06-30 18:10   ` Junio C Hamano

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=53B2386B.4060802@web.de \
    --to=tboegi@web.de \
    --cc=dturner@twitter.com \
    --cc=dturner@twopensource.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 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.