Permalink
Commits on Nov 26, 2012
  1. @gitster

    Git 1.8.0.1

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Nov 26, 2012
  2. @gitster

    Merge branch 'jk/checkout-out-of-unborn' into maint

    * jk/checkout-out-of-unborn:
      checkout: print a message when switching unborn branches
    gitster committed Nov 26, 2012
  3. @gitster

    Merge branch 'cn/config-missing-path' into maint

    * cn/config-missing-path:
      config: don't segfault when given --path with a missing value
    gitster committed Nov 26, 2012
  4. @gitster

    Merge branch 'jk/maint-gitweb-xss' into maint

    Fixes an XSS vulnerability in gitweb.
    
    * jk/maint-gitweb-xss:
      gitweb: escape html in rss title
    gitster committed Nov 26, 2012
Commits on Nov 25, 2012
  1. @marckhouzam @gitster

    Completion must sort before using uniq

    The user can be presented with invalid completion results
    when trying to complete a 'git checkout' command.  This can happen
    when using a branch name prefix that matches multiple remote branches.
    
    For example, if available branches are:
      master
      remotes/GitHub/maint
      remotes/GitHub/master
      remotes/origin/maint
      remotes/origin/master
    
    When performing completion on 'git checkout ma' the user will be
    given the choices:
      maint
      master
    
    However, 'git checkout maint' will fail in this case, although
    completion previously said 'maint' was valid.  Furthermore, when
    performing completion on 'git checkout mai', no choices will be
    suggested.  So, the user is first told that the branch name
    'maint' is valid, but when trying to complete 'mai' into 'maint',
    that completion is no longer valid.
    
    The completion results should never propose 'maint' as a valid
    branch name, since 'git checkout' will refuse it.
    
    The reason for this bug is that the uniq program only
    works with sorted input.  The man page states
    "uniq prints the unique lines in a sorted file".
    
    When __git_refs uses the guess heuristic employed by checkout for
    tracking branches it wants to consider remote branches but only if
    the branch name is unique.  To do that, it calls 'uniq -u'.  However
    the input given to 'uniq -u' is not sorted.
    
    Therefore, in the above example, when dealing with 'git checkout ma',
    "__git_refs '' 1" will find the following list:
      master
      maint
      master
      maint
      master
    
    which, when passed to 'uniq -u' will remain the same.  Therefore
    'maint' will be wrongly suggested as a valid option.
    
    When dealing with 'git checkout mai', the list will be:
      maint
      maint
    
    which happens to be sorted and will be emptied by 'uniq -u',
    properly ignoring 'maint'.
    
    A solution for preventing the completion script from suggesting
    such invalid branch names is to first call 'sort' and then 'uniq -u'.
    
    Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
    Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    marckhouzam committed with gitster Nov 23, 2012
Commits on Nov 20, 2012
  1. @gitster

    Further preparation for 1.8.0.1

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Nov 20, 2012
  2. @gitster

    Merge branch 'mg/maint-pull-suggest-upstream-to' into maint

    * mg/maint-pull-suggest-upstream-to:
      push/pull: adjust missing upstream help text to changed interface
    gitster committed Nov 20, 2012
  3. @gitster

    Merge branch 'mm/maint-doc-commit-edit' into maint

    * mm/maint-doc-commit-edit:
      Document 'git commit --no-edit' explicitly
    gitster committed Nov 20, 2012
  4. @gitster

    Merge branch 'as/maint-doc-fix-no-post-rewrite' into maint

    * as/maint-doc-fix-no-post-rewrite:
      commit: fixup misplacement of --no-post-rewrite description
    gitster committed Nov 20, 2012
  5. @gitster

    Merge branch 'rs/lock-correct-ref-during-delete' into maint

    * rs/lock-correct-ref-during-delete:
      refs: lock symref that is to be deleted, not its target
    gitster committed Nov 20, 2012
  6. @gitster

    Merge branch 'rf/maint-mailmap-off-by-one' into maint

    * rf/maint-mailmap-off-by-one:
      mailmap: avoid out-of-bounds memory access
    gitster committed Nov 20, 2012
  7. @gitster

    Merge branch 'jk/maint-diff-grep-textconv' into maint

    "git diff -G<pattern>" did not honor textconv filter when looking
    for changes.
    
    * jk/maint-diff-grep-textconv:
      diff_grep: use textconv buffers for add/deleted files
    gitster committed Nov 20, 2012
  8. @gitster

    Merge branch 'js/format-2047' into maint

    Various rfc2047 quoting issues around a non-ASCII name on the From:
    line in the output from format-patch have been corrected.
    
    * js/format-2047:
      format-patch tests: check quoting/encoding in To: and Cc: headers
      format-patch: fix rfc2047 address encoding with respect to rfc822 specials
      format-patch: make rfc2047 encoding more strict
      format-patch: introduce helper function last_line_length()
      format-patch: do not wrap rfc2047 encoded headers too late
      format-patch: do not wrap non-rfc2047 headers too early
      utf8: fix off-by-one wrapping of text
    gitster committed Nov 20, 2012
