Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jun 1, 2009
  1. @davvid @gitster

    diff: generate pretty filenames in prep_temp_blob()

    davvid authored gitster committed
    Naturally, prep_temp_blob() did not care about filenames.
    As a result, GIT_EXTERNAL_DIFF and textconv generated
    filenames such as ".diff_XXXXXX".
    
    This modifies prep_temp_blob() to generate user-friendly
    filenames when creating temporary files.
    
    Diffing "name.ext" now generates "XXXXXX_name.ext".
    
    Signed-off-by: David Aguilar <davvid@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 1, 2009
  1. @felipec @gitster

    Fix a bunch of pointer declarations (codestyle)

    felipec authored gitster committed
    Essentially; s/type* /type */ as per the coding guidelines.
    
    Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 29, 2009
  1. @dscho @gitster

    Rename core.unreliableHardlinks to core.createObject

    dscho authored gitster committed
    "Unreliable hardlinks" is a misleading description for what is happening.
    So rename it to something less misleading.
    
    Suggested by Linus Torvalds.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 25, 2009
  1. @dscho @gitster

    Add an option not to use link(src, dest) && unlink(src) when that is …

    dscho authored gitster committed
    …unreliable
    
    It seems that accessing NTFS partitions with ufsd (at least on my EeePC)
    has an unnerving bug: if you link() a file and unlink() it right away,
    the target of the link() will have the correct size, but consist of NULs.
    
    It seems as if the calls are simply not serialized correctly, as single-stepping
    through the function move_temp_to_file() works flawlessly.
    
    As ufsd is "Commertial software" (sic!), I cannot fix it, and have to work
    around it in Git.
    
    At the same time, it seems that this fixes msysGit issues 222 and 229 to
    assume that Windows cannot handle link() && unlink().
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Acked-by: Johannes Sixt <j6t@kdbg.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 6, 2009
  1. @gitster

    Merge branch 'jc/name-branch'

    gitster authored
    * jc/name-branch:
      Don't permit ref/branch names to end with ".lock"
      check_ref_format(): tighten refname rules
      strbuf_check_branch_ref(): a helper to check a refname for a branch
      Fix branch -m @{-1} newname
      check-ref-format --branch: give Porcelain a way to grok branch shorthand
      strbuf_branchname(): a wrapper for branch name shorthands
      Rename interpret/substitute nth_last_branch functions
    
    Conflicts:
    	Documentation/git-check-ref-format.txt
  2. @gitster

    Merge branch 'jc/shared-literally'

    gitster authored
    * jc/shared-literally:
      t1301: loosen test for forced modes
      set_shared_perm(): sometimes we know what the final mode bits should look like
      move_temp_to_file(): do not forget to chmod() in "Coda hack" codepath
      Move chmod(foo, 0444) into move_temp_to_file()
      "core.sharedrepository = 0mode" should set, not loosen
Commits on Apr 2, 2009
  1. @gitster

    Merge branch 'jc/maint-1.6.0-keep-pack'

    gitster authored
    * jc/maint-1.6.0-keep-pack:
      pack-objects: don't loosen objects available in alternate or kept packs
      t7700: demonstrate repack flaw which may loosen objects unnecessarily
      Remove --kept-pack-only option and associated infrastructure
      pack-objects: only repack or loosen objects residing in "local" packs
      git-repack.sh: don't use --kept-pack-only option to pack-objects
      t7700-repack: add two new tests demonstrating repacking flaws
    
    Conflicts:
    	t/t7700-repack.sh
Commits on Mar 28, 2009
  1. @gitster

    set_shared_perm(): sometimes we know what the final mode bits should …

    gitster authored
    …look like
    
    adjust_shared_perm() first obtains the mode bits from lstat(2), expecting
    to find what the result of applying user's umask is, and then tweaks it
    as necessary.  When the file to be adjusted is created with mkstemp(3),
    however, the mode thusly obtained does not have anything to do with user's
    umask, and we would need to start from 0444 in such a case and there is no
    point running lstat(2) for such a path.
    
    This introduces a new API set_shared_perm() to bypass the lstat(2) and
    instead force setting the mode bits to the desired value directly.
    adjust_shared_perm() becomes a thin wrapper to the function.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 26, 2009
  1. @gitster

    Merge branch 'fg/push-default'

    gitster authored
    * fg/push-default:
      builtin-push.c: Fix typo: "anythig" -> "anything"
      Display warning for default git push with no push.default config
      New config push.default to decide default behavior for push
    
    Conflicts:
    	Documentation/config.txt
