From: Paul Smith <paul@mad-scientist.net>
To: git@vger.kernel.org
Subject: profile-fast is failing in my Git 2.2.1 build from tar in a Git repo
Date: Sun, 04 Jan 2015 16:58:43 -0500 [thread overview]
Message-ID: <1420408723.7095.207.camel@homebase> (raw)
Is anyone aware of this? It seems that profile-fast fails when invoked
from a downloaded tarball, if you are in a Git repository when you
unpack it.
So, for example, I have:
$ cd $HOME/src
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
(this is NOT the Git source repo, this is my personal repo containing
scripts used to build various source packages)
Then I download git-2.2.1.tar.xz, unpack it, configure, and run "make
profile-fast".
After it builds everything it starts trying to run the tests, and the
t/perf/run script fails (I added some -x flags in the scripts):
=== Running 9 tests in this tree ===
cp: cannot stat '/home/psmith/src/git-2.2.1/t/..//home/psmith/src/.git/objects': No such file or directory
error: failed to copy repository '/home/psmith/src/git-2.2.1/t/..' to '/home/psmith/src/git-2.2.1/t/perf/trash directory.p0000-perf-lib-sanity'
The problem is in the t/perf/perf-lib.sh:test_perf_create_repo_from()
function, where we see this:
repo="$1"
source="$2"
source_git=$source/$(cd "$source" && git rev-parse --git-dir)
The function is invoked as:
test_perf_create_repo_from '/home/psmith/src/git-2.2.1/t/perf/trash directory.p5302-pack-index' /home/psmith/src/git-2.2.1/t/..
but this doesn't work, because "$source" is not a Git repository; it's
the root of the unpacked tarball. But when we run "git rev-parse" in
it, it finds the parent Git directory ($HOME/git) and uses that, so the
value of source_git becomes:
/home/psmith/src/git-2.2.1/t/..//home/psmith/src/.git/objects
which is obviously invalid. I think you want source_git to be set
something like this:
source_git=$(cd "$source" && git rev-parse --git-dir || echo "$source")
instead. There are other ways to do this of course, but this worked for
me... basically we want to use either git rev-parse OR $source but not
both. I think...?
next reply other threads:[~2015-01-04 21:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-04 21:58 Paul Smith [this message]
2015-01-06 23:13 ` profile-fast is failing in my Git 2.2.1 build from tar in a Git repo Junio C Hamano
2015-01-12 21:08 ` Jeff King
2015-01-12 21:16 ` Jeff King
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=1420408723.7095.207.camel@homebase \
--to=paul@mad-scientist.net \
--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.