git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 1/3] t5403.1: simplify commit creation
Date: Wed, 12 Oct 2011 20:35:03 +1100	[thread overview]
Message-ID: <1318412105-13595-1-git-send-email-pclouds@gmail.com> (raw)


Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 t/t5403-post-checkout-hook.sh |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/t/t5403-post-checkout-hook.sh b/t/t5403-post-checkout-hook.sh
index d05a913..0c126d7 100755
--- a/t/t5403-post-checkout-hook.sh
+++ b/t/t5403-post-checkout-hook.sh
@@ -9,11 +9,8 @@ test_description='Test the post-checkout hook.'
 test_expect_success setup '
 	echo Data for commit0. >a &&
 	echo Data for commit0. >b &&
-	git update-index --add a &&
-	git update-index --add b &&
-	tree0=$(git write-tree) &&
-	commit0=$(echo setup | git commit-tree $tree0) &&
-	git update-ref refs/heads/master $commit0 &&
+	git add a b &&
+	git commit -m setup &&
 	git clone ./. clone1 &&
 	git clone ./. clone2 &&
 	GIT_DIR=clone2/.git git branch new2 &&
-- 
1.7.3.1.256.g2539c.dirty

             reply	other threads:[~2011-10-12  9:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-12  9:35 Nguyễn Thái Ngọc Duy [this message]
2011-10-12  9:35 ` [PATCH 2/3] t5403: convert leading spaces to tabs Nguyễn Thái Ngọc Duy
2011-10-12  9:35 ` [PATCH 3/3] t5403: do not use access repos with GIT_DIR when worktree is involved Nguyễn Thái Ngọc Duy
2011-10-13  4:27   ` Junio C Hamano
2011-10-13  4:54     ` Nguyen Thai Ngoc Duy
2011-10-12 14:14 ` [PATCH 1/3] t5403.1: simplify commit creation Johannes Sixt
2011-10-13  3:54   ` Nguyen Thai Ngoc Duy

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=1318412105-13595-1-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).