1. 14 8月, 2009 1 次提交
  2. 13 8月, 2009 4 次提交
    • T
      gitk: Parse arbitrary commit-ish in SHA1 field · 9bf3acfa
      Thomas Rast 提交于
      We only accepted either SHA1s or heads/tags that have been read.  This
      meant the user could not, e.g., enter HEAD to go back to the current
      commit.
      
      This adds code to call out to git rev-parse --verify if all other
      methods of interpreting the string the user entered fail.
      (git-rev-parse alone is not enough as we really want a single
      revision.)
      
      The error paths change slighly, because we now know from the rev-parse
      invocation whether the expression was valid at all.  The previous
      "unknown" path is now only triggered if the revision does exist, but
      is not in the current view display.
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      9bf3acfa
    • T
      gitk: Fix direction of symmetric difference in optimized mode · 2b1fbf90
      Thomas Rast 提交于
      ee66e089 (gitk: Make updates go faster, 2008-05-09) implemented an
      optimized mode where gitk parses the arguments with rev-parse, and
      manually reads history in chunks.  As mentioned in the commit message,
      symmetric differences are a problem there:
      
          One wrinkle is that we have to turn symmetric diff arguments (of the
          form a...b) back into symmetric diff form so that --left-right still
          works, as git rev parse turns a...b into a b ^merge_base(a,b).
      
      However, git-rev-parse returns a...b in the swapped order
      
          b a ^merge_base(a,b)
      
      This has been the case since at least 1f8115b1 (the state of master at
      the time of the abovementioned ee66e089; Merge branch 'maint',
      2008-05-08).  So gitk flipped the sides of symmetric differences
      whenever it was in optimized mode.
      
      Fix this by swapping the sides of the reconstruction code.
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      2b1fbf90
    • T
      gitk: New option to hide remote refs · ffe15297
      Thomas Rast 提交于
      In repositories with lots of remotes, looking at the history in gitk
      can be borderline insane with all the red labels for remote refs.
      Introduce a new option in the preferences that makes gitk ignore
      remote refs entirely, so they don't take up space in the display.
      Wished-for-by: NThell Fowler <tbfowler4@gmail.com>
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ffe15297
    • J
      gitk: Do not hard-code "encoding" in attribute lookup functions · 097e1118
      Johannes Sixt 提交于
      Commit 39ee47ef (Clean up file encoding code and add enable/disable option,
      2008-10-15) rewrote the attribute lookup functions gitattr and
      cache_gitattr, but in the process hard-coded the attribute name "encoding"
      instead of using the functions' parameters. This fixes it.
      
      This is not a serious regression because currently all callers look only
      for "encoding".
      
      Further note that this fix assumes that future callers will not pass an
      attribute name that contains regex special characters.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      097e1118
  3. 25 5月, 2009 3 次提交
  4. 19 5月, 2009 1 次提交
  5. 16 5月, 2009 4 次提交
  6. 01 5月, 2009 1 次提交
  7. 21 4月, 2009 1 次提交
    • P
      gitk: Fix compare-commits function when we have local changes · 6f63fc18
      Paul Mackerras 提交于
      This fixes a bug in the compare-commits function added in commit
      010509f2 ("gitk: Add a command to compare two strings of commits")
      where gitk would show an error dialog if the comparison of commits
      got to a fake commit (one showing local changes).  It extends
      getpatchid to handle these fake commits by using [diffcmd] to get
      the git diff command variant to use, and also handles the situation
      where an error occurs.
      
      Now that we can have the fake commit IDs showing up, which are
      00..00 and 00..01, the short ID is ambiguous.  To make sure the links
      point to the right commit, this adds a new [appendshortlink] procedure
      which takes the full link destination, and uses that rather than
      appendwithlinks.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6f63fc18
  8. 17 4月, 2009 7 次提交
  9. 09 4月, 2009 2 次提交
    • P
      gitk: Add a command to compare two strings of commits · 010509f2
      Paul Mackerras 提交于
      This adds a row context menu command to compare this commit and its
      descendants with the marked commit and its descendants.  The results
      are shown in the bottom-left pane.  Commits are compared by checking
      whether their headlines are the same and their patches have the same
      patch ID as generated by git patch-id.
      
      Merges are ignored and skipped over (as long as they have one
      descendant).  If two commits have the same patch ID then the process
      will continue and compare their descendants, as long as they both have
      exactly one descendant.  If either commit has 0 or 2 or more descendants,
      the comparison stops there.  There is currently a limit of 100
      comparisons.
      
      This can be useful for checking whether one string of commits is just
      a rebased version of another string of commits.  Mark the end of one
      string (i.e. the oldest commit in the string) and invoke "Compare with
      marked commit" on the end of the other string.
      
      As this is implemented, the UI will be unresponsive while the results
      are being generated.  This should be fixed.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      010509f2
    • P
      gitk: Add a way to mark a commit, plus a "find descendant" command · b9fdba7f
      Paul Mackerras 提交于
      This adds a context-menu command to put a mark on this commit.  There
      is at most one marked commit at any time, and it is indicated by a box
      drawn around the headline.  Once a commit is marked, two other
      context-menu commands become available: one to select the marked commit,
      and another to find the closest common descendant of this commit and
      the marked commit.
      
      The "find common descendant" command uses the displayed parent/child
      relationships (i.e. the rewritten parent pointers produced by git log),
      not the real parent/child relationships.  Currently the UI will be
      unresponsive while gitk is working out the nearest common descendant;
      this should be improved in future.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b9fdba7f
  10. 23 3月, 2009 4 次提交
  11. 02 3月, 2009 1 次提交
    • P
      gitk: Fix possible infinite loop and display corruption · 52b8ea93
      Paul Mackerras 提交于
      This fixes an issue reported by Johannes Sixt on the git mailing list:
      
      > This recipe sends gitk into an endless loop. In git.git do:
      >
      > cd t
      > # remove chmod a+x A near the end of the file
      > sed -i 's/chmod/: chmod/' t3400-rebase.sh
      > sh t3400-rebase.sh --debug
      > cd trash\ directory.t3400-rebase/
      > gitk master modechange modechange@{1}
      >
      >
      > I briefly see the history chart, but the dot that should be modechange@{1}
      > is missing. One automatically selected commit is shown in the diff section
      > below. But then the commit list is cleared and gitk goes into an infinite
      > loop.
      >
      > Things work alright if either modechange@{1} is dropped, or the 'chmod'
      > line is left unchanged, which is a bit strange.
      >
      > This is with git version 1.6.1.2.390.gba743
      
      There were actually two problems.  This recipe created a situation where
      git log would output a child commit after its parent.  This meant that
      we called fix_reversal which called splitvarc, which should call modify_arc
      to note the fact that it has modified the arc that it has just split.  It
      wasn't, which meant that displayorder and other variables got into an
      inconsistent state (a commit appearing twice in displayorder).
      
      This then meant that the targetrow/targetid logic in drawvisible thought
      it need to redraw each time.  That, together with the fact that drawvisible
      called drawcommits which called drawvisible if a redraw was needed, led
      to the infinite loop.
      
      In fact drawvisible is now the only caller of drawcommits.  Thus, the
      start and end row arguments to drawcommits always encompass the whole
      visible area, so drawcommits doesn't need to call drawvisible to redraw;
      it just needs to clear the screen and draw what it's been asked to.
      
      This fixes these two problems by adding a call to modify_arc in
      splitvarc and by taking out the call to drawvisible in drawcommits.
      It also removes an unrelated left-over debugging puts in external_blame.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      52b8ea93
  12. 22 12月, 2008 7 次提交
  13. 06 12月, 2008 1 次提交
    • P
      gitk: Fix bugs in blaming code · 9712b81a
      Paul Mackerras 提交于
      The "show origin of this line" function wasn't working when gitk was
      run in a subdirectory, since it passed the path relative to the
      top-level directory to git blame.  This fixes it by passing the
      absolute path to the file instead of the relative path.
      
      The same problem occurs when running git gui blame, except that
      git gui blame appears not to be able to accept an absolute path to the
      file, so we make a relative path using a new [make_relative] function.
      
      Finally, this fixes a bug in [show_line_source] where we weren't
      setting id, resulting in an error when trying to find the origin of
      a line in the fake commit for local changes not checked in, when its
      parent was a real commit (i.e. there were no changes checked in).
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      9712b81a
  14. 02 12月, 2008 3 次提交