git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Removing alternates -- but how?
@ 2010-04-13 12:57 Thomas Schwinge
  2010-04-13 15:58 ` Miklos Vajna
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Schwinge @ 2010-04-13 12:57 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1919 bytes --]

Hello!

According to ``information on the web'', it should be fine to do ``git
repack -a && rm .git/objects/info/alternates'', however that doesn't work
for me:

    $ 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 am I doing wrong?


Regards,
 Thomas

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: Removing alternates -- but how?
  2010-04-13 12:57 Removing alternates -- but how? Thomas Schwinge
@ 2010-04-13 15:58 ` Miklos Vajna
  2010-04-14  7:25   ` Michael J Gruber
  0 siblings, 1 reply; 3+ messages in thread
From: Miklos Vajna @ 2010-04-13 15:58 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]

On Tue, Apr 13, 2010 at 02:57:04PM +0200, Thomas Schwinge <thomas@schwinge.name> wrote:
>     $ 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

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: Removing alternates -- but how?
  2010-04-13 15:58 ` Miklos Vajna
@ 2010-04-14  7:25   ` Michael J Gruber
  0 siblings, 0 replies; 3+ messages in thread
From: Michael J Gruber @ 2010-04-14  7:25 UTC (permalink / raw)
  To: Miklos Vajna; +Cc: Thomas Schwinge, git

Miklos Vajna venit, vidit, dixit 13.04.2010 17:58:
> On Tue, Apr 13, 2010 at 02:57:04PM +0200, Thomas Schwinge <thomas@schwinge.name> wrote:
>>     $ 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

Well, according to the log it worked for some branches for Thomas, just
not for all of them. I'm not surprised your test succeeds. In Thomas'
case it seems that repack is missing some dependencies, but it doesn't
even have an --all option or such.

Thomas: In addition to your git version, it would be good to know
whether you use any of

- grafts
- replaced objects
- multiple roots (branches without common commits)
- alternate chains (source repo borrowing objects from a third repo)

Michael

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

end of thread, other threads:[~2010-04-14  7:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-13 12:57 Removing alternates -- but how? Thomas Schwinge
2010-04-13 15:58 ` Miklos Vajna
2010-04-14  7:25   ` Michael J Gruber

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 NNTP newsgroup(s).