Commits on Mar 23, 2009
  1. @gitster

    Rename interpret/substitute nth_last_branch functions

    gitster authored
    These allow you to say "git checkout @{-2}" to switch to the branch two
    "branch switching" ago by pretending as if you typed the name of that
    branch.  As it is likely that we will be introducing more short-hands to
    write the name of a branch without writing it explicitly, rename the
    functions from "nth_last_branch" to more generic "branch_name", to prepare
    for different semantics.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 20, 2009
  1. @gitster

    Remove --kept-pack-only option and associated infrastructure

    Brandon Casey authored gitster committed
    This option to pack-objects/rev-list was created to improve the -A and -a
    options of repack.  It was found to be lacking in that it did not provide
    the ability to differentiate between local and non-local kept packs, and
    found to be unnecessary since objects residing in local kept packs can be
    filtered out by the --honor-pack-keep option.
    
    Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 18, 2009
  1. @gitster

    Merge branch 'js/remote-improvements'

    gitster authored
    * js/remote-improvements: (23 commits)
      builtin-remote.c: no "commented out" code, please
      builtin-remote: new show output style for push refspecs
      builtin-remote: new show output style
      remote: make guess_remote_head() use exact HEAD lookup if it is available
      builtin-remote: add set-head subcommand
      builtin-remote: teach show to display remote HEAD
      builtin-remote: fix two inconsistencies in the output of "show <remote>"
      builtin-remote: make get_remote_ref_states() always populate states.tracked
      builtin-remote: rename variables and eliminate redundant function call
      builtin-remote: remove unused code in get_ref_states
      builtin-remote: refactor duplicated cleanup code
      string-list: new for_each_string_list() function
      remote: make match_refs() not short-circuit
      remote: make match_refs() copy src ref before assigning to peer_ref
      remote: let guess_remote_head() optionally return all matches
      remote: make copy_ref() perform a deep copy
      remote: simplify guess_remote_head()
      move locate_head() to remote.c
      move duplicated ref_newer() to remote.c
      move duplicated get_local_heads() to remote.c
      ...
    
    Conflicts:
    	builtin-clone.c
  2. @gitster

    Merge branch 'kb/checkout-optim'

    gitster authored
    * kb/checkout-optim:
      Revert "lstat_cache(): print a warning if doing ping-pong between cache types"
      checkout bugfix: use stat.mtime instead of stat.ctime in two places
      Makefile: Set compiler switch for USE_NSEC
      Create USE_ST_TIMESPEC and turn it on for Darwin
      Not all systems use st_[cm]tim field for ns resolution file timestamp
      Record ns-timestamps if possible, but do not use it without USE_NSEC
      write_index(): update index_state->timestamp after flushing to disk
      verify_uptodate(): add ce_uptodate(ce) test
      make USE_NSEC work as expected
      fix compile error when USE_NSEC is defined
      check_updates(): effective removal of cache entries marked CE_REMOVE
      lstat_cache(): print a warning if doing ping-pong between cache types
      show_patch_diff(): remove a call to fstat()
      write_entry(): use fstat() instead of lstat() when file is open
      write_entry(): cleanup of some duplicated code
      create_directories(): remove some memcpy() and strchr() calls
      unlink_entry(): introduce schedule_dir_for_removal()
      lstat_cache(): swap func(length, string) into func(string, length)
      lstat_cache(): generalise longest_match_lstat_cache()
      lstat_cache(): small cleanup and optimisation
