1. 22 11月, 2006 7 次提交
  2. 21 11月, 2006 10 次提交
    • S
      git-gui: Include the Tcl/Tk version in the about dialog. · 53f7a33b
      Shawn O. Pearce 提交于
      Users may need to know what version of Tcl they are running git-gui
      under, in case there is an interesting interface quirk or other
      compatability problem we don't know about right now that we may
      need to explore (and maybe fix).  Since its simple enough to show
      a line with this version data we should do so.
      
      We also try to reduce the amount of text shown as often the Tcl and Tk
      version numbers will be identical; when this happens we should only show
      the one version number.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      53f7a33b
    • S
      git-gui: Make the copyright notice serve double duty. · bdc9ea20
      Shawn O. Pearce 提交于
      The copyright notice we display in the about dialog should be the same
      as the one at the top of our source code.  By putting the copyright
      notice that appears at the top of our source code into a global variable
      rather than a comment we can trivially make them the same at all times.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      bdc9ea20
    • S
      git-gui: Be more Macintosh like. · 0c8d7839
      Shawn O. Pearce 提交于
      It is tradition for applications to store their about and preferences
      menu options within the application menu.  This is the first menu in
      the menu bar, just after the apple menu.  Apparently the way to access
      this menu from Tk on Mac OS X systems is to create a special menu whose
      name ends in ".apple" and place it into the menu bar.
      
      So now if we are on Mac OS X we move our about menu and our options menu
      into the application menu, like other Mac OS X applications.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      0c8d7839
    • S
      git-gui: Added about dialog box. · 82aa2354
      Shawn O. Pearce 提交于
      Created a help menu with an about dialog box.  This about dialog
      shows the copyright notice for the application, the fact that it
      is covered by the GPL v2.0 or later, the authors, and the current
      version of Git it is invoking when users perform actions within it.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      82aa2354
    • S
      git-gui: Rename Project menu to Repository. · a4abfa62
      Shawn O. Pearce 提交于
      Since all of the actions in our Project menu actually apply to the
      Git concept of a repository, it is a disservice to our users to
      call it "project".  This is especially true if Git ever gets any
      sort of subproject support, as the term would then most definately
      conflict.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      a4abfa62
    • S
      git-gui: Seperate out the database operations in project menu. · 75e355d6
      Shawn O. Pearce 提交于
      The project menu is just too cluttered without using separator entries
      to split out the database operations (such as repack and verify) from
      the other options in the same menu.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      75e355d6
    • S
      git-gui: Reworded verify console title. · 93a79912
      Shawn O. Pearce 提交于
      It would be something of a disservice to our users if we refer to
      fsck-objects as "verify".  So instead we call it fsck-objects in
      the console title, and indicate that's how we are verifying the
      object database.
      
      We probably should call our menu option "fsck-objects" or similar
      but I really do think that "Verify Database" more accurately describes
      the action then "fsck-objects" does, especially to users who aren't
      file system developers.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      93a79912
    • S
      git-gui: Don't save amended commit message buffer. · 21d7744f
      Shawn O. Pearce 提交于
      Because we don't automatically restart in amend mode when we quit while
      in amend mode the commit message buffer shouldn't be saved to GITGUI_MSG
      as it would be misleading when the user restarts the application.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      21d7744f
    • S
      git-gui: Allow users to run fsck-objects from the gui. · 444f92d0
      Shawn O. Pearce 提交于
      I recently found a need to run fsck-objects in a number of repositories
      that I also use git-gui against.  Tossing in a menu option to invoke
      fsck-objects and have its output show up in a console window is simple
      enough to do.
      
      We probably need to enhance the console window used by fsck-objects,
      like to open up the Git fsck-objects manual page and let the user see
      what each message means (such as "dangling commit") and to also let the
      user invoke prune, to cleanup any such dangling objects.  But right now
      I'm going to ignore that problem in favor of getting other more important
      features implemented.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      444f92d0
    • S
      git-gui: Improve handling of merge commits. · f18e40a1
      Shawn O. Pearce 提交于
      Its useful to be able to amend the last commit even if it was a merge
      commit, so we really should support that in the gui.  We now do so by
      making PARENT a list.  We always diff against the first parent but we
      create a commit consisting of the parent(s) listed in this list, in
      order.
      
      We also should recheck the repository state during an amend.  Earlier
      I was bitten by this exact bug when I switched branches through a
      command prompt and then did not do a rescan in git-gui.  When I hit
      "Amend Last Commit" I was surprised to see information from the prior
      branch appear.  This was due to git-gui caching the data from the last
      rescan and using that data form the amend data load request, rather than
      the data of the current branch.
      
      Improved error text in the dialogs used to tell the user why an amend is
      being refused by git-gui.  In general this is only during an initial
      commit (nothing prior to amend) and during a merge commit (it is simply
      too confusing to amend the last commit while also trying to complete a
      merge).
      
      Fixed a couple of minor bugs in the pull logic.  Since this code isn't
      really useful nobody has recently tested it and noticed the breakage.
      It really needs to be rewritten anyway.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      f18e40a1
  3. 19 11月, 2006 16 次提交
  4. 18 11月, 2006 7 次提交
    • S
      ef5c9715
    • S
      git-gui: Start UI with the index locked. · 53716a7b
      Shawn O. Pearce 提交于
      Because we immediately start a rescan operation, but do so slightly
      delayed (by 1 ms, to let the UI show before we start forking off
      git processes), we can't let the user try to activate any of the
      restricted GUI commands before the 1 ms timer expires and we kick
      off the rescan.
      
      So now we lock the index before we enter the Tk event loop, ensuring
      that it is impossible for the user to inject a conflicting UI event
      before our rescan can begin.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      53716a7b
    • S
      git-gui: Misc. comment formatting cleanups. · a49c67d1
      Shawn O. Pearce 提交于
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      a49c67d1
    • S
      git-gui: Add menu option to include only selected files. · c4ed879f
      Shawn O. Pearce 提交于
      When the user selects a number of files they would typically expect
      to be able to act on that selection, such as by including those files
      into the next commit.
      
      So we now have a menu option under the Commit menu that lets the user
      include only the selection, rather than everything.  If there is no
      selection but there is a file in the diff viewer than we consider that
      to be the selection (a selection of 1).  Unfortunately we don't disable
      this option yet when there's nothing selected to include, but this is
      probably not a big deal as there are very few situations where there
      are no selected files.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      c4ed879f
    • S
      git-gui: Refactor file state representations. · b6765112
      Shawn O. Pearce 提交于
      It just felt wrong to me that I was using _ as part of the mode argument
      to display_file to mean "don't care/use existing" and * as part of
      the mode argument to mean "force to _".
      
      So instead use ? to mean "don't care/use existing" and _ to mean
      "force to _".  The code is a lot clearer this way and hopefully it
      won't drive another developer insane, as it did me.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      b6765112
    • S
      git-gui: Only reshow diff when really necessary. · 32e0bcab
      Shawn O. Pearce 提交于
      I noticed that we were reshowing the current diff during a commit;
      this occurs because we feed every added and modified file through
      update-index just before commit.  During the update-index process
      we reshow the current diff if the current file in the diff pane
      was one of those added or modified files we reprocessed.  This
      just slows down the UI more than is necessary.
      
      So refactoring update_index so that we don't call reshow_diff
      from within that code; instead we do it at a higher level.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      32e0bcab
    • S
      git-gui: Make initial commits work properly. · 4539eacd
      Shawn O. Pearce 提交于
      Apparently I never really tested the logic for making or amending an
      initial commit, so although most of the code was here in git-gui it
      didn't quite work as it was intended to.
      
      So this is all just bug fixes to make initial commits correctly
      generate the list of files going into the initial commit, or to
      show a newly added file's diff, and to amend an initial commit.
      
      Because we really want to diff the index against a tree-ish and
      there is no such tree-ish on an initial commit we create an empty
      tree through git-mktree and diff against that.  This unfortunately
      creates a dangling tree, which may confuse a new user who uses
      git-gui to make a new commit and then immediately afterwards runs
      git fsck-objects to see if their object database is corrupt or not.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      4539eacd