#154 ✓resolved
Benoit Cerrina

unable to open document "taka"

Reported by Benoit Cerrina | May 21st, 2009 @ 01:55 PM | in 0.7

when trying to open gitx on my git project, I have started to get this message.
This has happened after the migration to 0.6.3 but I am not sure if it is effectively a coincidence or not as restoring the previous version with time machine did not fix the problem.

This is a repository I have managed with gitx for a while and which is still working fine with gitk git gui and the regular git commands.
What can I do to help debug this problem

Comments and changes to this ticket

  • Benoit Cerrina

    Benoit Cerrina May 21st, 2009 @ 01:56 PM

    one thing which may have caused this is the addition of a large binary file (160MB) to replace a smaller (80MB) one. I don't see what else could have caused the problem

  • Pieter de Bie

    Pieter de Bie May 21st, 2009 @ 02:42 PM

    • Assigned user changed from “Pieter de Bie” to “Johannes Gilger”

    I'm going to assign this to Johannes.. I'd hoped we would have fixed all document stuff. Can you give the name of the git folder? Are there any special characters in it? If you change the name, does it work?

  • Benoit Cerrina

    Benoit Cerrina May 21st, 2009 @ 06:23 PM

    the folder is named taka
    I haven't changed the name but it was working fine before.
    I ran git fsck and git gc, some things were fixed and git fsck still gives:
    dangling blob 4fad24e1aa9662f4875145b8227160ce27e0730d

  • Benoit Cerrina

    Benoit Cerrina May 21st, 2009 @ 06:24 PM

    by the way if you have an idea of where the problem can be I could download the source and try to debug myself

  • Benoit Cerrina

    Benoit Cerrina May 21st, 2009 @ 06:25 PM

    renaming is not helping.
    the complete name is
    /Users/benoitcerrina/dev/taka

  • Benoit Cerrina

    Benoit Cerrina May 21st, 2009 @ 07:26 PM

    also I used time machine to bring my repository back a few days and I could open it.

  • Benoit Cerrina

    Benoit Cerrina May 21st, 2009 @ 08:10 PM

    the folder is named taka
    I haven't changed the name but it was working fine before.
    I ran git fsck and git gc, some things were fixed and git fsck still gives:
    dangling blob 4fad24e1aa9662f4875145b8227160ce27e0730d

  • Benoit Cerrina

    Benoit Cerrina May 21st, 2009 @ 08:12 PM

    • Title changed from “unable to open document "xxx"” to “unable to open document "taka"”

    sorry for the previous repetition.
    I am now debugging, when a working repository opens correctly I see the program going through:
    PBRepositoryDocumentController:documentForURL
    then PBGitRepository:readFromFileWrapper
    In the case of my failing repository
    the second step does not happen.
    I don't know what this means

  • Pieter de Bie

    Pieter de Bie May 21st, 2009 @ 08:38 PM

    Can you diff the two repositories and see what changed?

  • Benoit Cerrina

    Benoit Cerrina May 21st, 2009 @ 08:43 PM

    yes, here is the result of diff -rq taka/.git taka_gitx_ok/.git:
    Files taka/.git/ORIG_HEAD and taka_gitx_ok/.git/ORIG_HEAD differ
    Files taka/.git/index and taka_gitx_ok/.git/index differ
    Files taka/.git/info/refs and taka_gitx_ok/.git/info/refs differ
    Files taka/.git/logs/HEAD and taka_gitx_ok/.git/logs/HEAD differ
    Files taka/.git/logs/refs/heads/master and taka_gitx_ok/.git/logs/refs/heads/master differ
    Files taka/.git/logs/refs/heads/v2.2.3 and taka_gitx_ok/.git/logs/refs/heads/v2.2.3 differ
    Files taka/.git/logs/refs/remotes/unfuddle/master and taka_gitx_ok/.git/logs/refs/remotes/unfuddle/master differ
    Only in taka_gitx_ok/.git/objects: 00
    Only in taka_gitx_ok/.git/objects: 01
    Only in taka_gitx_ok/.git/objects: 02
    Only in taka_gitx_ok/.git/objects: 03
    Only in taka_gitx_ok/.git/objects: 04
    Only in taka_gitx_ok/.git/objects: 05
    Only in taka_gitx_ok/.git/objects: 06
    Only in taka_gitx_ok/.git/objects: 07
    Only in taka_gitx_ok/.git/objects: 08
    Only in taka_gitx_ok/.git/objects: 09
    Only in taka_gitx_ok/.git/objects: 0a
    Only in taka_gitx_ok/.git/objects: 0b
    Only in taka_gitx_ok/.git/objects: 0c
    Only in taka_gitx_ok/.git/objects: 0d
    Only in taka_gitx_ok/.git/objects: 0e
    Only in taka_gitx_ok/.git/objects: 0f
    Only in taka_gitx_ok/.git/objects: 10
    Only in taka_gitx_ok/.git/objects: 11
    Only in taka_gitx_ok/.git/objects: 12
    Only in taka_gitx_ok/.git/objects: 13
    Only in taka_gitx_ok/.git/objects: 14
    Only in taka_gitx_ok/.git/objects: 15
    Only in taka_gitx_ok/.git/objects: 16
    Only in taka_gitx_ok/.git/objects: 17
    Only in taka_gitx_ok/.git/objects: 18
    Only in taka_gitx_ok/.git/objects: 19
    Only in taka_gitx_ok/.git/objects: 1a
    Only in taka_gitx_ok/.git/objects: 1b
    Only in taka_gitx_ok/.git/objects: 1c
    Only in taka_gitx_ok/.git/objects: 1d
    Only in taka_gitx_ok/.git/objects: 1e
    Only in taka_gitx_ok/.git/objects: 1f
    Only in taka_gitx_ok/.git/objects: 20
    Only in taka_gitx_ok/.git/objects: 21
    Only in taka_gitx_ok/.git/objects: 22
    Only in taka_gitx_ok/.git/objects: 23
    Only in taka_gitx_ok/.git/objects: 24
    Only in taka_gitx_ok/.git/objects: 25
    Only in taka_gitx_ok/.git/objects: 26
    Only in taka_gitx_ok/.git/objects: 27
    Only in taka_gitx_ok/.git/objects: 28
    Only in taka_gitx_ok/.git/objects: 29
    Only in taka_gitx_ok/.git/objects: 2a
    Only in taka_gitx_ok/.git/objects: 2b
    Only in taka_gitx_ok/.git/objects: 2c
    Only in taka_gitx_ok/.git/objects: 2d
    Only in taka_gitx_ok/.git/objects: 2e
    Only in taka_gitx_ok/.git/objects: 2f
    Only in taka_gitx_ok/.git/objects: 30
    Only in taka_gitx_ok/.git/objects: 31
    Only in taka_gitx_ok/.git/objects: 32
    Only in taka_gitx_ok/.git/objects: 33
    Only in taka_gitx_ok/.git/objects: 34
    Only in taka_gitx_ok/.git/objects: 35
    Only in taka_gitx_ok/.git/objects: 36
    Only in taka_gitx_ok/.git/objects: 37
    Only in taka_gitx_ok/.git/objects: 38
    Only in taka_gitx_ok/.git/objects: 39
    Only in taka_gitx_ok/.git/objects: 3a
    Only in taka_gitx_ok/.git/objects: 3b
    Only in taka_gitx_ok/.git/objects: 3c
    Only in taka_gitx_ok/.git/objects: 3d
    Only in taka_gitx_ok/.git/objects: 3e
    Only in taka_gitx_ok/.git/objects: 3f
    Only in taka_gitx_ok/.git/objects: 40
    Only in taka_gitx_ok/.git/objects: 41
    Only in taka_gitx_ok/.git/objects: 42
    Only in taka_gitx_ok/.git/objects: 43
    Only in taka_gitx_ok/.git/objects: 44
    Only in taka_gitx_ok/.git/objects: 45
    Only in taka_gitx_ok/.git/objects: 46
    Only in taka_gitx_ok/.git/objects: 47
    Only in taka_gitx_ok/.git/objects: 48
    Only in taka_gitx_ok/.git/objects: 49
    Only in taka_gitx_ok/.git/objects: 4a
    Only in taka_gitx_ok/.git/objects: 4b
    Only in taka_gitx_ok/.git/objects: 4c
    Only in taka_gitx_ok/.git/objects: 4d
    Only in taka_gitx_ok/.git/objects: 4e
    Only in taka_gitx_ok/.git/objects/4f: 1287319ca36b3bd4496f49da9094c81c8da558
    Only in taka_gitx_ok/.git/objects/4f: 43a38d16d6641961dba4fdf0ebc08214cb2bb9
    Only in taka_gitx_ok/.git/objects/4f: 48597755c431bfec496267a3c9c108f9b37259
    Only in taka_gitx_ok/.git/objects/4f: 6cb1d3e5fd415afea2ca8060c87a7145433632
    Only in taka_gitx_ok/.git/objects/4f: 84f792b5529a78db44c8cfab3a95218a248a26
    Only in taka_gitx_ok/.git/objects/4f: c0cb92a2ace2e7c0b6b3523c34869cb5e2a18e
    Only in taka_gitx_ok/.git/objects/4f: cdc7444f911e33003feed55c749eab7a9122a3
    Only in taka_gitx_ok/.git/objects: 50
    Only in taka_gitx_ok/.git/objects: 51
    Only in taka_gitx_ok/.git/objects: 52
    Only in taka_gitx_ok/.git/objects: 53
    Only in taka_gitx_ok/.git/objects: 54
    Only in taka_gitx_ok/.git/objects: 55
    Only in taka_gitx_ok/.git/objects: 56
    Only in taka_gitx_ok/.git/objects: 57
    Only in taka_gitx_ok/.git/objects: 58
    Only in taka_gitx_ok/.git/objects: 59
    Only in taka_gitx_ok/.git/objects: 5a
    Only in taka_gitx_ok/.git/objects: 5b
    Only in taka_gitx_ok/.git/objects: 5c
    Only in taka_gitx_ok/.git/objects: 5d
    Only in taka_gitx_ok/.git/objects: 5e
    Only in taka_gitx_ok/.git/objects: 5f
    Only in taka_gitx_ok/.git/objects: 60
    Only in taka_gitx_ok/.git/objects: 61
    Only in taka_gitx_ok/.git/objects: 62
    Only in taka_gitx_ok/.git/objects: 63
    Only in taka_gitx_ok/.git/objects: 64
    Only in taka_gitx_ok/.git/objects: 65
    Only in taka_gitx_ok/.git/objects: 66
    Only in taka_gitx_ok/.git/objects: 67
    Only in taka_gitx_ok/.git/objects: 68
    Only in taka_gitx_ok/.git/objects: 69
    Only in taka_gitx_ok/.git/objects: 6a
    Only in taka_gitx_ok/.git/objects: 6b
    Only in taka_gitx_ok/.git/objects: 6c
    Only in taka_gitx_ok/.git/objects: 6d
    Only in taka_gitx_ok/.git/objects: 6e
    Only in taka_gitx_ok/.git/objects: 6f
    Only in taka_gitx_ok/.git/objects: 70
    Only in taka_gitx_ok/.git/objects: 71
    Only in taka_gitx_ok/.git/objects: 72
    Only in taka_gitx_ok/.git/objects: 73
    Only in taka_gitx_ok/.git/objects: 74
    Only in taka_gitx_ok/.git/objects: 75
    Only in taka_gitx_ok/.git/objects: 76
    Only in taka_gitx_ok/.git/objects: 77
    Only in taka_gitx_ok/.git/objects: 78
    Only in taka_gitx_ok/.git/objects: 79
    Only in taka_gitx_ok/.git/objects: 7a
    Only in taka_gitx_ok/.git/objects: 7b
    Only in taka_gitx_ok/.git/objects: 7c
    Only in taka_gitx_ok/.git/objects: 7d
    Only in taka_gitx_ok/.git/objects: 7e
    Only in taka_gitx_ok/.git/objects: 7f
    Only in taka_gitx_ok/.git/objects: 80
    Only in taka_gitx_ok/.git/objects: 81
    Only in taka_gitx_ok/.git/objects: 82
    Only in taka_gitx_ok/.git/objects: 83
    Only in taka_gitx_ok/.git/objects: 84
    Only in taka_gitx_ok/.git/objects: 85
    Only in taka_gitx_ok/.git/objects: 86
    Only in taka_gitx_ok/.git/objects: 87
    Only in taka_gitx_ok/.git/objects: 88
    Only in taka_gitx_ok/.git/objects: 89
    Only in taka_gitx_ok/.git/objects: 8a
    Only in taka_gitx_ok/.git/objects: 8b
    Only in taka_gitx_ok/.git/objects: 8c
    Only in taka_gitx_ok/.git/objects: 8d
    Only in taka_gitx_ok/.git/objects: 8e
    Only in taka_gitx_ok/.git/objects: 8f
    Only in taka_gitx_ok/.git/objects: 90
    Only in taka_gitx_ok/.git/objects: 91
    Only in taka_gitx_ok/.git/objects: 92
    Only in taka_gitx_ok/.git/objects: 93
    Only in taka_gitx_ok/.git/objects: 94
    Only in taka_gitx_ok/.git/objects: 95
    Only in taka_gitx_ok/.git/objects: 96
    Only in taka_gitx_ok/.git/objects: 97
    Only in taka_gitx_ok/.git/objects: 98
    Only in taka_gitx_ok/.git/objects: 99
    Only in taka_gitx_ok/.git/objects: 9a
    Only in taka_gitx_ok/.git/objects: 9b
    Only in taka_gitx_ok/.git/objects: 9c
    Only in taka_gitx_ok/.git/objects: 9d
    Only in taka_gitx_ok/.git/objects: 9e
    Only in taka_gitx_ok/.git/objects: 9f
    Only in taka_gitx_ok/.git/objects: a0
    Only in taka_gitx_ok/.git/objects: a1
    Only in taka_gitx_ok/.git/objects: a2
    Only in taka_gitx_ok/.git/objects: a3
    Only in taka_gitx_ok/.git/objects: a4
    Only in taka_gitx_ok/.git/objects: a5
    Only in taka_gitx_ok/.git/objects: a6
    Only in taka_gitx_ok/.git/objects: a7
    Only in taka_gitx_ok/.git/objects: a8
    Only in taka_gitx_ok/.git/objects: a9
    Only in taka_gitx_ok/.git/objects: aa
    Only in taka_gitx_ok/.git/objects: ab
    Only in taka_gitx_ok/.git/objects: ac
    Only in taka_gitx_ok/.git/objects: ad
    Only in taka_gitx_ok/.git/objects: ae
    Only in taka_gitx_ok/.git/objects: af
    Only in taka_gitx_ok/.git/objects: b0
    Only in taka_gitx_ok/.git/objects: b1
    Only in taka_gitx_ok/.git/objects: b2
    Only in taka_gitx_ok/.git/objects: b3
    Only in taka_gitx_ok/.git/objects: b4
    Only in taka_gitx_ok/.git/objects: b5
    Only in taka_gitx_ok/.git/objects: b6
    Only in taka_gitx_ok/.git/objects: b7
    Only in taka_gitx_ok/.git/objects: b8
    Only in taka_gitx_ok/.git/objects: b9
    Only in taka_gitx_ok/.git/objects: ba
    Only in taka_gitx_ok/.git/objects: bb
    Only in taka_gitx_ok/.git/objects: bc
    Only in taka_gitx_ok/.git/objects: bd
    Only in taka_gitx_ok/.git/objects: be
    Only in taka_gitx_ok/.git/objects: bf
    Only in taka_gitx_ok/.git/objects: c0
    Only in taka_gitx_ok/.git/objects: c1
    Only in taka_gitx_ok/.git/objects: c2
    Only in taka_gitx_ok/.git/objects: c3
    Only in taka_gitx_ok/.git/objects: c4
    Only in taka_gitx_ok/.git/objects: c5
    Only in taka_gitx_ok/.git/objects: c6
    Only in taka_gitx_ok/.git/objects: c7
    Only in taka_gitx_ok/.git/objects: c8
    Only in taka_gitx_ok/.git/objects: c9
    Only in taka_gitx_ok/.git/objects: ca
    Only in taka_gitx_ok/.git/objects: cb
    Only in taka_gitx_ok/.git/objects: cc
    Only in taka_gitx_ok/.git/objects: cd
    Only in taka_gitx_ok/.git/objects: ce
    Only in taka_gitx_ok/.git/objects: cf
    Only in taka_gitx_ok/.git/objects: d0
    Only in taka_gitx_ok/.git/objects: d1
    Only in taka_gitx_ok/.git/objects: d2
    Only in taka_gitx_ok/.git/objects: d3
    Only in taka_gitx_ok/.git/objects: d4
    Only in taka_gitx_ok/.git/objects: d5
    Only in taka_gitx_ok/.git/objects: d6
    Only in taka_gitx_ok/.git/objects: d7
    Only in taka_gitx_ok/.git/objects: d8
    Only in taka_gitx_ok/.git/objects: d9
    Only in taka_gitx_ok/.git/objects: da
    Only in taka_gitx_ok/.git/objects: db
    Only in taka_gitx_ok/.git/objects: dc
    Only in taka_gitx_ok/.git/objects: dd
    Only in taka_gitx_ok/.git/objects: de
    Only in taka_gitx_ok/.git/objects: df
    Only in taka_gitx_ok/.git/objects: e0
    Only in taka_gitx_ok/.git/objects: e1
    Only in taka_gitx_ok/.git/objects: e2
    Only in taka_gitx_ok/.git/objects: e3
    Only in taka_gitx_ok/.git/objects: e4
    Only in taka_gitx_ok/.git/objects: e5
    Only in taka_gitx_ok/.git/objects: e6
    Only in taka_gitx_ok/.git/objects: e7
    Only in taka_gitx_ok/.git/objects: e8
    Only in taka_gitx_ok/.git/objects: e9
    Only in taka_gitx_ok/.git/objects: ea
    Only in taka_gitx_ok/.git/objects: eb
    Only in taka_gitx_ok/.git/objects: ec
    Only in taka_gitx_ok/.git/objects: ed
    Only in taka_gitx_ok/.git/objects: ee
    Only in taka_gitx_ok/.git/objects: ef
    Only in taka_gitx_ok/.git/objects: f0
    Only in taka_gitx_ok/.git/objects: f1
    Only in taka_gitx_ok/.git/objects: f2
    Only in taka_gitx_ok/.git/objects: f3
    Only in taka_gitx_ok/.git/objects: f4
    Only in taka_gitx_ok/.git/objects: f5
    Only in taka_gitx_ok/.git/objects: f6
    Only in taka_gitx_ok/.git/objects: f7
    Only in taka_gitx_ok/.git/objects: f8
    Only in taka_gitx_ok/.git/objects: f9
    Only in taka_gitx_ok/.git/objects: fa
    Only in taka_gitx_ok/.git/objects: fb
    Only in taka_gitx_ok/.git/objects: fc
    Only in taka_gitx_ok/.git/objects: fd
    Only in taka_gitx_ok/.git/objects: fe
    Only in taka_gitx_ok/.git/objects: ff
    Files taka/.git/objects/info/packs and taka_gitx_ok/.git/objects/info/packs differ
    Only in taka_gitx_ok/.git/objects/pack: pack-7f6ad3b48f893f261293086c4ebc165f051e10c9.idx
    Only in taka_gitx_ok/.git/objects/pack: pack-7f6ad3b48f893f261293086c4ebc165f051e10c9.pack
    Only in taka/.git/objects/pack: pack-a270408b17b4ba9dc7a4861528077831330a1fb1.idx
    Only in taka/.git/objects/pack: pack-a270408b17b4ba9dc7a4861528077831330a1fb1.pack
    Files taka/.git/packed-refs and taka_gitx_ok/.git/packed-refs differ
    Files taka/.git/qgit_cache.dat and taka_gitx_ok/.git/qgit_cache.dat differ
    Only in taka_gitx_ok/.git/refs/bisect: bad
    Only in taka_gitx_ok/.git/refs/bisect: good-502af869c3a811075a82794ec2fac0c517dce45d
    Only in taka_gitx_ok/.git/refs/bisect: good-68f6f0494d2c532a0cae8d96267fcffedf6dc8f0
    Only in taka_gitx_ok/.git/refs/bisect: good-ea5c5d17c6ebc8c273148fba46b4dc4bfb812a7f
    Only in taka_gitx_ok/.git/refs/heads: german-translation
    Only in taka_gitx_ok/.git/refs/heads: master
    Only in taka_gitx_ok/.git/refs/heads: v2.2.3
    Only in taka_gitx_ok/.git/refs/heads: v3.0.0.14
    Only in taka_gitx_ok/.git/refs/heads: v3.0.1.0
    Only in taka_gitx_ok/.git/refs/remotes/unfuddle: master
    Only in taka_gitx_ok/.git/refs/tags: 2.2.3.22
    Only in taka_gitx_ok/.git/refs/tags: v2.2.3.10
    Only in taka_gitx_ok/.git/refs/tags: v2.2.3.11
    Only in taka_gitx_ok/.git/refs/tags: v2.2.3.15
    Only in taka_gitx_ok/.git/refs/tags: v2.2.3.16
    Only in taka_gitx_ok/.git/refs/tags: v2.2.3.17
    Only in taka_gitx_ok/.git/refs/tags: v2.2.3.19
    Only in taka_gitx_ok/.git/refs/tags: v2.2.3.22
    Only in taka_gitx_ok/.git/refs/tags: v2.2.3.30
    Only in taka_gitx_ok/.git/refs/tags: v3.0.0.10
    Only in taka_gitx_ok/.git/refs/tags: v3.0.0.12
    Only in taka_gitx_ok/.git/refs/tags: v3.0.0.14
    Only in taka_gitx_ok/.git/refs/tags: v3.0.0.15
    Only in taka_gitx_ok/.git/refs/tags: v3.0.0.2
    Only in taka_gitx_ok/.git/refs/tags: v3.0.0.3
    Only in taka_gitx_ok/.git/refs/tags: v3.0.0.4
    Only in taka_gitx_ok/.git/refs/tags: v3.0.0.6
    Only in taka_gitx_ok/.git/refs/tags: v3.0.0.7
    Only in taka_gitx_ok/.git/refs/tags: v3.0.0.8
    Only in taka_gitx_ok/.git/refs/tags: v3.0.0.9
    Only in taka_gitx_ok/.git/refs/tags: v3.0.1.10
    Only in taka_gitx_ok/.git/refs/tags: v3.0.1.11
    Only in taka_gitx_ok/.git/refs/tags: v3.0.1.3
    Only in taka_gitx_ok/.git/refs/tags: v3.0.1.4
    Only in taka_gitx_ok/.git/refs/tags: v3.0.1.5
    Only in taka_gitx_ok/.git/refs/tags: v3.0.1.6
    Only in taka_gitx_ok/.git/refs/tags: v3.0.1.7
    Only in taka_gitx_ok/.git/refs/tags: v3.0.1.8
    Only in taka_gitx_ok/.git/refs/tags: v3.0.1.9

  • Benoit Cerrina

    Benoit Cerrina May 21st, 2009 @ 08:44 PM

    If I could attach the diff dump it would be more readable.
    Also what other place would you put breakpoint in to analyze the bug?
    What I don't understand is that it seems to be NSDocumentController which refuses to open the document on its own

  • Benoit Cerrina

    Benoit Cerrina May 21st, 2009 @ 08:49 PM

    after running git gc on the working directory the diff are much smaller:

    
    Files taka/.git/ORIG_HEAD and taka_gitx_ok/.git/ORIG_HEAD differ
    Files taka/.git/index and taka_gitx_ok/.git/index differ
    Files taka/.git/info/refs and taka_gitx_ok/.git/info/refs differ
    Files taka/.git/logs/HEAD and taka_gitx_ok/.git/logs/HEAD differ
    Files taka/.git/logs/refs/heads/master and taka_gitx_ok/.git/logs/refs/heads/master differ
    Files taka/.git/objects/info/packs and taka_gitx_ok/.git/objects/info/packs differ
    Only in taka_gitx_ok/.git/objects/pack: pack-2a7d02ab499c2185eb50ce47379fc3ac257e4eb5.idx
    Only in taka_gitx_ok/.git/objects/pack: pack-2a7d02ab499c2185eb50ce47379fc3ac257e4eb5.pack
    Only in taka/.git/objects/pack: pack-a270408b17b4ba9dc7a4861528077831330a1fb1.idx
    Only in taka/.git/objects/pack: pack-a270408b17b4ba9dc7a4861528077831330a1fb1.pack
    Files taka/.git/packed-refs and taka_gitx_ok/.git/packed-refs differ
    Files taka/.git/qgit_cache.dat and taka_gitx_ok/.git/qgit_cache.dat differ
    
  • Benoit Cerrina

    Benoit Cerrina May 22nd, 2009 @ 03:27 AM

    I think I found that the problem was because in
    - (BOOL)readFromURL:(NSURL )absoluteURL ofType:(NSString )typeName error:(NSError **)outError (which I have now overwritten as part of the debug process) the NSFileWrapper creation failed.

    I tried

    NSString * lPath = [absoluteURL path];
    NSFileWrapper * lWrapper = [[NSFileWrapper alloc] initWithPath:lPath];
    

    And the result is lWrapper == nil when it fails.
    The lPath variable value is
    /Users/benoitcerrina/dev/taka which is valid. I don't understand why the file wrapper creation fails

  • Benoit Cerrina

    Benoit Cerrina May 22nd, 2009 @ 03:59 AM

    I have opened a bug report to apple about the NSFileWrapper behavior tracking number is: 6913592

    I have fixed gitx locally the following way:
    removed
    - (BOOL)readFromFileWrapper:(NSFileWrapper )fileWrapper ofType:(NSString )typeName error:(NSError **)outError

    added

    - (BOOL)readFromURL:(NSURL )absoluteURL ofType:(NSString )typeName error:(NSError **)outError
    {

    BOOL success = NO;
    
    if (![PBGitBinary path])
    {
        if (outError) {
            NSDictionary* userInfo = [NSDictionary dictionaryWithObject:[PBGitBinary notFoundError]
                                                                 forKey:NSLocalizedRecoverySuggestionErrorKey];
            *outError = [NSError errorWithDomain:PBGitRepositoryErrorDomain code:0 userInfo:userInfo];
        }
        return NO;
    }
    BOOL lIsDirectory = FALSE;
    [[NSFileManager defaultManager] fileExistsAtPath:[absoluteURL path] isDirectory:&lIsDirectory];
    if (!lIsDirectory) {
        if (outError) {
            NSDictionary* userInfo = [NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Reading files is not supported.", [self fileName]]
                                                                 forKey:NSLocalizedRecoverySuggestionErrorKey];
            *outError = [NSError errorWithDomain:PBGitRepositoryErrorDomain code:0 userInfo:userInfo];
        }
    } else {
        NSURL* gitDirURL = [PBGitRepository gitDirForURL:[self fileURL]];
        if (gitDirURL) {
            [self setFileURL:gitDirURL];
            success = YES;
        } else if (outError) {
            NSDictionary* userInfo = [NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"%@ does not appear to be a git repository.", [self fileName]]
                                                                 forKey:NSLocalizedRecoverySuggestionErrorKey];
            *outError = [NSError errorWithDomain:PBGitRepositoryErrorDomain code:0 userInfo:userInfo];
        }
    
        if (success) {
            [self setup];
            [self readCurrentBranch];
        }
    }
    
    return success;
    
    
    
    
    }

    I would appreciate if you could review this change and include it in the next official version

  • Benoit Cerrina

    Benoit Cerrina May 22nd, 2009 @ 04:00 AM

    PS: I find gitx really really usefull which is why I went to all this trouble to debug it. Thanks for a great tool

  • Johannes Gilger

    Johannes Gilger June 2nd, 2009 @ 01:48 PM

    Could you put this in a branch on GitHub so I can review it more easily?

  • Benoit Cerrina

    Benoit Cerrina June 2nd, 2009 @ 01:57 PM

    If I don't run into git configuration issues you'll have it tonight

  • Benoit Cerrina

    Benoit Cerrina June 20th, 2009 @ 05:55 PM

    sorry it took me so long, I ran into small problems and forgot about this.
    I have forked your repo in GitHub and here is the place where I added the change above:
    git://github.com/benoitcerrina/gitx.git

  • Johannes Gilger

    Johannes Gilger June 20th, 2009 @ 07:45 PM

    • State changed from “new” to “open”

    Hm, while your patch looks OK (basically you just renamed a method and routed the init stuff around a bit) I have a few minor things I'd like to have:

    1. A decent and descriptive commit-message! I have no idea what exactly you did and why
    2. Getting the return-code of messages into variables, only to return those one line later seems kinda unnecessary to me. This isn't done in other places either.
  • Benoit Cerrina

    Benoit Cerrina June 20th, 2009 @ 08:22 PM

    Hello,
    the commit message is the name of this bug. My initial message was: Enable support for repositories containing large number of files by working around NSFileWrapper bug.

    If you prefer this I can probably ammend the commit message (although I am not very confident changing git history).

    Regarding putting hte return codes of methods in intermediate variables, this is not needed and I'll remove it, it was very usefull for debugging to verify where thing went wrong as XCode doesn't show the return values of functions if you don't do this.
    The important change in this commit is to implement
    readFromURL:ofType:error:
    and not
    readFromFileWrapper:ofType:error:
    The default implementation of readFromURL was calling your implementation of readFromFileWrapper but the bug in NSFileWrapper was making this fail in case of some repository with a large number of files (not sure if the fact that those files were in subdirectories mattered or not).

  • Pieter de Bie

    Pieter de Bie June 20th, 2009 @ 09:45 PM

    • Assigned user changed from “Johannes Gilger” to “Pieter de Bie”

    Thanks for your work on this bug. I completely forgot it, so it's good you came up with the commit :)

    About the commitmessage: The most important thing is what you changed, and why. You can add the bug number as an afterthought, but the commit message itself should explain everything you need to know. All lines should also be less than 80 characters wide. For example, the stuff you said just now:

    The important change in this commit is to implement readFromURL:ofType:error: and not readFromFileWrapper:ofType:error: The default implementation of readFromURL was calling your implementation of readFromFileWrapper but the bug in NSFileWrapper was making this fail in case of some repository with a large number of files (not sure if the fact that those files were in subdirectories mattered or not).

    should be part of the commit message.

    About the commit itself: because the change is also non-obvious, you should add a comment in the code. If you also move the new code to the point where the old code was, the diff also gets smaller (which is always a good thing).

    About rewriting history: this should be easy as you only have one commit. Just make your changes and use the "Amend" checkbox in GitX to fix it. Then git push -f in the terminal to force the push.

  • Benoit Cerrina

    Benoit Cerrina June 20th, 2009 @ 10:14 PM

    Made the required changes in the commit.

  • Pieter de Bie

    Pieter de Bie June 20th, 2009 @ 10:36 PM

    Thanks!

    I edited your commit message a bit and then commited it as fa6182e2a4
    (PBGitRepository: Fix opening of large directories due to bug in NSFileWrapper.)

  • Pieter de Bie

    Pieter de Bie June 20th, 2009 @ 10:36 PM

    • State changed from “open” to “resolved”
    • Milestone set to 0.7
  • Pieter de Bie

    Pieter de Bie June 21st, 2009 @ 04:10 AM

    I also want to point out it opens repositories much faster now :). I guess the file wrappers preload the whole directory contents, so this is a good win. Thanks a lot!

  • abigailcorkett (at gmail)

    abigailcorkett (at gmail) December 4th, 2019 @ 08:54 PM

    We are Fix My issue technical support team Which provides ESPn Activation, roku Activation, Cbs Activation support On call or via chat support

    Espn Activation

    Espn.com/activate

    Espn.com/activation

    Espn Activate

    ROku Activation

    ROku.com/links

  • skywebppc (at gmail)

    skywebppc (at gmail) December 30th, 2019 @ 12:31 PM

    i-LEND is an online marketplace connecting borrowers and lenders for loans. Although i-LEND verifies credentials of registered users on the site, it does not guarantee any loan offers by lenders nor does it guarantee any repayments by borrowers. Users make offers/loan requests at their own discretion with the understanding of the risks involved in such transactions including loss of entire capital and/or no guarantee of recovery. Please read our Legal agreements to understand more.

    online loans Personal Loans Online Money Invest P2P

  • skywebppc (at gmail)

    skywebppc (at gmail) December 30th, 2019 @ 12:32 PM

    i-LEND is an online marketplace connecting borrowers and lenders for loans. Although i-LEND verifies credentials of registered users on the site, it does not guarantee any loan offers by lenders nor does it guarantee any repayments by borrowers. Users make offers/loan requests at their own discretion with the understanding of the risks involved in such transactions including loss of entire capital and/or no guarantee of recovery. Please read our Legal agreements to understand more.

    online loans Personal Loans Online Money Invest P2P

  • skywebppc (at gmail)

    skywebppc (at gmail) January 7th, 2020 @ 05:08 PM

    Global Interscope is the best swimming pools designing in Hyderabad where the you can get all the facilities to improve better.
    We do Swimming Pools Designing, Execution, Equipment Supplies, Services and Lifestyle Products.

    Swimming pool manufacturers
    Swimming pool manufacturer in Hyderabad
    Swimming pool equipment in hyderabad
    swimming pool equipment services in hyderabad
    swimming pool equipment supplier in hyderabad
    swimming pool contractors in hyderabad
    swimming pool manufacturing services in hyderabad

  • skywebppc (at gmail)

    skywebppc (at gmail) January 7th, 2020 @ 05:08 PM

    Global Interscope is the best swimming pools designing in Hyderabad where the you can get all the facilities to improve better.
    We do Swimming Pools Designing, Execution, Equipment Supplies, Services and Lifestyle Products.

    Swimming pool manufacturers
    Swimming pool manufacturer in Hyderabad
    Swimming pool equipment in hyderabad
    swimming pool equipment services in hyderabad
    swimming pool equipment supplier in hyderabad
    swimming pool contractors in hyderabad
    swimming pool manufacturing services in hyderabad

  • robinjack
  • robinjack
  • robinjack
  • robinjack
  • robinjack
  • robinjack
  • robinjack
  • robinjack

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

GitX is the nice-looking gitk clone for OS X

Referenced by

Pages