1. 14 Jan, 2010 4 commits
    • Jeff King's avatar
      commit: allow suppression of implicit identity advice · b706fcfe
      Jeff King authored
      We now nag the user with a giant warning when their identity
      was pulled from the username, hostname, and gecos
      information, in case it is not correct. Most users will
      suppress this by simply setting up their information
      correctly.
      
      However, there may be some users who consciously want to use
      that information, because having the value change from host
      to host contains useful information. These users can now set
      advice.implicitidentity to false to suppress the message.
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      b706fcfe
    • Jeff King's avatar
      commit: show interesting ident information in summary · 49ff9a7a
      Jeff King authored
      There are a few cases of user identity information that we consider
      interesting:
      
        (1) When the author and committer identities do not match.
      
        (2) When the committer identity was picked automatically from the
            username, hostname and GECOS information.
      
      In these cases, we already show the information in the commit
      message template. However, users do not always see that template
      because they might use "-m" or "-F". With this patch, we show these
      interesting cases after the commit, along with the subject and
      change summary. The new output looks like:
      
        $ git commit \
            -m "federalist papers" \
            --author='Publius <[email protected]>'
        [master 3d226a7] federalist papers
         Author: Publius <[email protected]>
         1 files changed, 1 insertions(+), 0 deletions(-)
      
      for case (1), and:
      
        $ git config --global --unset user.name
        $ git config --global --unset user.email
        $ git commit -m foo
        [master 7c2a927] foo
         Committer: Jeff King <[email protected]>
        Your name and email address were configured automatically based
        on your username and hostname. Please check that they are accurate.
        You can suppress this message by setting them explicitly:
      
            git config --global user.name Your Name
            git config --global user.email [email protected]
      
        If the identity used for this commit is wrong, you can fix it with:
      
            git commit --amend --author='Your Name <[email protected]>'
      
         1 files changed, 1 insertions(+), 0 deletions(-)
      
      for case (2).
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      49ff9a7a
    • Jeff King's avatar
      strbuf: add strbuf_addbuf_percentquote · 361df5df
      Jeff King authored
      This is handy for creating strings which will be fed to printf() or
      strbuf_expand().
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      361df5df
    • Jeff King's avatar
      strbuf_expand: convert "%%" to "%" · 0a0416a3
      Jeff King authored
      The only way to safely quote arbitrary text in a pretty-print user
      format is to replace instances of "%" with "%x25". This is slightly
      unreadable, and many users would expect "%%" to produce a single
      "%", as that is what printf format specifiers do.
      
      This patch converts "%%" to "%" for all users of strbuf_expand():
      
       (1) git-daemon interpolated paths
      
       (2) pretty-print user formats
      
       (3) merge driver command lines
      
      Case (1) was already doing the conversion itself outside of
      strbuf_expand(). Case (2) is the intended beneficiary of this patch.
      Case (3) users probably won't notice, but as this is user-facing
      behavior, consistently providing the quoting mechanism makes sense.
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      0a0416a3
  2. 23 Dec, 2009 3 commits
  3. 22 Dec, 2009 3 commits
  4. 21 Dec, 2009 8 commits
  5. 20 Dec, 2009 4 commits
  6. 19 Dec, 2009 1 commit
  7. 18 Dec, 2009 2 commits
  8. 16 Dec, 2009 6 commits
    • Junio C Hamano's avatar
      Git 1.6.6-rc3 · 94058a90
      Junio C Hamano authored
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      94058a90
    • Junio C Hamano's avatar
      Merge branch 'maint' to sync with 1.6.5.7 · a1bb8f45
      Junio C Hamano authored
      * maint:
        Git 1.6.5.7
        worktree: don't segfault with an absolute pathspec without a work tree
        ignore unknown color configuration
        help.autocorrect: do not run a command if the command given is junk
        Illustrate "filter" attribute with an example
      a1bb8f45
    • Junio C Hamano's avatar
      Git 1.6.5.7 · 527b9d70
      Junio C Hamano authored
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      527b9d70
    • Junio C Hamano's avatar
      worktree: don't segfault with an absolute pathspec without a work tree · b3100fd5
      Junio C Hamano authored
      If a command is run with an absolute path as a pathspec inside a bare
      repository, e.g. "rev-list HEAD -- /home", the code tried to run strlen()
      on NULL, which is the result of get_git_work_tree(), and segfaulted.  It
      should just fail instead.
      
      Currently the function returns NULL even inside .git/ in a repository
      with a work tree, but that is a separate issue.
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      b3100fd5
    • Jeff King's avatar
      ignore unknown color configuration · 8b8e8624
      Jeff King authored
      When parsing the config file, if there is a value that is
      syntactically correct but unused, we generally ignore it.
      This lets non-core porcelains store arbitrary information in
      the config file, and it means that configuration files can
      be shared between new and old versions of git (the old
      versions might simply ignore certain configuration).
      
      The one exception to this is color configuration; if we
      encounter a color.{diff,branch,status}.$slot variable, we
      die if it is not one of the recognized slots (presumably as
      a safety valve for user misconfiguration). This behavior
      has existed since 801235c5 (diff --color: use
      $GIT_DIR/config, 2006-06-24), but hasn't yet caused a
      problem. No porcelain has wanted to store extra colors, and
      we once a color area (like color.diff) has been introduced,
      we've never changed the set of color slots.
      
      However, that changed recently with the addition of
      color.diff.func. Now a user with color.diff.func in their
      config can no longer freely switch between v1.6.6 and older
      versions; the old versions will complain about the existence
      of the variable.
      
      This patch loosens the check to match the rest of
      git-config; unknown color slots are simply ignored. This
      doesn't fix this particular problem, as the older version
      (without this patch) is the problem, but it at least
      prevents it from happening again in the future.
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      8b8e8624
    • Johannes Sixt's avatar
      help.autocorrect: do not run a command if the command given is junk · 06500a02
      Johannes Sixt authored
      If a given command is not found, then help.c tries to guess which one the
      user could have meant. If help.autocorrect is 0 or unset, then a list of
      suggestions is given as long as the dissimilarity between the given command
      and the candidates is not excessively high. But if help.autocorrect was
      non-zero (i.e., a delay after which the command is run automatically), the
      latter restriction on dissimilarity was not obeyed.
      
      In my case, this happened:
      
       $ git ..daab02
       WARNING: You called a Git command named '..daab02', which does not exist.
       Continuing under the assumption that you meant 'read-tree'
       in 4.0 seconds automatically...
      
      The patch reuses the similarity limit that is also applied when the list of
      suggested commands is printed.
      Signed-off-by: default avatarJohannes Sixt <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      06500a02
  9. 15 Dec, 2009 1 commit
  10. 12 Dec, 2009 1 commit
  11. 11 Dec, 2009 2 commits
  12. 10 Dec, 2009 4 commits
  13. 09 Dec, 2009 1 commit
    • Junio C Hamano's avatar
      Merge git://repo.or.cz/git-gui · 529f8c6e
      Junio C Hamano authored
      * git://repo.or.cz/git-gui:
        git-gui: suppress RenderBadPicture X error caused by Tk bug
        git-gui: Increase blame viewer usability on MacOS.
        git-gui: search 4 directories to improve statistic of gc hint
        git gui: make current branch default in "remote delete branch" merge check
      529f8c6e