Commits on Nov 19, 2012
  1. @gitster

    Start preparing for 1.8.0.1

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Nov 19, 2012
  2. @gitster

    Merge branch 'sz/maint-curl-multi-timeout' into maint

    Sometimes curl_multi_timeout() function suggested a wrong timeout
    value when there is no file descriptors to wait on and the http
    transport ended up sleeping for minutes in select(2) system call.  A
    workaround has been added for this.
    
    * sz/maint-curl-multi-timeout:
      Fix potential hang in https handshake
    gitster committed Nov 19, 2012
  3. @gitster

    Merge branch 'po/maint-refs-replace-docs' into maint

    The refs/replace hierarchy was not mentioned in the
    repository-layout docs.
    
    * po/maint-refs-replace-docs:
      Doc repository-layout: Show refs/replace
    gitster committed Nov 19, 2012
  4. @gitster

    Merge branch 'ph/pull-rebase-detached' into maint

    "git pull --rebase" run while the HEAD is detached tried to find
    the upstream branch of the detached HEAD (which by definition
    does not exist) and emitted unnecessary error messages.
    
    * ph/pull-rebase-detached:
      git-pull: Avoid merge-base on detached head
    gitster committed Nov 19, 2012
  5. @gitster

    Merge branch 'mm/maint-doc-remote-tracking' into maint

    Update "remote tracking branch" in the documentation to
    "remote-tracking branch".
    
    * mm/maint-doc-remote-tracking:
      Documentation: remote tracking branch -> remote-tracking branch
    gitster committed Nov 19, 2012
  6. @gitster

    Merge branch 'rs/branch-del-symref' into maint

    A symbolic ref refs/heads/SYM was not correctly removed with "git
    branch -d SYM"; the command removed the ref pointed by SYM instead.
    
    * rs/branch-del-symref:
      branch: show targets of deleted symrefs, not sha1s
      branch: skip commit checks when deleting symref branches
      branch: delete symref branch, not its target
      branch: factor out delete_branch_config()
      branch: factor out check_branch_commit()
    gitster committed Nov 19, 2012
  7. @gitster

    Merge branch 'nd/grep-true-path' into maint

    "git grep -e pattern <tree>" asked the attribute system to read
    "<tree>:.gitattributes" file in the working tree, which was
    nonsense.
    
    * nd/grep-true-path:
      grep: stop looking at random places for .gitattributes
    gitster committed Nov 19, 2012
  8. @gitster

    Merge branch 'jc/grep-pcre-loose-ends' (early part) into maint

    "git log -F -E --grep='<ere>'" failed to use the given <ere>
    pattern as extended regular expression, and instead looked for the
    string literally.
    
    * 'jc/grep-pcre-loose-ends' (early part):
      log --grep: use the same helper to set -E/-F options as "git grep"
      revisions: initialize revs->grep_filter using grep_init()
      grep: move pattern-type bits support to top-level grep.[ch]
      grep: move the configuration parsing logic to grep.[ch]
      builtin/grep.c: make configuration callback more reusable
    gitster committed Nov 19, 2012
  9. @gitster

    Merge branch 'da/mergetools-p4' into maint

    "git mergetool" feeds /dev/null as a common ancestor when dealing
    with an add/add conflict, but p4merge backend cannot handle it. Work
    it around by passing a temporary empty file.
    
    * da/mergetools-p4:
      mergetools/p4merge: Handle "/dev/null"
    gitster committed Nov 19, 2012
  10. @gitster

    Merge branch 'jc/test-say-color-avoid-echo-escape' into maint

    The "say" function in the test scaffolding incorrectly allowed
    "echo" to interpret "\a" as if it were a C-string asking for a BEL
    output.
    
    * jc/test-say-color-avoid-echo-escape:
      test-lib: Fix say_color () not to interpret \a\b\c in the message
    gitster committed Nov 19, 2012
  11. @gitster

    Merge branch 'bw/config-lift-variable-name-length-limit' into maint

    The configuration parser had an unnecessary hardcoded limit on
    variable names that was not checked consistently.
    
    * bw/config-lift-variable-name-length-limit:
      Remove the hard coded length limit on variable names in config files
    gitster committed Nov 19, 2012
Commits on Nov 16, 2012
  1. @carlosmn @gitster

    config: don't segfault when given --path with a missing value

    When given a variable without a value, such as '[section] var' and
    asking git-config to treat it as a path, git_config_pathname returns
    an error and doesn't modify its output parameter. show_config assumes
    that the call is always successful and sets a variable to indicate
    that vptr should be freed. In case of an error however, trying to do
    this will cause the program to be killed, as it's pointing to memory
    in the stack.
    
    Detect the error and return immediately to avoid freeing or accessing
    the uninitialed memory in the stack.
    
    Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
    Acked-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    carlosmn committed with gitster Nov 15, 2012
  2. @peff @gitster

    checkout: print a message when switching unborn branches

    When we switch to a new branch using checkout, we usually output a
    message indicating what happened. However, when we switch from an unborn
    branch to a new branch, we do not print anything, which may leave the
    user wondering what happened.
    
    The reason is that the unborn branch is a special case (see abe1998),
    and does not follow the usual switch_branches code path. Let's add a
    similar informational message to the special case to match the usual
    code path.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff committed with gitster Nov 15, 2012