Commits on Mar 17, 2009
  1. @gitster

    New config push.default to decide default behavior for push

    Finn Arne Gangstad authored gitster committed
    When "git push" is not told what refspecs to push, it pushes all matching
    branches to the current remote.  For some workflows this default is not
    useful, and surprises new users.  Some have even found that this default
    behaviour is too easy to trigger by accident with unwanted consequences.
    
    Introduce a new configuration variable "push.default" that decides what
    action git push should take if no refspecs are given or implied by the
    command line arguments or the current remote configuration.
    
    Possible values are:
    
      'nothing'  : Push nothing;
      'matching' : Current default behaviour, push all branches that already
                   exist in the current remote;
      'tracking' : Push the current branch to whatever it is tracking;
      'current'  : Push the current branch to a branch of the same name,
                   i.e. HEAD.
    
    Signed-off-by: Finn Arne Gangstad <finnag@pvv.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 11, 2009
  1. @gitster

    Merge branch 'jc/maint-1.6.0-keep-pack'

    gitster authored
    * jc/maint-1.6.0-keep-pack:
      is_kept_pack(): final clean-up
      Simplify is_kept_pack()
      Consolidate ignore_packed logic more
      has_sha1_kept_pack(): take "struct rev_info"
      has_sha1_pack(): refactor "pretend these packs do not exist" interface
      git-repack: resist stray environment variable
