Permalink
Commits on Jul 19, 2008
  1. GIT 1.5.6.4

    gitster committed Jul 19, 2008
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. builtin-rm: fix index lock file path

    Olivier Marin authored and gitster committed Jul 19, 2008
    When hold_locked_index() is called with a relative git_dir and you are
    outside the work tree, the lock file become relative to the current
    directory. So when later setup_work_tree() change the current directory
    it breaks lock file path and commit_locked_index() fails.
    
    This patch move index locking code after setup_work_tree() call to make
    lock file relative to the working tree as it should be and add a test
    case.
    
    Noticed by Nick Andrew.
    
    Signed-off-by: Olivier Marin <dkr@freesurf.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 18, 2008
  1. Merge branch 'sp/maint-index-pack' into maint

    gitster committed Jul 18, 2008
    * sp/maint-index-pack:
      index-pack: Honor core.deltaBaseCacheLimit when resolving deltas
      index-pack: Track the object_entry that creates each base_data
      index-pack: Chain the struct base_data on the stack for traversal
      index-pack: Refactor base arguments of resolve_delta into a struct
  2. http-fetch: do not SEGV after fetching a bad pack idx file

    gitster committed Jul 18, 2008
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. rev-list: honor --quiet option

    gitster committed Jul 18, 2008
    Nick Andrew noticed that rev-list lets --quiet option to be parsed by
    underlying diff_options parser but did not pick up the result.  This
    resulted in --quiet option to become effectively a no-op.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. api-run-command.txt: typofix

    sbeyer authored and gitster committed Jul 17, 2008
    Replace "run_command_v_opt_dir" by "run_command_v_opt_cd".
    
    Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 16, 2008
  1. Start preparing 1.5.6.4 release notes

    gitster committed Jul 16, 2008
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. git fetch-pack: do not complain about "no common commits" in an empty…

    dscho authored and gitster committed Jul 2, 2008
    … repo
    
    If the repo is empty, it is obvious that there are no common commits
    when fetching from _anywhere_.
    
    So there is no use in saying it in that case, and it can even be
    annoying.  Therefore suppress the message unilaterally if the repository
    is empty prior to the fetch.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. Merge branch 'js/maint-pretty-mailmap' into maint

    gitster committed Jul 16, 2008
    * js/maint-pretty-mailmap:
      Add pretty format %aN which gives the author name, respecting .mailmap
  4. Merge branch 'sp/maint-bash-completion-optim' into maint

    gitster committed Jul 16, 2008
    * sp/maint-bash-completion-optim:
      bash completion: Resolve git show ref:path<tab> losing ref: portion
      bash completion: Append space after file names have been completed
      bash completion: Don't offer "a.." as a completion for "a."
      bash completion: Improve responsiveness of git-log completion
  5. Merge branch 'sp/maint-pack-memuse' into maint

    gitster committed Jul 16, 2008
    * sp/maint-pack-memuse:
      Correct pack memory leak causing git gc to try to exceed ulimit
  6. Merge branch 'ls/maint-mailinfo-patch-label' into maint

    gitster committed Jul 16, 2008
    * ls/maint-mailinfo-patch-label:
      git-mailinfo: Fix getting the subject from the in-body [PATCH] line
  7. Merge branch 'js/maint-daemon-syslog' into maint

    gitster committed Jul 16, 2008
    * js/maint-daemon-syslog:
      git daemon: avoid calling syslog() from a signal handler
  8. rebase-i: keep old parents when preserving merges

    sbeyer authored and gitster committed Jul 16, 2008
    When "rebase -i -p" tries to preserve merges of unrelated branches, it
    lost some parents:
    
     - When you have more than two parents, the commit in the new history
       ends up with fewer than expected number of parents and this breakage
       goes unnoticed;
    
     - When you are rebasing a merge with two parents and one is lost, the
       command tries to cherry-pick the original merge commit, and the command
       fails.
    
    Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  9. t7600-merge: Use test_expect_failure to test option parsing

    Johannes Sixt authored and gitster committed Jul 16, 2008
    It used plain 'if git merge ...', which hides a segfault. The test does not pass.
    
    Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  10. Fix buffer overflow in prepare_attr_stack

    dmpot authored and gitster committed Jul 16, 2008
    If PATH_MAX on your system is smaller than a path stored in the git repo,
    it may cause the buffer overflow in prepare_attr_stack.
    
    Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  11. Fix buffer overflow in git diff

    dmpot authored and gitster committed Jul 16, 2008
    If PATH_MAX on your system is smaller than a path stored, it may cause
    buffer overflow and stack corruption in diff_addremove() and diff_change()
    functions when running git-diff
    
    Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  12. Fix buffer overflow in git-grep

    dmpot authored and gitster committed Jul 16, 2008
    If PATH_MAX on your system is smaller than any path stored in the git
    repository, that can cause memory corruption inside of the grep_tree
    function used by git-grep.
    
    Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  13. git-cvsserver: fix call to nonexistant cleanupWorkDir()

    Lars Noschinski authored and gitster committed Jul 16, 2008
    git-cvsserver.perl contained a single call to a nonexistant function
    cleanupWorkDir(). This was obviously a typo for cleanupWorkTree().
    
    Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  14. Documentation/git-cherry-pick.txt et al.: Fix misleading -n description

    Petr Baudis authored and gitster committed Jul 16, 2008
    The manual page of git-cherry-pick and git-revert asserts that -n works
    primarily on the working tree, while in fact the primary object it operates
    on is the index, and the changes only "accidentally" propagate to the
    working tree. This e.g. leads innocent #git IRC folks to believe that you
    can use -n to prepare changes for git-add -i staging.
    
    Signed-off-by: Petr Baudis <pasky@suse.cz>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 15, 2008
  1. index-pack: Honor core.deltaBaseCacheLimit when resolving deltas

    spearce authored and gitster committed Jul 15, 2008
    If we are trying to resolve deltas for a long delta chain composed
    of multi-megabyte objects we can easily run into requiring 500M+
    of memory to hold each object in the chain on the call stack while
    we recurse into the dependent objects and resolve them.
    
    We now use a simple delta cache that discards objects near the
    bottom of the call stack first, as they are the most least recently
    used objects in this current delta chain.  If we recurse out of a
    chain we may find the base object is no longer available, as it was
    free'd to keep memory under the deltaBaseCacheLimit.  In such cases
    we must unpack the base object again, which will require recursing
    back to the root of the top of the delta chain as we released that
    root first.
    
    The astute reader will probably realize that we can still exceed
    the delta base cache limit, but this happens only if the most
    recent base plus the delta plus the inflated dependent sum up to
    more than the base cache limit.  Due to the way patch_delta is
    currently implemented we cannot operate in less memory anyway.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. index-pack: Track the object_entry that creates each base_data

    spearce authored and gitster committed Jul 14, 2008
    If we free the data stored within a base_data we need the struct
    object_entry to get the data back again for use with another dependent
    delta.  Storing the object_entry* in base_data makes it simple to call
    get_data_from_pack() to recover the compressed information.
    
    This however means that we must add the missing base object to the end of
    our packfile prior to calling resolve_delta() on each of the dependent
    deltas.  Adding the base first ensures we can read the base back from the
    pack we are indexing, as if it had been included by the remote side.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. index-pack: Chain the struct base_data on the stack for traversal

    spearce authored and gitster committed Jul 14, 2008
    We need to release earlier inflated base objects when memory gets
    low, which means we need to be able to walk up or down the stack
    to locate the objects we want to release, and free their data.
    
    The new link/unlink routines allow inserting and removing the struct
    base_data during recursion inside resolve_delta, and the global
    base_cache gives us the head of the chain (bottom of the stack)
    so we can traverse it.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. index-pack: Refactor base arguments of resolve_delta into a struct

    spearce authored and gitster committed Jul 14, 2008
    We need to discard base objects which are not recently used if our
    memory gets low, such as when we are unpacking a long delta chain
    of a very large object.
    
    To support tracking the available base objects we combine the
    pointer and size into a struct.  Future changes would allow the
    data pointer to be free'd and marked NULL if memory gets low.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. bash completion: Resolve git show ref:path<tab> losing ref: portion

    spearce authored and gitster committed Jul 15, 2008
    Linus reported that the bash completion for git show often dropped
    the ref portion of the argument (stuff before the :) when trying
    to complete a file name of a file in another branch or tag.
    
    Björn Steinbrink tracked it down to the gvfs completion script
    which comes standard on many Fedora Core based systems.  That is
    removing : from COMP_WORDBREAKS, making readline treat the entire
    argument (including the ref) as the name that must be completed.
    When the git completion routines supplied a completion of just the
    filename, readline replaced everything.
    
    Since Git users often need to use "ref:path" or "ref:ref" sort of
    arguments, and expect completion support on both sides of the :
    we really want the : in COMP_WORDBREAKS to provide a good user
    experience.  This is also the default that ships with bash as it
    can be useful in other contexts, such as rcp/scp.
    
    We now try to add : back to COMP_WORDBREAKS if it has been removed
    by a script that loaded before us.  However if this doesn't work
    (as the : is stripped after we load) we fallback in the completion
    routines to include "ref:" as part of the prefix for completions,
    allowing readine to fully insert the argument the user wanted.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 14, 2008
  1. bash completion: Append space after file names have been completed

    spearce authored and gitster committed Jul 14, 2008
    When completing `git show origin/maint:Makef<tab>` we should add a
    space after the filename has been completed, so that the user can
    immediately begin the next argument.
    
    I also added a special case for the symlink variant so we treat it
    just like a normal blob, as there are no items below it in the Git
    tree structure.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. git-mailinfo: Fix getting the subject from the in-body [PATCH] line

    Lukas Sandström authored and gitster committed Jul 10, 2008
    "Subject: " isn't in the static array "header", and thus
    memcmp("Subject:", header[i], 7) will never match.
    
    Even if it did so, hdr_data[] may not have been allocated if there weren't
    a "Subject: " in-body when we process "[PATCH]" in the affected codepath.
    
    Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 13, 2008
  1. bash completion: Don't offer "a.." as a completion for "a."

    spearce authored and gitster committed Jul 13, 2008
    If the user is trying to complete "v1.5.3.<tab>" to see all of
    the available maintenance releases for 1.5.3 we should not give
    them an extra dot as the completion.  Instead if the user wants
    a ".." or a "..." operator they should key the two dots out on
    their own.  Its the same number of keystrokes either way.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. GIT 1.5.6.3

    gitster committed Jul 13, 2008
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. git-am: Do not exit silently if committer is unset

    sbeyer authored and gitster committed Jul 12, 2008
    Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. bash completion: Improve responsiveness of git-log completion

    spearce authored and gitster committed Jul 13, 2008
    Junio noticed the bash completion has been taking a long time lately.
    Petr Baudis tracked it down to 72e5e98 ("bash: Add space after
    unique command name is completed.").  Tracing the code showed
    we spent significant time inside of this loop within __gitcomp,
    due to the string copying overhead.
    
      [28.146109654] _git common over
      [28.164791148] gitrefs in
      [28.280302268] gitrefs dir out
      [28.300939737] gitcomp in
      [28.308378112] gitcomp pre-case
    * [28.313407453] gitcomp iter in
    * [28.701270296] gitcomp iter out
      [28.713370786] out normal
    
    Since __git_refs avoids this string copying by forking and using
    echo we use the same trick here when we need to finish generating
    the names for the caller.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 12, 2008
  1. t0004: fix timing bug

    gitster committed Jul 12, 2008
    The test created an initial commit, made .git/objects unwritable and then
    exercised various codepaths to create loose commit, tree and blob objects
    to make sure the commands notice failures from these attempts.
    
    However, the initial commit was not preceded with test_tick, which made
    its object name depend on the timestamp.  The names of all the later tree
    and blob objects the test tried to create were static.  If the initial
    commit's object name happened to begin with the same two hexdigits as the
    tree or blob objects the test later attempted to create, the fan-out
    directory in which these tree or blob would be created is already created
    when the initial commit was made, and the object creation succeeds, and
    commands being tested should not notice any failure --- in short, the test
    was bogus.
    
    This makes the fan-out directories also unwritable, and adds test_tick
    before the commit object creation to make the test repeatable.
    
    The contents of the file to create a blob from "a" to "60" is to force the
    name of the blob object to begin with "1b", which shares the fan-out
    directory with the initial commit that is created with the test.  This was
    useful when diagnosing the breakage of this test.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. Add pretty format %aN which gives the author name, respecting .mailmap

    dscho authored and gitster committed Jul 11, 2008
    The pretty format %an does not respect .mailmap, but gives the exact
    author name recorded in the commit.  Sometimes it is more desirable,
    however, to look if the email has another name mapped to it in .mailmap.
    
    This commit adds %aN (and %cN for the committer name) to do exactly that.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. git-mailinfo: document the -n option

    Lukas Sandström authored and gitster committed Jul 10, 2008
    Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. Fix backwards-incompatible handling of core.sharedRepository

    Petr Baudis authored and gitster committed Jul 12, 2008
    06cbe85 (Make core.sharedRepository more generic, 2008-04-16) broke the
    traditional setting of core.sharedRepository to true, which was to make
    the repository group writable: with umask 022, it would clear the
    permission bits for 'other'. (umask 002 did not exhibit this behaviour
    since pre-chmod() check in adjust_shared_perm() fails in that case.)
    
    The call to adjust_shared_perm() should only loosen the permission.
    If the user has umask like 022 or 002 that allow others to read, the
    resulting files should be made readable and writable by group, without
    restricting the readability by others.
    
    This patch fixes the adjust_shared_perm() mode tweak based on Junio's
    suggestion and adds the appropriate tests to t/t1301-shared-repo.sh.
    
    Cc: Heikki Orsila <heikki.orsila@iki.fi>
    Signed-off-by: Petr Baudis <pasky@suse.cz>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>