1. 08 7月, 2007 1 次提交
  2. 04 7月, 2007 4 次提交
  3. 03 7月, 2007 2 次提交
    • M
    • A
      Make git-prune submodule aware (and fix a SEGFAULT in the process) · 8d2244ba
      Andy Parkins 提交于
      I ran git-prune on a repository and got this:
      
       $ git-prune
       error: Object 228f8065b930120e35fc0c154c237487ab02d64a is a blob, not a commit
       Segmentation fault (core dumped)
      
      This repository was a strange one in that it was being used to provide
      its own submodule.  That is, the repository was cloned into a
      subdirectory, an independent branch checked out in that subdirectory,
      and then it was marked as a submodule.  git-prune then failed in the
      above manner.
      
      The problem was that git-prune was not submodule aware in two areas.
      
      Linus said:
      
       > So what happens is that something traverses a tree object, looks at each
       > entry, sees that it's not a tree, and tries to look it up as a blob. But
       > subprojects are commits, not blobs, and then when you look at the object
       > more closely, you get the above kind of object type confusion.
      
      and included a patch to add an S_ISGITLINK() test to reachable.c's
      process_tree() function.  That fixed the first git-prune error, and
      stopped it from trying to process the gitlink entries in trees as if
      they were pointers to other trees (and of course failing, because
      gitlinks _aren't_ trees).  That part of this patch is his.
      
      The second area is add_cache_refs().  This is called before starting the
      reachability analysis, and was calling lookup_blob() on every object
      hash found in the index.  However, it is no longer true that every hash
      in the index is a pointer to a blob, some of them are gitlinks, and are
      not backed by any object at all, they are commits in another repository.
      Normally this bug was not causing any problems, but in the case of the
      self-referencing repository described above, it meant that the gitlink
      hash was being marked as being of type OBJ_BLOB by add_cache_refs() call
      to lookup_blob().  Then later, because that hash was also pointed to by
      a ref, add_one_ref() would treat it as a commit; lookup_commit() would
      return a NULL because that object was already noted as being an
      OBJ_BLOB, not an OBJ_COMMIT; and parse_commit_buffer() would SEGFAULT on
      that NULL pointer.
      
      The fix made by this patch is to not blindly call lookup_blob() in
      reachable.c's add_cache_refs(), and instead skip any index entries that
      are S_ISGITLINK().
      Signed-off-by: NAndy Parkins <andyparkins@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8d2244ba
  4. 02 7月, 2007 1 次提交
  5. 01 7月, 2007 3 次提交
  6. 29 6月, 2007 1 次提交
  7. 27 6月, 2007 7 次提交
  8. 22 6月, 2007 1 次提交
    • S
      git-gui: Don't require $DISPLAY just to get --version · 4e817d1a
      Shawn O. Pearce 提交于
      Junio asked that we don't force the user to have a valid X11 server
      configured in $DISPLAY just to obtain the output of `git gui version`.
      This makes sense, the user may be an automated tool that is running
      without an X server available to it, such as a build script or other
      sort of package management system.  Or it might just be a user working
      in a non-GUI environment and wondering "what version of git-gui do I
      have installed?".
      
      Tcl has a lot of warts, but one of its better ones is that a comment
      can be continued to the next line by escaping the LF that would have
      ended the comment using a backslash-LF sequence.  In the past we have
      used this trick to escape away the 'exec wish' that is actually a Bourne
      shell script and keep Tcl from executing it.
      
      I'm using that feature here to comment out the Bourne shell script and
      hide it from the Tcl engine.  Except now our Bourne shell script is a
      few lines long and checks to see if it should print the version, or not.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      4e817d1a
  9. 21 6月, 2007 2 次提交
    • S
      git-gui: Bind Tab/Shift-Tab to cycle between panes in blame · fb626dc0
      Shawn O. Pearce 提交于
      The blame viewer is composed of two different areas, the file
      area on top and the commit area on the bottom.  If users are
      trying to shift the focus it is probably because they want to
      shift from one area to the other, so we just setup Tab and
      Shift-Tab to jump from the one half to the other in a cycle.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      fb626dc0
    • S
      git-gui: Correctly install to /usr/bin on Cygwin · 82a2d6bd
      Shawn O. Pearce 提交于
      Mark Levedahl <mlevedahl@gmail.com> noted that installation on Cygwin
      to /usr/bin can cause problems with the automatic guessing of our
      library location.  The problem is that installation to /usr/bin
      means we actually have:
      
        /usr/bin   = c:\cygwin\bin
        /usr/share = c:\cygwin\usr\share
      
      So git-gui guesses that its library should be found within the
      c:\cygwin\share directory, as that is where it should be relative
      to the script itself in c:\cygwin\bin.
      
      In my first version of this patch I tried to use `cygpath` to resolve
      /usr/bin and /usr/share to test that they were in the same relative
      locations, but that didn't work out correctly as we were actually
      testing /usr/share against itself, so it always was equal, and we
      always used relative paths.  So my original solution was quite wrong.
      
      Mark suggested we just always disable relative behavior on Cygwin,
      because of the complexity of the mount mapping problem, so that's
      all I'm doing.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      82a2d6bd
  10. 16 6月, 2007 9 次提交
  11. 13 6月, 2007 2 次提交
  12. 12 6月, 2007 6 次提交
  13. 11 6月, 2007 1 次提交
    • J
      Merge branch 'maint' of git://repo.or.cz/git-gui into maint · c288a2f1
      Junio C Hamano 提交于
      * 'maint' of git://repo.or.cz/git-gui: (46 commits)
        git-gui: Changed blame header bar background to match main window
        git-gui: Favor the original annotations over the recent ones
        git-gui: Improve our labeling of blame annotation types
        git-gui: Use three colors for the blame viewer background
        git-gui: Jump to original line in blame viewer
        git-gui: Display both commits in our tooltips
        git-gui: Run blame twice on the same file and display both outputs
        git-gui: Display the "Loading annotation..." message in italic
        git-gui: Rename fields in blame viewer to better descriptions
        git-gui: Label the uncommitted blame history entry
        git-gui: Switch internal blame structure to Tcl lists
        git-gui: Cleanup redundant column management in blame viewer
        git-gui: Better document our blame variables
        git-gui: Remove unused commit_list from blame viewer
        git-gui: Automatically expand the line number column as needed
        git-gui: Make the line number column slightly wider in blame
        git-gui: Use lighter colors in blame view
        git-gui: Remove unnecessary space between columns in blame viewer
        git-gui: Remove the loaded column from the blame viewer
        git-gui: Clip the commit summaries in the blame history menu
        ...
      c288a2f1