Commits on Feb 28, 2009
  1. @gitster

    is_kept_pack(): final clean-up

    gitster authored
    Now is_kept_pack() is just a member lookup into a structure, we can write
    it as such.
    
    Also rewrite the sole caller of has_sha1_kept_pack() to switch on the
    criteria the callee uses (namely, revs->kept_pack_only) between calling
    has_sha1_kept_pack() and has_sha1_pack(), so that these two callees do not
    have to take a pointer to struct rev_info as an argument.
    
    This removes the header file dependency issue temporarily introduced by
    the earlier commit, so we revert changes associated to that as well.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    Consolidate ignore_packed logic more

    gitster authored
    This refactors three loops that check if a given packfile is on the
    ignore_packed list into a function is_kept_pack().  The function returns
    false for a pack on the list, and true for a pack not on the list, because
    this list is solely used by "git repack" to pass list of packfiles that do
    not have corresponding .keep files, i.e. a packfile not on the list is
    "kept".
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @gitster

    has_sha1_kept_pack(): take "struct rev_info"

    gitster authored
    Its "ignore_packed" parameter always comes from struct rev_info.  This
    patch makes the function take a pointer to the surrounding structure, so
    that the refactoring in the next patch becomes easier to review.
    
    There is an unfortunate header file dependency and the easiest workaround
    is to temporarily move the function declaration from cache.h to
    revision.h; this will be moved back to cache.h once the function loses
    this "ignore_packed" parameter altogether in the later part of the
    series.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @gitster

    has_sha1_pack(): refactor "pretend these packs do not exist" interface

    gitster authored
    Most of the callers of this function except only one pass NULL to its last
    parameter, ignore_packed.
    
    Introduce has_sha1_kept_pack() function that has the function signature
    and the semantics of this function, and convert the sole caller that does
    not pass NULL to call this new function.
    
    All other callers and has_sha1_pack() lose the ignore_packed parameter.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 26, 2009
  1. @peff @gitster

    refactor find_ref_by_name() to accept const list

    peff authored gitster committed
    Since it doesn't actually touch its argument, this makes
    sense.
    
    However, we still want to return a non-const version (which
    requires a cast) so that this:
    
      struct ref *a, *b;
      a = find_ref_by_name(b);
    
    works. Unfortunately, you can also silently strip the const
    from a variable:
    
      struct ref *a;
      const struct ref *b;
      a = find_ref_by_name(b);
    
    This is a classic C const problem because there is no way to
    say "return the type with the same constness that was passed
    to us"; we provide the same semantics as standard library
    functions like strchr.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 24, 2009
  1. @gitster

    write_index(): update index_state->timestamp after flushing to disk

    Kjetil Barvik authored gitster committed
    Since this timestamp is used to check for racy-clean files, it is
    important to keep it uptodate.
    
    For the 'git checkout' command without the '-q' option, this make a
    huge difference.  Before, each and every file which was updated, was
    racy-clean after the call to unpack_trees() and write_index() but
    before the GIT process ended.
    
    And because of the call to show_local_changes() in builtin-checkout.c,
    we ended up reading those files back into memory, doing a SHA1 to
    check if the files was really different from the index.  And, of
    course, no file was different.
    
    With this fix, 'git checkout' without the '-q' option should now be
    almost as fast as with the '-q' option, but not quite, as we still do
    some few lstat(2) calls more without the '-q' option.
    
    Below is some average numbers for 10 checkout's to v2.6.27 and 10 to
    v2.6.25 of the Linux kernel, to show the difference:
    
    before (git version 1.6.2.rc1.256.g58a87):
     7.860 user  2.427 sys  19.465 real  52.8% CPU  faults: 0 major 95331 minor
    after:
     6.184 user  2.160 sys  17.619 real  47.4% CPU  faults: 0 major 38994 minor
    
    Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 21, 2009
  1. @torvalds @gitster

    Support 'raw' date format

    torvalds authored gitster committed
    Talking about --date, one thing I wanted for the 1234567890 date was to
    get things in the raw format. Sure, you get them with --pretty=raw, but it
    felt a bit sad that you couldn't just ask for the date in raw format.
    
    So here's a throw-away patch (meaning: I won't be re-sending it, because I
    really don't think it's a big deal) to add "--date=raw". It just prints
    out the internal raw git format - seconds since epoch plus timezone (put
    another way: 'date +"%s %z"' format)
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 20, 2009
  1. @gitster

    Merge branch 'maint'

    gitster authored
    * maint:
      More friendly message when locking the index fails.
      Document git blame --reverse.
      Documentation: Note file formats send-email accepts
  2. @moy @gitster

    More friendly message when locking the index fails.

    moy authored gitster committed
    Just saying that index.lock exists doesn't tell the user _what_ to do
    to fix the problem. We should give an indication that it's normally
    safe to delete index.lock after making sure git isn't running here.
    
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @dscho @gitster

    Introduce the function strip_path_suffix()

    dscho authored gitster committed
    The function strip_path_suffix() will try to strip a given suffix from
    a given path.  The suffix must start at a directory boundary (i.e. "core"
    is not a path suffix of "libexec/git-core", but "git-core" is).
    
    Arbitrary runs of directory separators ("slashes") are assumed identical.
    
    Example:
    
    	strip_path_suffix("C:\\msysgit/\\libexec\\git-core",
    		"libexec///git-core", &prefix)
    
    will set prefix to "C:\\msysgit" and return 0.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Acked-by: Johannes Sixt <j6t@kdbg.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @gitster

    make USE_NSEC work as expected

    Kjetil Barvik authored gitster committed
    Since the filesystem ext4 is now defined as stable in Linux v2.6.28,
    and ext4 supports nanonsecond resolution timestamps natively, it is
    time to make USE_NSEC work as expected.
    
    This will make racy git situations less likely to happen.  For 'git
    checkout' this means it will be less likely that we have to open, read
    the contents of the file into RAM, and check if file is really
    modified or not.  The result sould be a litle less used CPU time, less
    pagefaults and a litle faster program, at least for 'git checkout'.
    
    Since the number of possible racy git situations would increase when
    disks gets faster, this patch would be more and more helpfull as times
    go by.  For a fast Solid State Disk, this patch should be helpfull.
    
    Note that, when file operations starts to take less than 1 nanosecond,
    one would again start to get more racy git situations.
    
    For more info on racy git, see Documentation/technical/racy-git.txt
    For more info on ext4, see http://kernelnewbies.org/Ext4
    
    Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 19, 2009
  1. @gitster

    check_updates(): effective removal of cache entries marked CE_REMOVE

    Kjetil Barvik authored gitster committed
    Below is oprofile output from GIT command 'git chekcout -q my-v2.6.25'
    (move from tag v2.6.27 to tag v2.6.25 of the Linux kernel):
    
    CPU: Core 2, speed 1999.95 MHz (estimated)
    Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit
                             mask of 0x00 (Unhalted core cycles) count 20000
    Counted INST_RETIRED_ANY_P events (number of instructions retired) with a
                               unit mask of 0x00 (No unit mask) count 20000
    CPU_CLK_UNHALT...|INST_RETIRED:2...|
      samples|      %|  samples|      %|
    ------------------------------------
       409247 100.000    342878 100.000 git
            CPU_CLK_UNHALT...|INST_RETIRED:2...|
              samples|      %|  samples|      %|
            ------------------------------------
               260476 63.6476    257843 75.1996 libz.so.1.2.3
               100876 24.6492     64378 18.7758 kernel-2.6.28.4_2.vmlinux
                30850  7.5382      7874  2.2964 libc-2.9.so
                14775  3.6103      8390  2.4469 git
                 2020  0.4936      4325  1.2614 libcrypto.so.0.9.8
                  191  0.0467        32  0.0093 libpthread-2.9.so
                   58  0.0142        36  0.0105 ld-2.9.so
                    1 2.4e-04         0       0 libldap-2.3.so.0.2.31
    
    Detail list of the top 20 function entries (libz counted in one blob):
    
    CPU_CLK_UNHALTED  INST_RETIRED_ANY_P
    samples  %        samples  %        image name               symbol name
    260476   63.6862  257843   75.2725  libz.so.1.2.3            /lib/libz.so.1.2.3
    16587     4.0555  3636      1.0615  libc-2.9.so              memcpy
    7710      1.8851  277       0.0809  libc-2.9.so              memmove
    3679      0.8995  1108      0.3235  kernel-2.6.28.4_2.vmlinux d_validate
    3546      0.8670  2607      0.7611  kernel-2.6.28.4_2.vmlinux __getblk
    3174      0.7760  1813      0.5293  libc-2.9.so              _int_malloc
    2396      0.5858  3681      1.0746  kernel-2.6.28.4_2.vmlinux copy_to_user
    2270      0.5550  2528      0.7380  kernel-2.6.28.4_2.vmlinux __link_path_walk
    2205      0.5391  1797      0.5246  kernel-2.6.28.4_2.vmlinux ext4_mark_iloc_dirty
    2103      0.5142  1203      0.3512  kernel-2.6.28.4_2.vmlinux find_first_zero_bit
    2077      0.5078  997       0.2911  kernel-2.6.28.4_2.vmlinux do_get_write_access
    2070      0.5061  514       0.1501  git                      cache_name_compare
    2043      0.4995  1501      0.4382  kernel-2.6.28.4_2.vmlinux rcu_irq_exit
    2022      0.4944  1732      0.5056  kernel-2.6.28.4_2.vmlinux __ext4_get_inode_loc
    2020      0.4939  4325      1.2626  libcrypto.so.0.9.8       /usr/lib/libcrypto.so.0.9.8
    1965      0.4804  1384      0.4040  git                      patch_delta
    1708      0.4176  984       0.2873  kernel-2.6.28.4_2.vmlinux rcu_sched_grace_period
    1682      0.4112  727       0.2122  kernel-2.6.28.4_2.vmlinux sysfs_slab_alias
    1659      0.4056  290       0.0847  git                      find_pack_entry_one
    1480      0.3619  1307      0.3816  kernel-2.6.28.4_2.vmlinux ext4_writepage_trans_blocks
    
    Notice the memmove line, where the CPU did 7710 / 277 = 27.8 cycles
    per instruction, and compared to the total cycles spent inside the
    source code of GIT for this command, all the memmove() calls
    translates to (7710 * 100) / 14775 = 52.2% of this.
    
    Retesting with a GIT program compiled for gcov usage, I found out that
    the memmove() calls came from remove_index_entry_at() in read-cache.c,
    where we have:
    
            memmove(istate->cache + pos,
                    istate->cache + pos + 1,
                    (istate->cache_nr - pos) * sizeof(struct cache_entry *));
    
    remove_index_entry_at() is called 4902 times from check_updates() in
    unpack-trees.c, and each time called we move each cache_entry pointers
    (from the removed one) one step to the left.
    
    Since we have 28828 entries in the cache this time, and if we on
    average move half of them each time, we in total move approximately
    4902 * 0.5 * 28828 * 4 = 282 629 712 bytes, or twice this amount if
    each pointer is 8 bytes (64 bit).
    
    OK, is seems that the function check_updates() is called 28 times, so
    the estimated guess above had been more correct if check_updates() had
    been called only once, but the point is: we get lots of bytes moved.
    
    To fix this, and use an O(N) algorithm instead, where N is the number
    of cache_entries, we delete/remove all entries in one loop through all
    entries.
    
    From a retest, the new remove_marked_cache_entries() from the patch
    below, ended up with the following output line from oprofile:
    
    46        0.0105  15        0.0041  git                      remove_marked_cache_entries
    
    If we can trust the numbers from oprofile in this case, we saved
    approximately ((7710 - 46) * 20000) / (2 * 1000 * 1000 * 1000) = 0.077
    seconds CPU time with this fix for this particular test.  And notice
    that now the CPU did only 46 / 15 = 3.1 cycles/instruction.
    
    Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
    Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 15, 2009
  1. @gitster

    Merge branch 'ms/mailmap'

    gitster authored
    * ms/mailmap:
      Move mailmap documentation into separate file
      Change current mailmap usage to do matching on both name and email of author/committer.
      Add map_user() and clear_mailmap() to mailmap
      Add find_insert_index, insert_at_index and clear_func functions to string_list
      Add mailmap.file as configurational option for mailmap location
