1. 14 9月, 2008 1 次提交
  2. 12 9月, 2008 3 次提交
  3. 05 9月, 2008 11 次提交
  4. 02 9月, 2008 3 次提交
  5. 25 8月, 2008 5 次提交
  6. 13 8月, 2008 2 次提交
  7. 10 8月, 2008 1 次提交
  8. 05 8月, 2008 1 次提交
  9. 04 8月, 2008 3 次提交
  10. 03 8月, 2008 3 次提交
  11. 30 7月, 2008 4 次提交
  12. 27 7月, 2008 3 次提交
    • 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