git-bisect broken in 1.2.4
Subsystems (2)
Did SuSE just pick up a bad version of git, 1.2.4? git-bisect doesnt work correctly in the kernel sources, .git/HEAD doesnt contain the commit id anymore, but 'ref: refs/heads/bisect'
CONFIG_LOCALVERSION_AUTO depends on the id.
Quoted 5 lines · Olaf Hering
Did SuSE just pick up a bad version of git, 1.2.4? git-bisect doesnt work correctly in the kernel sources, .git/HEAD doesnt contain the commit id anymore, but 'ref: refs/heads/bisect'
CONFIG_LOCALVERSION_AUTOdepends on the id.
Probably you should update to at least linux-v2.6.15-g117a93d. The script to determine the localversion[1] depends on .git/HEAD being a symlink.
Since
git-1.1.4-g2fabd21
.git/HEAD isn't a symlink any more (per default at least).
You can rebuild git with USE_SYMLINK_HEAD if you really want the old behaviour.
Best regards,
Uwe
[1] scripts/setlocalversion
Signature · 3 lines
Uwe Zeisberger http://www.google.com/search?q=gigabyte+in+bit
Quoted 10 lines · Uwe Zeisberger
Quoted 5 lines · Olaf Hering
Did SuSE just pick up a bad version of git, 1.2.4? git-bisect doesnt work correctly in the kernel sources, .git/HEAD doesnt contain the commit id anymore, but 'ref: refs/heads/bisect'
CONFIG_LOCALVERSION_AUTOdepends on the id.Probably you should update to at least linux-v2.6.15-g117a93d. The script to determine the localversion[1] depends on .git/HEAD being a symlink.
Quoted 5 lines
Since
git-1.1.4-g2fabd21.git/HEAD isn't a symlink any more (per default at least).
Ouch. Although what Uwe says is all correct, we should not say "don't try kernel older than 2615-117a". That makes bisect rather useless.
Quoted 2 lines
You can rebuild git with
USE_SYMLINK_HEADif you really want the old behaviour.
That probably is a sane thing to do.
We should introduce prefer_symlink_refs configuration to work with projects whose older version of build infrastructure depends on symlink refs.
The patch is on top of post 1.3.1 git, but .c and .h part should apply more-or-less cleanly to older code base. You should be able to say:
[core]
prefersymlinkrefs = truein .git/config file, maybe do "git checkout -f master" to switch branch and make .git/HEAD into symlink, and do the bisect again.
Sorry for the screwup.
-- >8 --
Documentation/config.txt +5 -3
@@ -64,9 +64,11 @@ core.ignoreStat:: slow, such as Microsoft Windows. See gitlink:git-update-index[1]. False by default. -core.onlyUseSymrefs:: - Always use the "symref" format instead of symbolic links for HEAD - and other symbolic reference files. True by default. +core.preferSymlinkRefs:: + Instead of the default "symref" format for HEAD + and other symbolic reference files, use symbolic links. + This is sometimes needed to work with old scripts that + expect HEAD to be a symbolic link. core.repositoryFormatVersion:: Internal variable identifying the repository format and layout
Makefile +6 -2
@@ -28,8 +28,8 @@ # Define NO_STRCASESTR if you don't have # # Define NO_SETENV if you don't have setenv in the C library. # -# Define USE_SYMLINK_HEAD if you want .git/HEAD to be a symbolic link. -# Don't enable it on Windows. +# Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link. +# Enable it on Windows. By default, symrefs are still used. # # Define PPC_SHA1 environment variable when running make to make use of # a bundled SHA1 routine optimized for PowerPC.
@@ -265,6 +265,7 @@ ifeq ($(uname_O),Cygwin) NO_D_TYPE_IN_DIRENT = YesPlease NO_D_INO_IN_DIRENT = YesPlease NO_STRCASESTR = YesPlease + NO_SYMLINK_HEAD = YesPlease NEEDS_LIBICONV = YesPlease # There are conflicting reports about this. # On some boxes NO_MMAP is needed, and not so elsewhere.
@@ -388,6 +389,9 @@ endif ifdef NO_D_INO_IN_DIRENT ALL_CFLAGS += -DNO_D_INO_IN_DIRENT endif +ifdef NO_SYMLINK_HEAD + ALL_CFLAGS += -DNO_SYMLINK_HEAD +endif ifdef NO_STRCASESTR COMPAT_CFLAGS += -DNO_STRCASESTR COMPAT_OBJS += compat/strcasestr.o
cache.h +1 -1
@@ -170,7 +170,7 @@ extern void rollback_index_file(struct c/* Environment bits from configuration mechanism */ extern int trust_executable_bit;extern int assume_unchanged; -extern int only_use_symrefs; +extern int prefer_symlink_refs;extern int warn_ambiguous_refs;extern int diff_rename_limit_default;extern int shared_repository;
config.c +2 -2
@@ -227,8 +227,8 @@ int git_default_config(const char *var,return 0 ; } -if (!strcmp (var,"core.symrefsonly" )) { - only_use_symrefs =git_config_bool (var, value); +if (!strcmp (var,"core.prefersymlinkrefs" )) { + prefer_symlink_refs =git_config_bool (var, value);return 0 ; }
environment.c +1 -1
@@ -13,7 +13,7 @@ char git_default_email[MAX_GITNAME];char git_default_name[MAX_GITNAME ];int trust_executable_bit =1 ;int assume_unchanged =0 ; -int only_use_symrefs =0 ; +int prefer_symlink_refs =0 ;int warn_ambiguous_refs =1 ;int repository_format_version =0 ;char git_commit_encoding[MAX_ENCODING_LENGTH ] ="utf-8" ;
refs.c +2 -2
@@ -76,8 +76,8 @@ int create_symref(const char *git_HEAD,char ref[1000 ];int fd, len, written; -#ifdef USE_SYMLINK_HEAD -if (!only_use_symrefs) { +#ifndef NO_SYMLINK_HEAD +if (prefer_symlink_refs) {unlink (git_HEAD);if (!symlink (refs_heads_master, git_HEAD))return 0 ;
Quoted 18 lines · Junio C Hamano
Quoted 10 lines · Uwe Zeisberger
Quoted 5 lines · Olaf Hering
Did SuSE just pick up a bad version of git, 1.2.4? git-bisect doesnt work correctly in the kernel sources, .git/HEAD doesnt contain the commit id anymore, but 'ref: refs/heads/bisect'
CONFIG_LOCALVERSION_AUTOdepends on the id.Probably you should update to at least linux-v2.6.15-g117a93d. The script to determine the localversion[1] depends on .git/HEAD being a symlink.
Quoted 5 lines
Since
git-1.1.4-g2fabd21.git/HEAD isn't a symlink any more (per default at least).
Quoted 8 lines
Ouch. Although what Uwe says is all correct, we should not say "don't try kernel older than 2615-117a". That makes bisect rather useless.
Quoted 2 lines
You can rebuild git with
USE_SYMLINK_HEADif you really want the old behaviour.That probably is a sane thing to do.
Ok, thanks for the patch.
Petr, can you update our git package in time?
Hi,
Quoted 11 lines · Junio C Hamano
Quoted 2 lines · Uwe Zeisberger
You can rebuild git with
USE_SYMLINK_HEADif you really want the old behaviour.That probably is a sane thing to do.
We should introduce
prefer_symlink_refsconfiguration to work with projects whose older version of build infrastructure depends on symlink refs.
Quoted 6 lines
The patch is on top of post 1.3.1 git, but .c and .h part should apply more-or-less cleanly to older code base. You should be able to say:
[core] prefersymlinkrefs = true
Why not just use the existing method:
[core] onlyusesymrefs = false
Hmm?
Ciao,
Dscho
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi
Quoted 9 lines · Junio C Hamano
Quoted 4 lines · Johannes Schindelin
Why not just use the existing method:
[core] onlyusesymrefs = false
USE_SYMLINK_HEADis not enabled by default, and when it is, it _defaults_ to use symlink head.
Okay. I missed the part that support is disabled by default.
Sorry for the noise,
Dscho