linux-2.6.git/packed-refs???
I noticed while scanning #git log that it appears that pack-refs was run in your public repo and some people cannot clone over dumb protocols with older git.
commit 2986c02217f98809d8990e7679edf0f5d99f904d
Author: Junio C Hamano <[email protected]>
Date: Wed Nov 22 22:24:09 2006 -0800
git-fetch: fix dumb protocol transport to fetch from pack-pruned ref
was the first revision that aligned dumb protocol clients with pack-ref; unfortunately anything older will not find the ref that was packed.
We do have a backward compatibility warning on this in v1.5.0 release notes draft, but I think we would make it more obvious.
Sigh...
Quoted 8 lines · Junio C Hamano
I noticed while scanning #git log that it appears that pack-refs was run in your public repo and some people cannot clone over dumb protocols with older git.
commit
2986c02217f98809d8990e7679edf0f5d99f904d
Author: Junio C Hamano <[email protected]>
Date: Wed Nov 22 22:24:09 2006 -0800
Quoted 5 lines
git-fetch: fix dumb protocol transport to fetch from pack-pruned ref
was the first revision that aligned dumb protocol clients with pack-ref; unfortunately anything older will not find the ref that was packed.
Stupid question. Suppose someone has run git pack-refs on a repository. What is the recommended way to reverse the process. Is the answer is to clone the repository and then throw away the original one? Is there another way to do it?
- Ted
Hi,
Quoted 11 lines · Theodore Tso
Quoted 10 lines · Junio C Hamano
I noticed while scanning #git log that it appears that pack-refs was run in your public repo and some people cannot clone over dumb protocols with older git.
commit
2986c02217f98809d8990e7679edf0f5d99f904d
Author: Junio C Hamano <[email protected]>
Date: Wed Nov 22 22:24:09 2006 -0800git-fetch: fix dumb protocol transport to fetch from pack-pruned ref
Quoted 8 lines
Quoted 3 lines
was the first revision that aligned dumb protocol clients with pack-ref; unfortunately anything older will not find the ref that was packed.
Stupid question. Suppose someone has run git pack-refs on a repository. What is the recommended way to reverse the process. Is the answer is to clone the repository and then throw away the original one? Is there another way to do it?
The easiest way I found here was to do
git-for-each-ref | while read sha1 tag name; do
git update-ref -m "undo pack-ref" $name $sha1
done
Beware: this is tested once, and copied from memory.
Ciao,
Dscho
PATCH 1/1 Do not run git-pack-refs by default for now from git-gc
In reply to Junio C HamanoJust to be on the safe side, let's not run pack-refs from git-gc without an explicit "[gc] packrefs = true" configuration. This default should be changed in the future when we can reasonably assume that everybody runs post v1.5.0-rc0 version of git, at which time people can still ask it not to run with the same configuration ("[gc] packrefs = false").
---
Documentation/config.txt +10 -0
@@ -321,6 +321,16 @@ format.headers:: Additional email headers to include in a patch to be submitted by mail. See gitlink:git-format-patch[1]. +gc.packrefs:: + `git gc` does not run `git pack-refs` by default + so that older dumb-transport clients can still fetch + from the repository. Setting this to `true` lets `git + gc` to run `git pack-refs`. Enable it only when you + know you do not have to support such clients. The + default will change to run `git pack-refs` in some + future, and setting this to `false` will continue to + prevent `git pack-refs` from being run from `git gc`. + gc.reflogexpire:: `git reflog expire` removes reflog entries older than this time; defaults to 90 days.
Documentation/git-gc.txt +5 -0
@@ -62,9 +62,14 @@ The optional configuration variable 'gc.rerereunresolved' indicates how long records of conflicted merge you have not resolved are kept. This defaults to 15 days. +The optional configuration variable 'gc.packrefs' determines if +`git gc` runs `git-pack-refs`. Without the configuration, `git-pack-refs` +is not run by default to allow older dumb-transport clients +fetch from the repository, but this will change in the future. See Also -------- +gitlink:git-pack-refs[1] gitlink:git-prune[1] gitlink:git-reflog[1] gitlink:git-repack[1]
git-gc.sh +5 -1
@@ -22,7 +22,11 @@ do shift done -git-pack-refs --prune && +if pack_refs=$(git config --bool --get gc.packrefs) && + test "true" = "$pack_refs" +then + git-pack-refs --prune +fi && git-reflog expire --all && git-repack -a -d -l && $no_prune git-prune &&
Re: [PATCH] Do not run git-pack-refs by default for now from git-gc
Hi,
Quoted 2 lines · Junio C Hamano
Just to be on the safe side, let's not run pack-refs from git-gc without an explicit "[gc] packrefs = true" configuration.
It seems to me that the reason are dumb transports, which are very likely to run only from bare repositories. How about checking for a bare repository explicitely, and only if it _is_ bare, check for gc.packrefs, too?
Packed refs _do_ have a tremendous advantage (when you have a lot of tags, like many CVS switchers).
Ciao,
Dscho
Re: [PATCH] Do not run git-pack-refs by default for now from git-gc
Quoted 4 lines · Johannes Schindelin
It seems to me that the reason are dumb transports, which are very likely to run only from bare repositories. How about checking for a bare repository explicitely, and only if it _is_ bare, check for gc.packrefs, too?
The way you have stated it, I think we will get a lot of "I set gc.packrefs, but it doesn't do anything!" complaints. I think a tri-state "yes/no/notbare" defaulting to "notbare" makes more sense. But maybe you meant the other way around in the first place.
-Peff
Re: [PATCH] Do not run git-pack-refs by default for now from git-gc
Hi,
Quoted 11 lines · Jeff King
Quoted 4 lines · Johannes Schindelin
It seems to me that the reason are dumb transports, which are very likely to run only from bare repositories. How about checking for a bare repository explicitely, and only if it _is_ bare, check for gc.packrefs, too?
The way you have stated it, I think we will get a lot of "I set gc.packrefs, but it doesn't do anything!" complaints. I think a tri-state "yes/no/notbare" defaulting to "notbare" makes more sense. But maybe you meant the other way around in the first place.
No, I meant it as you understood it. But your solution is evidently way more elegant.
Ciao,
Dscho
Re: [PATCH] Do not run git-pack-refs by default for now from git-gc
Thanks both.
PATCH 1/1 git-gc: run pack-refs by default unless the repo is bare
In reply to Jeff KingThe config variable gc.packrefs is tristate now: "true", "false" and "notbare", where "notbare" is the default.
---
On Tue, 13 Feb 2007, Jeff King wrote:
> I think a tri-state "yes/no/notbare" defaulting to "notbare" > makes more sense.
This is on top of Junio's patch.
Documentation/config.txt | 13 +++++++------ Documentation/git-gc.txt | 4 ++-- git-gc.sh | 14 +++++++++----- 3 files changed, 18 insertions(+), 13 deletions(-)
Documentation/config.txt +7 -6
@@ -322,13 +322,14 @@ format.headers:: by mail. See gitlink:git-format-patch[1]. gc.packrefs:: - `git gc` does not run `git pack-refs` by default - so that older dumb-transport clients can still fetch + `git gc` does not run `git pack-refs` in a bare repository by + default so that older dumb-transport clients can still fetch from the repository. Setting this to `true` lets `git - gc` to run `git pack-refs`. Enable it only when you - know you do not have to support such clients. The - default will change to run `git pack-refs` in some - future, and setting this to `false` will continue to + gc` to run `git pack-refs`. Setting this to `false` tells + `git gc` never to run `git pack-refs`. The default setting is + `notbare`. Enable it only when you know you do not have to + support such clients. The default setting will change to `true` + at some stage, and setting this to `false` will continue to prevent `git pack-refs` from being run from `git gc`. gc.reflogexpire::
Documentation/git-gc.txt +2 -2
@@ -64,8 +64,8 @@ kept. This defaults to 15 days. The optional configuration variable 'gc.packrefs' determines if `git gc` runs `git-pack-refs`. Without the configuration, `git-pack-refs` -is not run by default to allow older dumb-transport clients -fetch from the repository, but this will change in the future. +is not run in bare repositories by default, to allow older dumb-transport +clients fetch from the repository, but this will change in the future. See Also --------
git-gc.sh +9 -5
@@ -22,11 +22,15 @@ do shift done -if pack_refs=$(git config --bool --get gc.packrefs) && - test "true" = "$pack_refs" -then - git-pack-refs --prune -fi && +case "$(git config --get gc.packrefs)" in +notbare|"") + test $(is_bare_repository) = true || pack_refs=true;; +*) + pack_refs=$(git config --bool --get gc.packrefs) +esac + +test "true" != "$pack_refs" || +git-pack-refs --prune && git-reflog expire --all && git-repack -a -d -l && $no_prune git-prune &&
Signature · 1 line
1.5.0.rc4.2434.g472e7