git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Removing alternates -- but how?

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Apr 13, 2010, 15:58 UTC
Message-ID
<20100413155819.GI19595@genesis.frugalware.org>
In-Reply-To
<20100413125704.GA29552@dirichlet.schwinge.homeip.net>
On Tue, Apr 13, 2010 at 02:57:04PM +0200, Thomas Schwinge <thomas@schwinge.name> wrote:
Show 34 quoted lines
>     $ cat .git/objects/info/alternates
>     ../../../glibc/.git/objects
>     ../../../../O/work.new/.git/objects
>     $ git repack -a
>     Counting objects: 18670, done.
>     Compressing objects: 100% (7655/7655), done.
>     Writing objects: 100% (18670/18670), done.
>     Total 18670 (delta 10218), reused 18670 (delta 10218)
>     $ mv .git/objects/info/alternates{,.DEFUNCT}
>     $ git branch
>     error: refs/remotes/grubber/master does not point to a valid object!
>     error: refs/remotes/sourceware/cvs/fedora-2_3-branch does not point to a valid object!
>     error: refs/remotes/sourceware/cvs/fedora-2_5-branch does not point to a valid object!
>     [...]
>     error: refs/tags/cvs/sparc-980522-merge does not point to a valid object!
>     error: refs/tags/cvs/start does not point to a valid object!
>     error: refs/tags/master-2008-11-27 does not point to a valid object!
>     error: refs/tags/master-2009-02-10 does not point to a valid object!
>     error: refs/tags/master-2009-07-10 does not point to a valid object!
>     error: refs/top-bases/t/IOCTL_decode_argument does not point to a valid object!
>     error: refs/top-bases/t/IOCTL_types does not point to a valid object!
>     error: refs/top-bases/t/____longjmp_chk_cleanup_linux_x86_64 does not point to a valid object!
>     error: refs/top-bases/t/bits_posix_opt.h__POSIX_THREADS does not point to a valid object!
>     error: refs/top-bases/t/bits_pthreadtypes.h does not point to a valid object!
>       baseline
>       posix/regex_internal.c/MAX_undefined
>       t/IOCTL_decode_argument
>       t/IOCTL_types
>       t/____longjmp_chk
>       t/____longjmp_chk_cleanup_linux_x86_64
>       t/__rtld_lock_recursive_t
>     [...]
>       t/verify.h
>     * tschwinge/Roger_Whittaker
What git version are you using?
It seems to work for me:
$ mkdir s
$ cd s
$ git init
$ echo a > a
$ git add a
$ git commit -m i
$ cd ..
$ git clone -s s c
$ cd c
$ git repack -a
$ mv .git/objects/info/alternates .git/objects/info/alternates.orig
$ git branch
* master
Previous: Thomas SchwingeNext: Michael J Gruber
Message 2 of 3 in “Removing alternates -- but how?”
  1. Thomas SchwingeApr 13, 2010
  2. Miklos VajnaApr 13, 2010
  3. Michael J GruberApr 14, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.