git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* reversion in GIT_COMMON_DIR refs path
@ 2017-05-16 17:10 Joey Hess
  2017-05-16 17:50 ` Ævar Arnfjörð Bjarmason
  2017-05-19 14:37 ` reversion in GIT_COMMON_DIR refs path Joey Hess
  0 siblings, 2 replies; 14+ messages in thread
From: Joey Hess @ 2017-05-16 17:10 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Nguyễn Thái Ngọc Duy, Peter Simons

Bisecting this test suite failure
https://git-annex.branchable.com/git-annex_in_nixpkgs_fails_with_git-2.13.0/
I landed on commit f57f37e2e1bf11ab4cdfd221ad47e961ba9353a0 to git.

It seems that changed resolving refs paths when GIT_DIR and GIT_COMMON_DIR
are both set. While before refs were looked for in GIT_COMMON_DIR,
now they're not.

Test case:

#!/bin/sh
set -e
set -x
rm -rf testdir
git init testdir
cd testdir
echo 1 > foo
git add foo
git commit -m add
mkdir dummy
mkdir dummy/overlay
cp .git/index .git/HEAD dummy/overlay
#cp .git/refs .git/packed-refs dummy/overlay -a
cd dummy
export GIT_COMMON_DIR=`pwd`/../.git
export GIT_DIR=`pwd`/overlay
git rev-parse --git-path refs/heads/master
git show refs/heads/master

This script succeeds with git 2.11.0, but with 2.13.0, it fails:

fatal: ambiguous argument 'refs/heads/master': unknown revision or path not in the working tree.

It seems to be failing to look up refs in GIT_COMMON_DIR.
Note that uncommenting the commented out line in the script, to copy the refs
into GIT_DIR, makes it succeed.

git rev-parse --git-path refs/heads/master shows the GIT_COMMON_DIR/refs path
still (as gitrepository-layout documents). So this reversion made
different parts of git disagreeing about the refs path.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-05-22 11:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-16 17:10 reversion in GIT_COMMON_DIR refs path Joey Hess
2017-05-16 17:50 ` Ævar Arnfjörð Bjarmason
2017-05-16 17:59   ` Joey Hess
2017-05-16 20:37     ` [PATCH] tests: add an optional test to test git-annex Ævar Arnfjörð Bjarmason
2017-05-16 22:10       ` Joey Hess
2017-05-17  2:45       ` Junio C Hamano
2017-05-17  6:47         ` Ævar Arnfjörð Bjarmason
2017-05-17 10:19           ` Junio C Hamano
2017-05-17 19:33             ` Ævar Arnfjörð Bjarmason
2017-05-17 23:03               ` Stefan Beller
2017-05-17 23:59                 ` Brandon Williams
2017-05-17 23:56             ` Brandon Williams
2017-05-19 14:37 ` reversion in GIT_COMMON_DIR refs path Joey Hess
2017-05-22 11:11   ` Duy Nguyen

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).