Commits on Nov 12, 2012
  1. @peff

    gitweb: escape html in rss title

    The title of an RSS feed is generated from many components,
    including the filename provided as a query parameter, but we
    failed to quote it.  Besides showing the wrong output, this
    is a vector for XSS attacks.
    
    Signed-off-by: Jeff King <peff@peff.net>
    peff committed Nov 12, 2012
Commits on Nov 8, 2012
  1. @mjg @peff

    push/pull: adjust missing upstream help text to changed interface

    In case of a missing upstream, the git-parse-remote script suggests:
    
    If you wish to set tracking information for this branch you can do so
    with:
    
        git branch --set-upstream nsiv2 origin/<branch>
    
    But --set-upstream is deprectated. Change the suggestion to:
    
        git branch --set-upstream-to=origin/<branch> nsiv2
    
    Reported-by: Jeroen van der Ham <vdham@uva.nl>
    Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
    Signed-off-by: Jeff King <peff@peff.net>
    mjg committed with peff Nov 6, 2012
Commits on Nov 2, 2012
  1. @andreas-schwab @peff

    commit: fixup misplacement of --no-post-rewrite description

    In e858af6 (commit: document a couple of options) the description of the
    --no-post-rewrite option was put inside the paragraph for the --amend
    option.  Move it down after the paragraph.
    
    Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
    Signed-off-by: Jeff King <peff@peff.net>
    andreas-schwab committed with peff Nov 2, 2012
  2. @moy @peff

    Document 'git commit --no-edit' explicitly

    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Jeff King <peff@peff.net>
    moy committed with peff Nov 2, 2012
Commits on Oct 28, 2012
  1. @peff

    diff_grep: use textconv buffers for add/deleted files

    If you use "-G" to grep a diff, we will apply a configured
    textconv filter to the data before generating the diff.
    However, if the diff is an addition or deletion, we do not
    bother running the diff at all, and just look for the token
    in the added (or removed) content. This works because we
    know that the diff must contain every line of content.
    
    However, while we used the textconv-derived buffers in the
    regular diff, we accidentally passed the original unmodified
    buffers to regexec when checking the added or removed
    content. This could lead to an incorrect answer.
    
    Worse, in some cases we might have a textconv buffer but no
    original buffer (e.g., if we pulled the textconv data from
    cache, or if we reused a working tree file when generating
    it). In that case, we could actually feed NULL to regexec
    and segfault.
    
    Reported-by: Peter Oberndorfer <kumbayo84@arcor.de>
    Signed-off-by: Jeff King <peff@peff.net>
    peff committed Oct 28, 2012
  2. @orebokech @peff

    mailmap: avoid out-of-bounds memory access

    AddressSanitizer (http://clang.llvm.org/docs/AddressSanitizer.html)
    complains of a one-byte buffer underflow in parse_name_and_email() while
    running the test suite. And indeed, if one of the lines in the mailmap
    begins with '<', we dereference the address just before the beginning of
    the buffer when looking for whitespace to remove, before checking that
    we aren't going too far.
    
    So reverse the order of the tests to make sure that we don't read
    outside the buffer.
    
    Signed-off-by: Romain Francoise <romain@orebokech.com>
    Signed-off-by: Jeff King <peff@peff.net>
    orebokech committed with peff Oct 27, 2012
Commits on Oct 25, 2012
  1. @PhilipOakley @peff

    Doc repository-layout: Show refs/replace

    Signed-off-by: Philip Oakley <philipoakley@iee.org>
    Signed-off-by: Jeff King <peff@peff.net>
    PhilipOakley committed with peff Oct 21, 2012
  2. @moy @peff

    Documentation: remote tracking branch -> remote-tracking branch

    This change was already done by 0e615b2 (Matthieu Moy, Tue Nov 2
    2010, Replace "remote tracking" with "remote-tracking"), but new
    instances of remote tracking (without dash) were introduced in the
    meantime.
    
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Jeff King <peff@peff.net>
    moy committed with peff Oct 23, 2012
  3. @phord @peff

    git-pull: Avoid merge-base on detached head

    git pull --rebase does some clever tricks to find the base
    for $upstream, but it forgets that we may not have any
    branch at all.  When this happens, git merge-base reports its
    "usage" help in the middle of an otherwise successful
    rebase operation, because git-merge is called with one too
    few parameters.
    
    Since we do not need the merge-base trick in the case of a
    detached HEAD, detect this condition and bypass the clever
    trick and the usage noise.
    
    Signed-off-by: Phil Hord <hordp@cisco.com>
    Signed-off-by: Jeff King <peff@peff.net>
    phord committed with peff Oct 23, 2012