Commits on Feb 11, 2009
  1. @gitster

    Revert "Merge branch 'js/notes'"

    gitster authored
    This reverts commit 7b75b33, reversing
    changes made to 5d680a6.
  2. @gitster

    Merge branch 'js/maint-1.6.0-path-normalize'

    gitster authored
    * js/maint-1.6.0-path-normalize:
      Remove unused normalize_absolute_path()
      Test and fix normalize_path_copy()
      Fix GIT_CEILING_DIRECTORIES on Windows
      Move sanitary_path_copy() to path.c and rename it to normalize_path_copy()
      Make test-path-utils more robust against incorrect use
  3. @gitster

    Merge branch 'maint'

    gitster authored
    * maint:
      Clear the delta base cache during fast-import checkpoint
Commits on Feb 10, 2009
  1. @gitster

    Merge branch 'maint-1.6.0' into maint

    gitster authored
    * maint-1.6.0:
      Clear the delta base cache during fast-import checkpoint
  2. @spearce @gitster

    Clear the delta base cache during fast-import checkpoint

    spearce authored gitster committed
    Otherwise we may reuse the same memory address for a totally
    different "struct packed_git", and a previously cached object from
    the prior occupant might be returned when trying to unpack an object
    from the new pack.
    
    Found-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @gitster

    unlink_entry(): introduce schedule_dir_for_removal()

    Kjetil Barvik authored gitster committed
    Currently inside unlink_entry() if we get a successful removal of one
    file with unlink(), we try to remove the leading directories each and
    every time.  So if one directory containing 200 files is moved to an
    other location we get 199 failed calls to rmdir() and 1 successful
    call.
    
    To fix this and avoid some unnecessary calls to rmdir(), we schedule
    each directory for removal and wait much longer before we do the real
    call to rmdir().
    
    Since the unlink_entry() function is called with alphabetically sorted
    names, this new function end up being very effective to avoid
    unnecessary calls to rmdir().  In some cases over 95% of all calls to
    rmdir() is removed with this patch.
    
    Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @gitster

    lstat_cache(): swap func(length, string) into func(string, length)

    Kjetil Barvik authored gitster committed
    Swap function argument pair (length, string) into (string, length) to
    conform with the commonly used order inside the GIT source code.
    
    Also, add a note about this fact into the coding guidelines.
    
    Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.