git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: imyousuf@gmail.com
To: git@vger.kernel.org
Cc: spearce@spearce.org, Imran M Yousuf <imyousuf@smartitengineering.com>
Subject: [JGit Patch 5/6] Add script for adding second pack for test purpose
Date: Thu, 21 Aug 2008 08:47:27 +0600	[thread overview]
Message-ID: <1219286848-22758-5-git-send-email-imyousuf@gmail.com> (raw)
In-Reply-To: <1219286848-22758-4-git-send-email-imyousuf@gmail.com>

From: Imran M Yousuf <imyousuf@smartitengineering.com>

Forgot to add it last time and thus adding it before removing duplicate
resources.

Signed-off-by: Imran M Yousuf <imyousuf@smartitengineering.com>
---
 .../spearce/jgit/test/resources/create-second-pack |  136 ++++++++++++++++++++
 1 files changed, 136 insertions(+), 0 deletions(-)
 create mode 100755 org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/test/resources/create-second-pack

diff --git a/org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/test/resources/create-second-pack b/org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/test/resources/create-second-pack
new file mode 100755
index 0000000..03f83dc
--- /dev/null
+++ b/org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/test/resources/create-second-pack
@@ -0,0 +1,136 @@
+#!/bin/bash -ex
+
+export GIT_COMMITTER_NAME="A U Thor"
+export GIT_AUTHOR_NAME="A U Thor"
+export GIT_COMMITTER_EMAIL="a.u.thor@example.com"
+export GIT_AUTHOR_EMAIL="a.u.thor@example.com"
+
+test_tick () {
+	# from git/t/test-lib.sh
+	if test -z "${test_tick+set}"
+        then
+                test_tick=1112911993
+        else
+                test_tick=$(($test_tick + 60))
+        fi
+        GIT_COMMITTER_DATE="$test_tick -0700"
+        GIT_AUTHOR_DATE="$test_tick -0700"
+        export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
+}
+
+git_commit () {
+	test_tick
+	git commit "$@"
+}
+
+git_merge () {
+	test_tick
+	git merge "$@"
+
+}
+
+test_tick
+rm -rf .git *.txt ?
+git init
+echo "On master" >>master.txt
+git add master.txt
+git_commit -a -m "On master"
+
+echo "On master" >>master.txt
+git_commit -a -m "On master again"
+
+git checkout -b a 6c8b137b1c652731597c89668f417b8695f28dd7
+mkdir a
+
+echo a1 >>a/a1.txt
+git add a/a1.txt
+git_commit -a -m "First a/a1"
+
+echo a2 >>a/a2.txt
+git add a/a2.txt
+git_commit -a -m "First a/a2"
+
+git merge master
+
+echo a1 >>a/a1.txt
+git add a/a1.txt
+git_commit -a -m "Second a/a1"
+git branch pa
+
+echo a2 >>a/a2.txt
+git add a/a2.txt
+git_commit -a -m "Second a/a2"
+
+git checkout -b b 58be4659bb571194ed4562d04b359d26216f526e
+
+mkdir b
+echo b1 >>b/b1.txt
+git add b/b1.txt
+git_commit -a -m "First b/b1"
+
+echo b2 >>b/b2.txt
+git add b/b2.txt
+git_commit -a -m "First b/b2"
+
+git merge a
+
+echo b1 >>b/b1.txt
+git add b/b1.txt
+git_commit -a -m "Second b/b1"
+
+echo b2 >>b/b2.txt
+git add b/b2.txt
+git_commit -a -m "Second b/b2"
+
+rm -rf a b c master.txt
+mkdir c
+rm -f ./git/index
+echo ref: refs/heads/c >.git/HEAD
+
+echo c1 >>c/c1.txt
+git add c/c1.txt
+git_commit -a -m "First c/c1, no parent"
+
+echo c2 >>c/c2.txt
+git add c/c2.txt
+git_commit -a -m "First c/c2"
+
+git_merge a
+
+echo c1 >>c/c1.txt
+git add c/c2.txt
+git_commit -a -m "Second c/c1"
+
+echo c2 >>c/c2.txt
+git add c/c2.txt
+git_commit -a -m "Second c/c2"
+
+git_merge b
+
+git checkout -b d a
+
+echo "a1" >>a/a1
+git add a/a1
+git_commit -a -m "Third a/a1"
+
+git checkout -b e a
+
+echo "a1" >>a/a1
+git add a/a1
+git_commit -a -m "Fourth a/a1"
+
+git checkout master
+
+git_merge c d e
+
+git repack -d
+
+git tag A a
+git tag -a -m "An annotated tag" B a^
+
+git repack -d
+
+git pack-refs --all
+
+
+qgit --all master
-- 
1.5.6

      reply	other threads:[~2008-08-21  2:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21  2:47 [JGit Patch 1/6] Add a POM file for setting JGit library as a Maven project imyousuf
     [not found] ` <1219286848-22758-2-git-send-email-imyousuf@gmail.com>
2008-08-21  2:47   ` [JGit Patch 3/6] Add test resources directory as a classpath entry imyousuf
2008-08-21  2:47     ` [JGit Patch 4/6] Use test resources from classpath imyousuf
2008-08-21  2:47       ` imyousuf [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=1219286848-22758-5-git-send-email-imyousuf@gmail.com \
    --to=imyousuf@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=imyousuf@smartitengineering.com \
    --cc=spearce@spearce.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).