1. 02 9月, 2008 1 次提交
  2. 13 8月, 2008 2 次提交
  3. 10 8月, 2008 1 次提交
  4. 05 8月, 2008 1 次提交
  5. 04 8月, 2008 3 次提交
  6. 03 8月, 2008 3 次提交
  7. 30 7月, 2008 4 次提交
  8. 27 7月, 2008 4 次提交
    • A
      git-gui: Preserve scroll position on reshow_diff. · 25b8fb1e
      Alexander Gavrilov 提交于
      It is especially useful for Stage/Unstage Line, because
      they invoke full state scan and diff reload, which originally
      would reset the scroll position to the top of the file.
      Signed-off-by: NAlexander Gavrilov <angavrilov@gmail.com>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      25b8fb1e
    • A
      git-gui: Fix the Remote menu separator. · 7e09b153
      Alexander Gavrilov 提交于
      It was positioned incorrectly (offset by one position)
      if the menu had a tear-off handle.
      Signed-off-by: NAlexander Gavrilov <angavrilov@gmail.com>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      7e09b153
    • J
      git-gui: "Stage Line": Treat independent changes in adjacent lines better · c7f74570
      Johannes Sixt 提交于
      Assume that we want to commit these states:
      
        Old state == HEAD    Intermediate state   New state
        --------------------------------------------------------
        context before       context before       context before
        old 1                new 1                new 1
        old 2                old 2                new 2
        context after        context after        context after
      
      that is, want to commit two changes in this order:
      
        1. transform "old 1" into "new 1"
        2. transform "old 2" into "new 2"
      
      [This discussion and this patch is about this very case and one other case
      as outlined below; any other intermediate states that one could imagine are
      not affected by this patch.]
      
      Now assume further, that we have not staged and commited anything, but we
      have already changed the working file to the new state. Then we will see
      this hunk in the "Unstaged Changes":
      
        @@ -1,4 +1,4 @@
         context before
        -old 1
        -old 2
        +new 1
        +new 2
         context after
      
      The obvious way to stage the intermediate state is to apply "Stage This
      Line" to "-old 1" and "+new 1". Unfortunately, this resulted in this
      intermediate state:
      
        context before
        old 2
        new 1
        context after
      
      which is not what we wanted. In fact, it was impossible to stage the
      intermediate state using "Stage Line". The crux was that if a "+" line was
      staged, then the "-" lines were converted to context lines and arranged
      *before* the "+" line in the forged hunk that we fed to 'git apply'.
      
      With this patch we now treat "+" lines that are staged differently. In
      particular, the "-" lines before the "+" block are moved *after* the
      staged "+" line. Now it is possible to get the correct intermediate state
      by staging "-old 1" and "+new 1". Problem solved.
      
      But there is a catch.
      
      Noticing that we didn't get the right intermediate state by staging
      "-old 1" and "+new 1", we could have had the idea to stage the complete
      hunk and to *unstage* "-old 2" and "+new 2". But... the result is the same.
      The reason is that there is the exact symmetric problem with unstaging the
      last "-" and "+" line that are in adjacent blocks of "-" and "+" lines.
      
      This patch does *not* change the way in which "-" lines are *unstaged*.
      
      Why? Because if we did (i.e. move "+" lines before the "-" line after
      converting them to context lines), then it would be impossible to stage
      this intermediate state:
      
        context before
        old 1
        new 2
        context after
      
      that is, it would be impossible to stage the two independet changes in the
      opposite order.
      
      Let's look at this case a bit further: The obvious way to get this
      intermediate state would be to apply "Stage This Line" to "-old 2" and
      "+new 2". Before this patch, this worked as expected. With this patch, it
      does not work as expected, but it can still be achieved by first staging
      the entire hunk, then *unstaging* "-old 1" and "+new 1".
      
      In summary, this patch makes a common case possible, at the expense that
      a less common case is made more complicated for the user.
      Signed-off-by: NJohannes Sixt <johannes.sixt@telecom.at>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      c7f74570
    • J
      git-gui: Fix "Stage/Unstage Line" with one line of context. · fa6b5b39
      Johannes Sixt 提交于
      To "Stage/Unstage Line" we construct a patch that contains exactly one
      change (either addition or removal); the hunk header was forged by counting
      the old side and adjusting the count by +/-1 for the new side. But when we
      counted the context we never counted the changed line itself. If the hunk
      had only one removal line and one line of context, like this:
      
          @@ -1,3 +1,2 @@
           context 1
          -removal
           context 2
      
      We had constructed this patch:
      
          @@ -1,2 +1,1 @@
           context 1
          -removal
           context 2
      
      which does not apply because git apply deduces that it must apply at the
      end of the file. ("context 2" is considered garbage and ignored.) The fix
      is that removal lines must be counted towards the context of the old side.
      Signed-off-by: NJohannes Sixt <johannes.sixt@telecom.at>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      fa6b5b39
  9. 26 7月, 2008 2 次提交
  10. 17 7月, 2008 4 次提交
  11. 14 7月, 2008 1 次提交
  12. 08 7月, 2008 1 次提交
  13. 02 7月, 2008 1 次提交
    • J
      git-gui: Implement "Stage/Unstage Line" · 5821988f
      Johannes Sixt 提交于
      This adds a context menu entry below "Stage/Unstage Hunk" that stages or
      unstages just the line under the mouse pointer.
      
      This is by itself useful, for example, if there are unrelated changes in
      the same hunk and the hunk cannot be split by reducing the context.
      
      The feature can also be used to split a hunk by staging a number of
      additions (or unstaging a number of removals) until there are enough
      context lines that the hunk gets split.
      
      The implementation reads the complete hunk that the line lives in, and
      constructs a new hunk by picking existing context lines, removing unneeded
      change lines and transforming other change lines to context lines. The
      resulting hunk is fed through 'git apply' just like in the "Stage/Unstage
      Hunk" case.
      Signed-off-by: NJohannes Sixt <johannes.sixt@telecom.at>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      5821988f
  14. 26 6月, 2008 1 次提交
  15. 21 6月, 2008 1 次提交
  16. 14 6月, 2008 1 次提交
    • A
      git-gui: Move on to the next filename after staging/unstaging a change · 8a965b8e
      Abhijit Menon-Sen 提交于
      Suppose the "Unstaged Changes" pane contains a list of files, and one of
      them is selected (i.e., that diff is currently being displayed). If one
      clicks on the icon to stage the change, git-gui clears the diff and one
      has to click on another filename to see the next diff in the list.
      
      This patch changes that behaviour. If one clicks on the icon to stage
      (or unstage) the file whose diff is being displayed, git-gui will move
      on to the next filename in the list and display that diff instead of a
      blank diff pane. If the selected file was at the end of the list, the
      diff pane will display the previous diff instead; if the selected file
      was the only one listed, the diff pane will become blank.
      
      If no diff is currently being displayed, this patch changes nothing.
      Signed-off-by: NAbhijit Menon-Sen <ams@toroid.org>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      8a965b8e
  17. 27 5月, 2008 1 次提交
    • T
      git-gui: Vertically align textboxes with labels · 95dcfa36
      Twiinz 提交于
      In git-gui after clicking either on 'Create New Repository' or
      'Open Existing Repository' the form elements aren't centered like
      they are pretty much everywhere else in the app. At least when ran
      on a mac, haven't checked on other platforms.
      
      Using grid instead of pack seems to fix this.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      95dcfa36
  18. 22 5月, 2008 1 次提交
    • S
      git-gui: Handle workdir detection when CYGWIN=nowinsymlinks · 7f83aa2d
      Shawn O. Pearce 提交于
      If the user has put nowinsymlinks into their CYGWIN environment
      variable any symlinks created by a Cygwin process (e.g. ln -s)
      will not have the ".lnk" suffix.  In this case workdir is still
      a workdir, but our detection of looking for "info.lnk" fails
      as the symlink is actually a normal file called "info".
      
      Instead we just always use Cygwin's test executable to see if
      info/exclude is a file.  If it is, we assume from there on it
      can be read by git-ls-files --others and is thus safe to use
      on the command line.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      7f83aa2d
  19. 21 5月, 2008 1 次提交
    • S
      git-gui: Add a --trace command line option · 16dd62ac
      Shawn O. Pearce 提交于
      Often new Git users want to know what commands git-gui uses to make
      changes, so they can learn the command line interface by mimicking
      what git-gui does in response to GUI actions.  Showing the direct
      commands being executed is easy enough to implement but this is of
      little value to end-users because git-gui frequently directly calls
      plumbing, not porcelain.
      
      Since the code is already written and tested, its fairly harmless
      to include.  It may not help a new end-user, but it can help with
      debugging git-gui or reverse-engineering its logic to further make
      changes to it or implement another GUI for Git.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      16dd62ac
  20. 09 5月, 2008 2 次提交
  21. 02 5月, 2008 1 次提交
  22. 24 4月, 2008 2 次提交
    • S
      Merge branch 'maint' · ca194048
      Shawn O. Pearce 提交于
      * maint:
        git-gui: Don't use '$$cr master' with aspell earlier than 0.60
      ca194048
    • S
      git-gui: Don't use '$$cr master' with aspell earlier than 0.60 · ddc36031
      Shawn O. Pearce 提交于
      Apparently aspell 0.50 does not recognize "$$cr master" as a command,
      but instead tries to offer suggestions for how to correctly spell
      the word "cr".  This is not quite what we are after when we want
      the name of the current dictionary.
      
      Instead of locking up git-gui waiting for a response that may never
      come back from aspell we avoid sending this command if the binary
      we have started claims to be before version 0.60.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      ddc36031
  23. 15 4月, 2008 1 次提交