Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Rebase to v2.21.0 #122

Closed
wants to merge 151 commits into from
Closed

Commits on Feb 27, 2019

  1. reset --stdin: trim carriage return from the paths

    While using the reset --stdin feature on windows path added may have a
    \r at the end of the path that wasn't getting removed so didn't match
    the path in the index and wasn't reset.
    
    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    a2de79d View commit details
    Browse the repository at this point in the history
  2. Merge 'gvfs-preamble' into HEAD

    dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    15ae0ff View commit details
    Browse the repository at this point in the history
  3. gvfs: start by adding the -gvfs suffix to the version

    Signed-off-by: Saeed Noursalehi <sanoursa@microsoft.com>
    sanoursa authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    8fb171b View commit details
    Browse the repository at this point in the history
  4. gvfs: ensure that the version is based on a GVFS tag

    Signed-off-by: Johannes Schindelin <johasc@microsoft.com>
    dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    9fc99b0 View commit details
    Browse the repository at this point in the history
  5. gvfs: add a GVFS-specific header file

    This header file will accumulate GVFS-specific definitions.
    
    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    7e31020 View commit details
    Browse the repository at this point in the history
  6. gvfs: add the core.gvfs config setting

    This does not do anything yet. The next patches will add various values
    for that config setting that correspond to the various features
    offered/required by GVFS.
    
    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    7305e38 View commit details
    Browse the repository at this point in the history
  7. gvfs: add the feature to skip writing the index' SHA-1

    This takes a substantial amount of time, and if the user is reasonably
    sure that the files' integrity is not compromised, that time can be saved.
    
    Git no longer verifies the SHA-1 by default, anyway.
    
    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    ee378e4 View commit details
    Browse the repository at this point in the history
  8. gvfs: add the feature that blobs may be missing

    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    dea3597 View commit details
    Browse the repository at this point in the history
  9. gvfs: prevent files to be deleted outside the sparse checkout

    Prevent the sparse checkout to delete files that were marked with
    skip-worktree bit and are not in the sparse-checkout file.
    
    This is because everything with the skip-worktree bit turned on is being
    virtualized and will be removed with the change of HEAD.
    
    There was only one failing test when running with these changes that was
    checking to make sure the worktree narrows on checkout which was
    expected since we would no longer be narrowing the worktree.
    
    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    cd7014a View commit details
    Browse the repository at this point in the history
  10. sparse-checkout: update files with a modify/delete conflict

    When using the sparse-checkout feature, the file might not be on disk
    because the skip-worktree bit is on.
    
    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    e439e6a View commit details
    Browse the repository at this point in the history
  11. sparse-checkout: avoid writing entries with the skip-worktree bit

    When using the sparse-checkout feature git should not write to the working
    directory for files with the skip-worktree bit on.  With the skip-worktree
    bit on the file may or may not be in the working directory and if it is
    not we don't want or need to create it by calling checkout_entry.
    
    There are two callers of checkout_target.  Both of which check that the
    file does not exist before calling checkout_target.  load_current which
    make a call to lstat right before calling checkout_target and
    check_preimage which will only run checkout_taret it stat_ret is less than
    zero.  It sets stat_ret to zero and only if !stat->cached will it lstat
    the file and set stat_ret to something other than zero.
    
    This patch checks if skip-worktree bit is on in checkout_target and just
    returns so that the entry doesn't not end up in the working directory.
    This is so that apply will not create a file in the working directory,
    then update the index but not keep the working directory up to date with
    the changes that happened in the index.
    
    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    9e94a98 View commit details
    Browse the repository at this point in the history
  12. fsck: use ERROR_MULTI_PACK_INDEX

    The multi-pack-index was added to the data verified by git-fsck in
    ea5ae6c "fsck: verify multi-pack-index". This implementation was
    based on the implementation for verifying the commit-graph, and a
    copy-paste error kept the ERROR_COMMIT_GRAPH flag as the bit set
    when an error appears in the multi-pack-index.
    
    Add a new flag, ERROR_MULTI_PACK_INDEX, and use that instead.
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    5f8e102 View commit details
    Browse the repository at this point in the history
  13. repack: refactor pack deletion for future use

    The repack builtin deletes redundant pack-files and their
    associated .idx, .promisor, .bitmap, and .keep files. We will want
    to re-use this logic in the future for other types of repack, so
    pull the logic into 'unlink_pack_path()' in packfile.c.
    
    The 'ignore_keep' parameter is enabled for the use in repack, but
    will be important for a future caller.
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    e06eb8e View commit details
    Browse the repository at this point in the history
  14. Docs: rearrange subcommands for multi-pack-index

    We will add new subcommands to the multi-pack-index, and that will
    make the documentation a bit messier. Clean up the 'verb'
    descriptions by renaming the concept to 'subcommand' and removing
    the reference to the object directory.
    
    Helped-by: Stefan Beller <sbeller@google.com>
    Helped-by: Szeder Gábor <szeder.dev@gmail.com>
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    13e95e6 View commit details
    Browse the repository at this point in the history
  15. multi-pack-index: prepare for 'expire' subcommand

    The multi-pack-index tracks objects in a collection of pack-files.
    Only one copy of each object is indexed, using the modified time
    of the pack-files to determine tie-breakers. It is possible to
    have a pack-file with no referenced objects because all objects
    have a duplicate in a newer pack-file.
    
    Introduce a new 'expire' subcommand to the multi-pack-index builtin.
    This subcommand will delete these unused pack-files and rewrite the
    multi-pack-index to no longer refer to those files. More details
    about the specifics will follow as the method is implemented.
    
    Add a test that verifies the 'expire' subcommand is correctly wired,
    but will still be valid when the verb is implemented. Specifically,
    create a set of packs that should all have referenced objects and
    should not be removed during an 'expire' operation.
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    05443a5 View commit details
    Browse the repository at this point in the history
  16. midx: refactor permutation logic

    When writing a multi-pack-index, we keep track of an integer
    permutation, tracking the list of pack-files that we know about
    (both from the existing multi-pack-index and the new pack-files
    being introduced) and converting them into a sorted order for
    the new multi-pack-index.
    
    In anticipation of dropping pack-files from the existing multi-
    pack-index, refactor the logic around how we track this permutation.
    
    First, insert the permutation into the pack_list structure. This
    allows us to grow the permutation dynamically as we add packs.
    
    Second, fill the permutation with values corresponding to their
    position in the list of pack-files, sorted as follows:
    
      1. The pack-files in the existing multi-pack-index,
         sorted lexicographically.
    
      2. The pack-files not in the existing multi-pack-index,
         sorted as discovered from the filesystem.
    
    There is a subtle thing in how we initialize this permutation,
    specifically how we use 'i' for the initial value. This will
    matter more when we implement the logic for dropping existing
    packs, as we will create holes in the ordering.
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    c9772d2 View commit details
    Browse the repository at this point in the history
  17. multi-pack-index: implement 'expire' verb

    The 'git multi-pack-index expire' command looks at the existing
    mult-pack-index, counts the number of objects referenced in each
    pack-file, deletes the pack-fils with no referenced objects, and
    rewrites the multi-pack-index to no longer reference those packs.
    
    Refactor the write_midx_file() method to call write_midx_internal()
    which now takes an existing 'struct multi_pack_index' and a list
    of pack-files to drop (as specified by the names of their pack-
    indexes). As we write the new multi-pack-index, we drop those
    file names from the list of known pack-files.
    
    The expire_midx_packs() method removes the unreferenced pack-files
    after carefully closing the packs to avoid open handles.
    
    Test that a new pack-file that covers the contents of two other
    pack-files leads to those pack-files being deleted during the
    expire command. Be sure to read the multi-pack-index to ensure
    it no longer references those packs.
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    6e59547 View commit details
    Browse the repository at this point in the history
  18. multi-pack-index: prepare 'repack' subcommand

    In an environment where the multi-pack-index is useful, it is due
    to many pack-files and an inability to repack the object store
    into a single pack-file. However, it is likely that many of these
    pack-files are rather small, and could be repacked into a slightly
    larger pack-file without too much effort. It may also be important
    to ensure the object store is highly available and the repack
    operation does not interrupt concurrent git commands.
    
    Introduce a 'repack' subcommand to 'git multi-pack-index' that
    takes a '--batch-size' option. The verb will inspect the
    multi-pack-index for referenced pack-files whose size is smaller
    than the batch size, until collecting a list of pack-files whose
    sizes sum to larger than the batch size. Then, a new pack-file
    will be created containing the objects from those pack-files that
    are referenced by the multi-pack-index. The resulting pack is
    likely to actually be smaller than the batch size due to
    compression and the fact that there may be objects in the pack-
    files that have duplicate copies in other pack-files.
    
    The current change introduces the command-line arguments, and we
    add a test that ensures we parse these options properly. Since
    we specify a small batch size, we will guarantee that future
    implementations do not change the list of pack-files.
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    aeadfe8 View commit details
    Browse the repository at this point in the history
  19. midx: implement midx_repack()

    To repack using a multi-pack-index, first sort all pack-files by
    their modified time. Second, walk those pack-files from oldest
    to newest, adding the packs to a list if they are smaller than the
    given pack-size. Finally, collect the objects from the multi-pack-
    index that are in those packs and send them to 'git pack-objects'.
    
    While first designing a 'git multi-pack-index repack' operation, I
    started by collecting the batches based on the size of the objects
    instead of the size of the pack-files. This allows repacking a
    large pack-file that has very few referencd objects. However, this
    came at a significant cost of parsing pack-files instead of simply
    reading the multi-pack-index and getting the file information for
    the pack-files. This object-size idea could be a direction for
    future expansion in this area.
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    f295fe6 View commit details
    Browse the repository at this point in the history
  20. midx: use more structured data for expire

    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    57a505d View commit details
    Browse the repository at this point in the history
  21. gvfs: optionally skip reachability checks/upload pack during fetch

    While performing a fetch with a virtual file system we know that there
    will be missing objects and we don't want to download them just because
    of the reachability of the commits.  We also don't want to download a
    pack file with commits, trees, and blobs since these will be downloaded
    on demand.
    
    This flag will skip the first connectivity check and by returning zero
    will skip the upload pack. It will also skip the second connectivity
    check but continue to update the branches to the latest commit ids.
    
    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    0253f80 View commit details
    Browse the repository at this point in the history
  22. Fix reset when using the sparse-checkout feature.

    When using the sparse checkout feature the git reset command will add
    entries to the index that will have the skip-worktree bit off but will
    leave the working directory empty.  File data is lost because the index
    version of the files has been changed but there is nothing that is in
    the working directory.  This will cause the next status call to show
    either deleted for files modified or deleting or nothing for files
    added.  The added files should be shown as untracked and modified files
    should be shown as modified.
    
    To fix this when the reset is running if there is not a file in the
    working directory and if it will be missing with the new index entry or
    was not missing in the previous version, we create the previous index
    version of the file in the working directory so that status will report
    correctly and the files will be availble for the user to deal with.
    
    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    94e5d2a View commit details
    Browse the repository at this point in the history
  23. Do not remove files outside the sparse-checkout

    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    551acd0 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2019

  1. gvfs: ensure all filters and EOL conversions are blocked

    Ensure all filters and EOL conversions are blocked when running under
    GVFS so that our projected file sizes will match the actual file size
    when it is hydrated on the local machine.
    
    Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
    Ben Peart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    ae101e7 View commit details
    Browse the repository at this point in the history
  2. Add a new run_hook_argv() function

    The two existing members of the run_hook*() family, run_hook_ve() and
    run_hook_le(), are good for callers that know the precise number of
    parameters already. Let's introduce a new sibling that takes an argv
    array for callers that want to pass a variable number of parameters.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    e85d1ba View commit details
    Browse the repository at this point in the history
  3. gvfs: allow "virtualizing" objects

    The idea is to allow blob objects to be missing from the local repository,
    and to load them lazily on demand.
    
    After discussing this idea on the mailing list, we will rename the feature
    to "lazy clone" and work more on this.
    
    Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
    Ben Peart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    4445cbe View commit details
    Browse the repository at this point in the history
  4. gvfs: add global command pre and post hook procs

    This adds hard-coded call to GVFS.hooks.exe before and after each Git
    command runs.
    
    To make sure that this is only called on repositories cloned with GVFS, we
    test for the tell-tale .gvfs.
    
    Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
    Ben Peart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    fe1e47a View commit details
    Browse the repository at this point in the history
  5. Hydrate missing loose objects in check_and_freshen()

    Hydrate missing loose objects in check_and_freshen() when running
    virtualized. Add test cases to verify read-object hook works when
    running virtualized.
    
    This hook is called in check_and_freshen() rather than
    check_and_freshen_local() to make the hook work also with alternates.
    
    Helped-by: Kevin Willford <kewillf@microsoft.com>
    Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
    Ben Peart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    df7ff8e View commit details
    Browse the repository at this point in the history
  6. Allow hooks to be run before setup_git_directory()

    The use case here is to allow usage statistics to be gathered by
    running hooks before and after every hook, and to make that
    configurable via hooks.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    1d229a9 View commit details
    Browse the repository at this point in the history
  7. Add support for read-object as a background process to retrieve missi…

    …ng objects
    
    This commit converts the existing read_object hook proc model for
    downloading missing blobs to use a background process that is started
    the first time git encounters a missing blob and stays running until git
    exits.  Git and the read-object process communicate via stdin/stdout and
    a versioned, capability negotiated interface as documented in
    Documentation/technical/read-object-protocol.txt.  The advantage of this
    over the previous hook proc is that it saves the overhead of spawning a
    new hook process for every missing blob.
    
    The model for the background process was refactored from the recent git
    LFS work.  I refactored that code into a shared module (sub-process.c/h)
    and then updated convert.c to consume the new library.  I then used the
    same sub-process module when implementing the read-object background
    process.
    
    Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
    Ben Peart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    502045b View commit details
    Browse the repository at this point in the history
  8. gvfs: introduce pre/post command hooks

    GVFS Git introduced pre-command and post-command hooks, to gather usage
    statistics and to be able to adjust the worktree if necessary.
    
    As run_hooks() implicitly calls setup_git_directory(), and that
    function does surprising things to the global state (sometimes even
    changing the current working directory), it cannot be used here.
    
    This commit introduces the pre-command/post-command hooks, based on
    the previous patches that culminate in support for running hooks early,
    i.e. before setup_git_directory() was called.
    
    Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
    Ben Peart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    a160dbd View commit details
    Browse the repository at this point in the history
  9. sha1_file: when writing objects, skip the read_object_hook

    If we are going to write an object there is no use in calling
    the read object hook to get an object from a potentially remote
    source.  We would rather just write out the object and avoid the
    potential round trip for an object that doesn't exist.
    
    This change adds a flag to the check_and_freshen() and
    freshen_loose_object() functions' signatures so that the hook
    is bypassed when the functions are called before writing loose
    objects. The check for a local object is still performed so we
    don't overwrite something that has already been written to one
    of the objects directories.
    
    Based on a patch by Kevin Willford.
    
    Signed-off-by: Johannes Schindelin <johasc@microsoft.com>
    dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    b9f19b3 View commit details
    Browse the repository at this point in the history
  10. t0400: verify that the hook is called correctly from a subdirectory

    Suggested by Ben Peart.
    
    Signed-off-by: Johannes Schindelin <johasc@microsoft.com>
    dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    5e5e496 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d079684 View commit details
    Browse the repository at this point in the history
  12. Pass PID of git process to hooks.

    Signed-off-by: Alejandro Pauly <alpauly@microsoft.com>
    alepauly authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    05e24c6 View commit details
    Browse the repository at this point in the history
  13. pre-command: always respect core.hooksPath

    We need to respect that config setting even if we already know that we
    have a repository, but have not yet read the config.
    
    The regression test was written by Alejandro Pauly.
    
    Signed-off-by: Johannes Schindelin <johasc@microsoft.com>
    dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    43eaae4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    a7c99e1 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    246f1e4 View commit details
    Browse the repository at this point in the history
  16. status: add status.aheadbehind setting

    Add "status.aheadbehind" config setting to change the default
    behavior of ALL git status formats.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    66bcffe View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    4e6e83e View commit details
    Browse the repository at this point in the history
  18. gvfs: refactor loading the core.gvfs config value

    This code change makes sure that the config value for core_gvfs
    is always loaded before checking it.
    
    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    0d9c5fd View commit details
    Browse the repository at this point in the history
  19. status: add warning when a/b calculation takes too long for long/norm…

    …al format
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    8a3d1e9 View commit details
    Browse the repository at this point in the history
  20. status: add status serialization mechanism

    Teach STATUS to optionally serialize the results of a
    status computation to a file.
    
    Teach STATUS to optionally read an existing serialization
    file and simply print the results, rather than actually
    scanning.
    
    This is intended for immediate status results on extremely
    large repos and assumes the use of a service/daemon to
    maintain a fresh current status snapshot.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    1cce3be View commit details
    Browse the repository at this point in the history
  21. cache-tree: remove use of strbuf_addf in update_one

    String formatting can be a performance issue when there are
    hundreds of thousands of trees.
    
    Change to stop using the strbuf_addf and just add the strings
    or characters individually.
    
    There are a limited number of modes so added a switch for the
    known ones and a default case if something comes through that
    are not a known one for git.
    
    In one scenario regarding a huge worktree, this reduces the
    time required for a `git checkout <branch>` from 44 seconds
    to 38 seconds, i.e. it is a non-negligible performance
    improvement.
    
    Signed-off-by: Kevin Willford <kewillf@microsoft.com>
    Kevin Willford authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    1ccd8b2 View commit details
    Browse the repository at this point in the history
  22. status: ignore status.aheadbehind in porcelain formats

    Teach porcelain V[12] formats to ignore the status.aheadbehind
    config setting. They only respect the --[no-]ahead-behind
    command line argument.  This is for backwards compatibility
    with existing scripts.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    cbc1220 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    24456ab View commit details
    Browse the repository at this point in the history
  24. status: serialize to path

    Teach status serialization to take an optional pathname on
    the command line to direct that cache data be written there
    rather than to stdout.  When used this way, normal status
    results will still be written to stdout.
    
    When no path is given, only binary serialization data is
    written to stdout.
    
    Usage:
        git status --serialize[=<path>]
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    6ebc4ee View commit details
    Browse the repository at this point in the history
  25. fetch: Warn about forced updates after branch list

    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    a49236d View commit details
    Browse the repository at this point in the history
  26. status: reject deserialize in V2 and conflicts

    Teach status deserialize code to reject status cache
    when printing in porcelain V2 and there are unresolved
    conflicts in the cache file.  A follow-on task might
    extend the cache format to include this additiona data.
    
    See code for longer explanation.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    bbdfe60 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    029499b View commit details
    Browse the repository at this point in the history
  28. fetch: Add --[no-]show-forced-updates argument

    Also include fetch.showForcedUpdates config setting that is overridden
    by the command-line arguments. Shows a warning when skipping the work.
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    ec4b184 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    a71932d View commit details
    Browse the repository at this point in the history
  30. fetch: add documentation for --[no-]show-forced-updates

    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    ee7dcf5 View commit details
    Browse the repository at this point in the history
  31. Add virtual file system settings and hook proc

    On index load, clear/set the skip worktree bits based on the virtual
    file system data. Use virtual file system data to update skip-worktree
    bit in unpack-trees. Use virtual file system data to exclude files and
    folders not explicitly requested.
    
    Signed-off-by: Ben Peart <benpeart@microsoft.com>
    benpeart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    7d01a70 View commit details
    Browse the repository at this point in the history
  32. Update the virtualfilesystem support

    We now specify that it needs to be run from the root of the git work
    tree. This enables the hook to be found even if the current working
    directory is not the root of the repo (like when running 'git diff' with
    Beyond Compare configured as the diff tool.
    
    Also simpify how argv[] parameter is created.
    
    Signed-off-by: Ben Peart <benpeart@microsoft.com>
    benpeart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    059a364 View commit details
    Browse the repository at this point in the history
  33. virtualfilesystem: don't run the virtual file system hook if the inde…

    …x has been redirected
    
    Fixes #13
    
    Some git commands spawn helpers and redirect the index to a different
    location.  These include "difftool -d" and the sequencer
    (i.e. `git rebase -i`, `git cherry-pick` and `git revert`) and others.
    In those instances we don't want to update their temporary index with
    our virtualization data.
    
    Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
    benpeart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    bd721de View commit details
    Browse the repository at this point in the history
  34. virtualfilesystem: fix bug with symlinks being ignored

    The virtual file system code incorrectly treated symlinks as directories
    instead of regular files.  This meant symlinks were not included even if
    they are listed in the list of files returned by the core.virtualFilesystem
    hook proc.  Fixes #25
    
    Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
    benpeart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    555c129 View commit details
    Browse the repository at this point in the history
  35. virtualfilesystem: check if directory is included

    Add check to see if a directory is included in the virtualfilesystem
    before checking the directory hashmap.  This allows a directory entry
    like foo/ to find all untracked files in subdirectories.
    Kevin Willford authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    45dbfaf View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    3b1b6f8 View commit details
    Browse the repository at this point in the history
  37. vfs: fix case where directories not handled correctly

    The vfs does not correctly handle the case when there is a file
    that begins with the same prefix as a directory. For example, the
    following setup would encounter this issue:
    
        A directory contains a file named `dir1.sln` and a directory
        named `dir1/`.
    
        The directory `dir1` contains other files.
    
        The directory `dir1` is in the virtual file system list
    
    The contents of `dir1` should be in the virtual file system, but
    it is not. The contents of this directory do not have the skip
    worktree bit cleared as expected. The problem is in the
    `apply_virtualfilesystem(...)` function where it does not include
    the trailing slash of the directory name when looking up the
    position in the index to start clearing the skip worktree bit.
    
    This fix is it include the trailing slash when finding the first
    index entry from `index_name_pos(...)`.
    jamill authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    53c391e View commit details
    Browse the repository at this point in the history
  38. Merge 'forced-updates-after-branch-list'

    Move the warning about `--[no-]show-forced-updates` to the end of the
    branch update list. Also, show a different message when a lot of time is
    spent walking the commits. (Note, this time will not include the loose
    object downloads for the tip commits, but may include some loose object
    downloads for the reachable commits.)
    dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    5390d25 View commit details
    Browse the repository at this point in the history
  39. status: fix rename reporting when using serialization cache

    Fix "git status --deserialize" to correctly report both pathnames
    for renames.  Add a test case to verify.
    
    A change was made upstream that added an additional "rename_status"
    field to the "struct wt_status_change_data" structure.  It is used
    during the various print routines to decide if 2 pathnames need to
    be printed.
    
        5134ccd
        wt-status.c: rename rename-related fields in wt_status_change_data
    
    The fix here is to add that field to the status cache data.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    bb1c340 View commit details
    Browse the repository at this point in the history
  40. commit: add generation to pop_most_recent_commit()

    The method pop_most_recent_commit() is confusingly named, in that it
    pops the most-recent commit, but also adds that commit's parents to
    the list. This is used by a few commit walks, especially the one in
    ref_newer(). 'git push' uses ref_newer() to check if a force-push is
    necessary, and in the case of a force-push being needed, the current
    algorithm walks every reachable commit. This is especially severe in
    the case of an amended commit: they have the same parent, but we still
    walk to the very end of the graph!
    
    Add a 'min_generation' parameter to pop_most_recent_commit() to limit
    the commits that are walked to those with generation number at least
    'min_generation'. This greatly reduces the number of commits walked by
    a force-push.
    
    There may be more work to improve this algorithm in the future, but for
    now this is enough for most cases. This direction has the benefit that
    it does not affect the non-force-push case at all. Future directions
    should consider improving that case as well.
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    derrickstolee authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    c2a3bef View commit details
    Browse the repository at this point in the history
  41. Merge 'virtual-file-system-support'

    Add virtual file system settings and hook proc.  On index load,
    clear/set the skip worktree bits based on the virtual file system data.
    Use virtual file system data to update skip-worktree bit in
    unpack-trees. Use virtual file system data to exclude files and folders
    not explicitly requested.
    
    Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
    dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    8b6f500 View commit details
    Browse the repository at this point in the history
  42. status: add comments for ahead_behind_flags in serialization

    The "ahead_behind_flags" field of "struct wt_status" does not
    need to be stored in the serialization cache file, since it is
    a display property.  Update the code comments in both serialize
    and deserialize to reflect that.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    a0d2929 View commit details
    Browse the repository at this point in the history
  43. Merge 'gvfs/ds/generation-numbers-update'

    Revert the previous commits involving generation numbers and apply the
    commits that are in upstream `next`.
    dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    2885646 View commit details
    Browse the repository at this point in the history
  44. Merge pull request #6 from jeffhostetler/gvfs-serialize-status-rename

    GVFS serialize status updates
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    8ba1998 View commit details
    Browse the repository at this point in the history
  45. serialize-status: serialize global and repo-local exclude file metadata

    Changes to the global or repo-local excludes files can change the
    results returned by "git status" for untracked files.  Therefore,
    it is important that the exclude-file values used during serialization
    are still current at the time of deserialization.
    
    Teach "git status --serialize" to report metadata on the user's global
    exclude file (which defaults to "$XDG_HOME/git/ignore") and for the
    repo-local excludes file (which is in ".git/info/excludes").  Serialize
    will record the pathnames and mtimes for these files in the serialization
    header (next to the mtime data for the .git/index file).
    
    Teach "git status --deserialize" to validate this new metadata.  If either
    exclude file has changed since the serialization-cache-file was written,
    then deserialize will reject the cache file and force a full/normal status
    run.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    8f5767f View commit details
    Browse the repository at this point in the history
  46. status: deserialization wait

    Teach `git status --deserialize` to either wait indefintely
    or immediately fail if the status serialization cache file
    is stale.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    00c5b93 View commit details
    Browse the repository at this point in the history
  47. Merge pull request #1 from jeffhostetler/gvfs-serialize-exclude

    serialize-status: serialize global and repo-local exclude file metadata
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    328a16e View commit details
    Browse the repository at this point in the history
  48. rebase/stash: make post-command hook work again

    William Baker reported that the non-built-in rebase and stash fail to
    run the post-command hook (which is important for VFS for Git, though).
    
    The reason is that an `exec()` will replace the current process by the
    newly-exec'ed one (our Windows-specific emulation cannot do that, and
    does not even try, so this is only an issue on Linux/macOS). As a
    consequence, not even the atexit() handlers are run, including the
    one running the post-command hook.
    
    To work around that, let's spawn the legacy rebase/stash and exit with
    the reported exit code.
    dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    23af81f View commit details
    Browse the repository at this point in the history
  49. Merge pull request #7 from jeffhostetler/gvfs-status-serialize-wait

    status: deserialization wait
    jeffhostetler authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    c99f315 View commit details
    Browse the repository at this point in the history
  50. read-cache: add post-indexchanged hook

    benpeart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    3a18fee View commit details
    Browse the repository at this point in the history
  51. Merge pull request #36 Avoid sane_execvp in git rebase and `git s…

    …tash`
    
    William Baker reported that the non-built-in rebase and stash fail to
    run the post-command hook (which is important for VFS for Git, though).
    
    The reason is that an `exec()` will replace the current process by the
    newly-exec'ed one (our Windows-specific emulation cannot do that, and
    does not even try, so this is only an issue on Linux/macOS). As a
    consequence, not even the atexit() handlers are run, including the
    one running the post-command hook.
    
    To work around that, let's spawn the legacy rebase/stash and exit with
    the reported exit code.
    derrickstolee authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    44727d0 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    827aafc View commit details
    Browse the repository at this point in the history
  53. send-pack: do not check for sha1 file when GVFS_MISSING_OK set

    Kevin Willford authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    472cd84 View commit details
    Browse the repository at this point in the history
  54. Merge pull request #24 Match multi-pack-index feature from upstream

    This includes commits that fixup!-revert all the midx-related commits from our GVFS branch and replaces them with the exact commits that are being merged upstream. This should automatically remove the commits during our next version rebase-and-merge action.
    
    Changes upstream:
    - The builtin is called 'git multi-pack-index'.
    - The command-line takes a 'write' verb and an '--object-dir' parameter.
    - We no longer have a 'midx-head' or '*.midx' files.
    - Instead, we have a 'multi-pack-index' file in the pack-dir.
    - It no longer makes sense to specify '--update-head'
    dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    520a846 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    7b5e9a5 View commit details
    Browse the repository at this point in the history
  56. Add documentation for the post-indexchanged hook

    Kevin Willford authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    1ac2982 View commit details
    Browse the repository at this point in the history
  57. Merge pull request #68 send-pack do not check for sha1 file when GVFS…

    …_MISSING_OK set
    
    send-pack: do not check for sha1 file when GVFS_MISSING_OK set
    Kevin Willford authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    50ede04 View commit details
    Browse the repository at this point in the history
  58. update the reset --quiet path codepath to pass the correct flags to t…

    …he post-indexchanged hook
    
    In the reset --mixed code path, the index is created from scratch from the
    given commit by the call to read_from_tree().  Since this is the code that
    actually modifies the index, make sure we set the the_index.updated_skipworktree
    flag which is passed to the post-indexchanged hook.
    
    Updated the post-index-changed-hook test script to pass the --quiet flag
    so that we can prevent future regressions.
    
    Signed-off-by: Ben Peart <benpeart@microsoft.com>
    benpeart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    24037e0 View commit details
    Browse the repository at this point in the history
  59. Merge pull request #64 Index changed hook

    Index changed hook
    Kevin Willford authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    343e1d4 View commit details
    Browse the repository at this point in the history
  60. gvfs: block unsupported commands when running in a GVFS repo

    The following commands and options are not currently supported when working
    in a GVFS repo.  Add code to detect and block these commands from executing.
    
    1) fsck
    2) gc
    4) prune
    5) repack
    6) submodule
    8) update-index --split-index
    9) update-index --index-version (other than 4)
    10) update-index --[no-]skip-worktree
    11) worktree
    
    Signed-off-by: Ben Peart <benpeart@microsoft.com>
    benpeart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    424b79e View commit details
    Browse the repository at this point in the history
  61. Merge pull request #93 from benpeart/reset-quiet-post-indexchanged

    update the reset --quiet path codepath to pass the correct flags to the post-indexchanged hook
    benpeart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    ea8025e View commit details
    Browse the repository at this point in the history
  62. BRANCHES.md: Add explanation of branches and using forks

    Kevin Willford authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    623bd7f View commit details
    Browse the repository at this point in the history
  63. Merge pull request #91 from benpeart/block-commands

    gvfs: block unsupported commands when running in a GVFS repo
    benpeart authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    aab0bcb View commit details
    Browse the repository at this point in the history
  64. Merge pull request #98 Add explanation of branches and using forks

    BRANCHES.md: Add explanation of branches and using forks
    Kevin Willford authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    712f212 View commit details
    Browse the repository at this point in the history
  65. Merge pull request #84 Create 'expire' and 'repack' subcommands for m…

    …ulti-pack-index
    
    The multi-pack-index provides a fast way to find an object among a large list of pack-files. It stores a single pack-reference for each object id, so duplicate objects are ignored. Among a list of pack-files storing the same object, the most-recently modified one is used.
    
    Create new subcommands for the multi-pack-index builtin.
    
    * 'git multi-pack-index expire': If we have a pack-file indexed by the multi-pack-index, but all objects in that pack are duplicated in more-recently modified packs, then delete that pack (and any others like it). Delete the reference to that pack in the multi-pack-index.
    
    * 'git multi-pack-index repack --batch-size=<size>': Starting from the oldest pack-files covered by the multi-pack-index, find those whose on-disk size is below the batch size until we have a collection of packs whose sizes add up to the batch size. Create a new pack containing all objects that the multi-pack-index references to those packs.
    
    This allows us to create a new pattern for repacking objects: run 'repack'. After enough time has passed that all Git commands that started before the last 'repack' are finished, run 'expire' again. This approach has some advantages over the existing "repack everything" model:
    
    1. Incremental. We can repack a small batch of objects at a time, instead of repacking all reachable objects. We can also limit ourselves to the objects that do not appear in newer pack-files.
    
    2. Highly Available. By adding a new pack-file (and not deleting the old pack-files) we do not interrupt concurrent Git commands, and do not suffer performance degradation. By expiring only pack-files that have no referenced objects, we know that Git commands that are doing normal object lookups* will not be interrupted.
    
    * Note: if someone concurrently runs a Git command that uses get_all_packs(), then that command could try to read the pack-files and pack-indexes that we are deleting during an expire command. Such commands are usually related to object maintenance (i.e. fsck, gc, pack-objects) or are related to less-often-used features (i.e. fast-import, http-backend, server-info).
    
    We plan to use this approach in VFS for Git to do background maintenance of the "shared object cache" which is a Git alternate directory filled with packfiles containing commits and trees. We currently download pack-files on an hourly basis to keep up-to-date with the central server. The cache servers supply packs on an hourly and daily basis, so most of the hourly packs become useless after a new daily pack is downloaded. The 'expire' command would clear out most of those packs, but many will still remain with fewer than 100 objects remaining. The 'repack' command (with a batch size of 1-3gb, probably) can condense the remaining packs in commands that run for 1-3 min at a time. Since the daily packs range from 100-250mb, we will also combine and condense those packs.
    derrickstolee authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    e758b5f View commit details
    Browse the repository at this point in the history
  66. Merge pull request #107 use more structured data for midx expire

    This replaces #106. That PR was complicated and difficult to understand because we didn't use structured data, but instead relied on our simple arrays and overloaded that data.
    
    This is a bigger change, but results in code that is (hopefully) easier to understand. The new flow for writing a multi-pack-index is as follows:
    
    1. Construct a list of `midx_info` structs that contain the details of the packs. This list starts with the packs in the existing midx, followed by the new packs to add.  Keep track of the `orig_pack_int_id` for these packs.
    
    2. Construct the list of object entries. The `pack_int_id` we use here corresponds to the `orig_pack_int_id` for the pack we are using.
    
    3. Sort the packs by name.
    
    4. If we have packs to drop, identify where they are in the list of packs. We can use the sorted nature of the list to know we will find them in the correct order.
    
    5. Determine the `new_pack_int_id` for each `struct midx_info` by tracking how many are dropped by that point in the list.
    
    6. Construct a new permutation array that maps from `orig_pack_int_id` to `new_pack_int_id`. If the pack is expired, then the value used here is invalid and will error if any object tries to use that value.
    
    7. Count the length of the pack names we will write, and modify the length to be properly aligned if necessary.
    
    8. Write the midx as usual, tracking that we have `packs.nr - drop_count` packs to write.
    
    9. When writing the object offsets, use `packs.perm` to translate from the `orig_pack_int_id` to `new_pack_int_id`.
    
    While this PR is just one giant commit, I will peel parts across multiple commits for upstream. These will be interleaved with the commits already in `microsoft/git:master`.
    derrickstolee authored and dscho committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    79546de View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2019

  1. MSVC: include compat/win32/path-utils.h for MSVC, too, for real_path()

    A path such as 'c:/somepath/submodule/../.git/modules/submodule' wasn't
    resolved correctly any more, because the *nix variant of offset_1st_component
    is used instead of the Win32 specific version.
    
    Regression was introduced in commit 1cadad6 when mingw_offset_1st_component
    was moved from mingw.c which is included by msvc.c to a separate file. Then,
    the new file "compat/win32/path-utils.h" was only included for the __CYGWIN__
    and __MINGW32__ cases in git-compat-util.h, the case for _MSC_VER was missing.
    
    Signed-off-by: Sven Strickroth <email@cs-ware.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    csware authored and gitster committed Apr 9, 2019
    Configuration menu
    Copy the full SHA
    22c3634 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2019

  1. trace2: Documentation/technical/api-trace2.txt

    Created design document for Trace2 feature.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    4db5c20 View commit details
    Browse the repository at this point in the history
  2. trace2: create new combined trace facility

    Create a new unified tracing facility for git.  The eventual intent is to
    replace the current trace_printf* and trace_performance* routines with a
    unified set of git_trace2* routines.
    
    In addition to the usual printf-style API, trace2 provides higer-level
    event verbs with fixed-fields allowing structured data to be written.
    This makes post-processing and analysis easier for external tools.
    
    Trace2 defines 3 output targets.  These are set using the environment
    variables "GIT_TR2", "GIT_TR2_PERF", and "GIT_TR2_EVENT".  These may be
    set to "1" or to an absolute pathname (just like the current GIT_TRACE).
    
    * GIT_TR2 is intended to be a replacement for GIT_TRACE and logs command
      summary data.
    
    * GIT_TR2_PERF is intended as a replacement for GIT_TRACE_PERFORMANCE.
      It extends the output with columns for the command process, thread,
      repo, absolute and relative elapsed times.  It reports events for
      child process start/stop, thread start/stop, and per-thread function
      nesting.
    
    * GIT_TR2_EVENT is a new structured format. It writes event data as a
      series of JSON records.
    
    Calls to trace2 functions log to any of the 3 output targets enabled
    without the need to call different trace_printf* or trace_performance*
    routines.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    336f65a View commit details
    Browse the repository at this point in the history
  3. trace2: collect Windows-specific process information

    Add platform-specific interface to log information about the current
    process.
    
    On Windows, this interface is used to indicate whether the git process
    is running under a debugger and list names of the process ancestors.
    
    Information for other platforms is left for a future effort.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    f958588 View commit details
    Browse the repository at this point in the history
  4. trace2:data: add trace2 regions to wt-status

    Add trace2_region_enter() and trace2_region_leave() calls around the
    various phases of a status scan.  This gives elapsed time for each
    phase in the GIT_TR2_PERF and GIT_TR2_EVENT trace target.
    
    Also, these Trace2 calls now use s->repo rather than the_repository.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    8fab568 View commit details
    Browse the repository at this point in the history
  5. trace2:data: add editor/pager child classification

    Add trace2 process classification for editor and pager
    child processes.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    0de615f View commit details
    Browse the repository at this point in the history
  6. trace2:data: add trace2 sub-process classification

    Add trace2 classification for long-running processes
    started in sub-process.c
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    4364e93 View commit details
    Browse the repository at this point in the history
  7. trace2:data: add trace2 transport child classification

    Add trace2 child classification for transport processes.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    7734fde View commit details
    Browse the repository at this point in the history
  8. trace2:data: add trace2 hook classification

    Classify certain child processes as hooks.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    bcccfb4 View commit details
    Browse the repository at this point in the history
  9. trace2:data: add trace2 instrumentation to index read/write

    Add trace2 events to measure reading and writing the index.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    2f8b46c View commit details
    Browse the repository at this point in the history
  10. trace2:data: pack-objects: add trace2 regions

    When studying the performance of 'git push' we would like to know
    how much time is spent at various parts of the command. One area
    that could cause performance trouble is 'git pack-objects'.
    
    Add trace2 regions around the three main actions taken in this
    command:
    
    1. Enumerate objects.
    2. Prepare pack.
    3. Write pack-file.
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    derrickstolee authored and jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    89b487b View commit details
    Browse the repository at this point in the history
  11. trace2:data: add subverb to checkout command

    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    5295014 View commit details
    Browse the repository at this point in the history
  12. trace2:data: add subverb to reset command

    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    292f3ee View commit details
    Browse the repository at this point in the history
  13. trace2:data: add subverb for rebase

    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    facf05f View commit details
    Browse the repository at this point in the history
  14. trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.sh

    Create unit tests for Trace2.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    a57e33c View commit details
    Browse the repository at this point in the history
  15. trace2: add for_each macros to clang-format

    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    0b8734b View commit details
    Browse the repository at this point in the history
  16. Merge branch 'jh-vfs-trace2-p1' into jh-221

    Port of upstream / jh/trace2
    Related to non-GVFS-specific parts of #115
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    945c03d View commit details
    Browse the repository at this point in the history
  17. DROPME: trace2:status: use the_repository rather than s->repo

    Temporarily fix wt-status.c in GVFS 2.20.* to use "the_repository"
    rather than "s->repo" which does not yet appear in the this fork.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    f2550e3 View commit details
    Browse the repository at this point in the history
  18. gvfs:trace2:data: add trace2 tracing around read_object_process

    Add trace2 region around read_object_process to collect
    time spent waiting for missing objects to be dynamically
    fetched.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    6335cd2 View commit details
    Browse the repository at this point in the history
  19. gvfs:trace2:data: status deserialization information

    Add trace2 region and data events describing attempts to deserialize
    status data using a status cache.
    
    A category:status, label:deserialize region is pushed around the
    deserialize code.
    
    Deserialization results when reading from a file are:
        category:status, path   = <path>
        category:status, polled = <number_of_attempts>
        category:status, result = "ok" | "reject"
    
    When reading from STDIN are:
        category:status, path   = "STDIN"
        category:status, result = "ok" | "reject"
    
    Status will fallback and run a normal status scan when a "reject"
    is reported (unless "--deserialize-wait=fail").
    
    If "ok" is reported, status was able to use the status cache and
    avoid scanning the workdir.
    
    Additionally, a cmd_mode is emitted for each step: collection,
    deserialization, and serialization.  For example, if deserialization
    is attempted and fails and status falls back to actually computing
    the status, a cmd_mode message containing "deserialize" is issued
    and then a cmd_mode for "collect" is issued.
    
    Also, if deserialization fails, a data message containing the
    rejection reason is emitted.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    5ec3e0c View commit details
    Browse the repository at this point in the history
  20. gvfs:trace2:data: status serialization

    Add trace information around status serialization.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Apr 23, 2019
    Configuration menu
    Copy the full SHA
    14fe80f View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2019

  1. gvfs:trace2:data: add vfs stats

    Report virtual filesystem summary data.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    92c6ace View commit details
    Browse the repository at this point in the history
  2. progress: add sparse mode to force 100% complete message

    Add new start_sparse_progress() and start_delayed_sparse_progress()
    constructors and "sparse" flag to struct progress.
    
    Teach stop_progress() to force a 100% complete progress message before
    printing the final "done" message when "sparse" is set.
    
    Calling display_progress() for every item in a large set can
    be expensive.  If callers try to filter this for performance
    reasons, such as emitting every k-th item, progress would
    not reach 100% unless they made a final call to display_progress()
    with the item count before calling stop_progress().
    
    Now this is automatic when "sparse" is set.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    96f644f View commit details
    Browse the repository at this point in the history
  3. trace2:data: add trace2 data to midx

    Log multi-pack-index command mode.
    Log number of objects and packfiles in the midx.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    c2ce574 View commit details
    Browse the repository at this point in the history
  4. midx: add progress indicators in multi-pack-index verify

    Add progress indicators to more parts of midx verify.
    Use sparse progress indicator for object iteration.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    7b95007 View commit details
    Browse the repository at this point in the history
  5. midx: during verify group objects by packfile to speed verification

    Teach `multi-pack-index verify` to sort the set of object by
    packfile so that only one packfile needs to be open at a time.
    
    This is a performance improvement.  Previously, objects were
    verified in OID order.  This essentially requires all packfiles
    to be open at the same time.  If the number of packfiles exceeds
    the open file limit, packfiles would be LRU-closed and re-opened
    many times.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    e953496 View commit details
    Browse the repository at this point in the history
  6. Merge branch 'jh-vfs-trace2-p1-vfs' into jh-221

    Includes gvfs-specific commits from PR#115
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    964c2e1 View commit details
    Browse the repository at this point in the history
  7. Merge branch 'jh-vfs-midx-verify-too-many-packs' into jh-221

    Includes gitster / jh/midx-verify-too-many-packs which is in
    upstream master targeted for 2.22.
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    07fe56e View commit details
    Browse the repository at this point in the history
  8. config: initialize opts structure in repo_read_config()

    Initialize opts structure in repo_read_config().
    
    This change fixes a crash in later commit after a new field is added
    to the structure.
    
    In commit 3b25622, repo_read_config()
    was added.  It only initializes 3 fields in the opts structure.  It is
    passed to config_with_options() and then to do_git_config_sequence().
    However, do_git_config_sequence() drops the opts on the floor and calls
    git_config_from_file() rather than git_config_from_file_with_options(),
    so that may be why this hasn't been a problem in the past.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    d15ed93 View commit details
    Browse the repository at this point in the history
  9. trace2: refactor setting process starting time

    Create trace2_initialize_clock() and call from main() to capture
    process start time in isolation and before other sub-systems are
    ready.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    a0025c9 View commit details
    Browse the repository at this point in the history
  10. trace2: add absolute elapsed time to start event

    Add elapsed process time to "start" event to measure
    the performance of early process startup.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    5fce9cc View commit details
    Browse the repository at this point in the history
  11. trace2: find exec-dir before trace2 initialization

    Teach Git to resolve the executable directory before initializing
    Trace2.  This allows the system configuration directory to be
    discovered earlier (because it is sometimes relative to the prefix
    or runtime-prefix).
    
    This will be used by the next commit to allow trace2 settings to
    be loaded from the system config.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    e34dcf6 View commit details
    Browse the repository at this point in the history
  12. config: add read_very_early_config()

    Created an even lighter version of read_early_config() that
    only looks at system and global config settings.  It omits
    repo-local, worktree-local, and command-line settings.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    999a778 View commit details
    Browse the repository at this point in the history
  13. trace2: use system/global config for default trace2 settings

    Teach git to read the system and global config files for
    default Trace2 settings.  This allows system-wide Trace2 settings to
    be installed and inherited to make it easier to manage a collection of
    systems.
    
    The original GIT_TR2* environment variables are loaded afterwards and
    can be used to override the system settings.
    
    Only the system and global config files are used.  Repo and worktree
    local config files are ignored.  Likewise, the "-c" command line
    arguments are also ignored.  These limits are for performance reasons.
    
    (1) For users not using Trace2, there should be minimal overhead to
    detect that Trace2 is not enabled.  In particular, Trace2 should not
    allocate lots of otherwise unused data strucutres.
    
    (2) For accurate performance measurements, Trace2 should be initialized
    as early in the git process as possible, and before most of the normal
    git process initialization (which involves discovering the .git directory
    and reading a hierarchy of config files).
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    498f28b View commit details
    Browse the repository at this point in the history
  14. trace2: report peak memory usage of the process

    Teach Windows version of git to report peak memory usage
    during exit() processing.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    cc88dab View commit details
    Browse the repository at this point in the history
  15. trace2: clarify UTC datetime formatting

    Update tr2_tbuf_utc_datetime to generate extended UTC format.
    Update tr2_tgt_event target to use extended format in 'time' columns.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    a5ba2b9 View commit details
    Browse the repository at this point in the history
  16. trace2: make SIDs more unique

    Update SID component construction to use the current UTC datetime
    and a portion of the SHA1 of the hostname.
    
    Use an simplified date/time format to make it easier to use the
    SID component as a logfile filename.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    c673002 View commit details
    Browse the repository at this point in the history
  17. trace2: update docs to describe system/global config settings

    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    43e2756 View commit details
    Browse the repository at this point in the history
  18. Merge branch 'jh-vfs-trace2-sid-fix' into jh-221

    Includes gitster / jh/trace2-sid-fix
    jeffhostetler committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    0ae60e8 View commit details
    Browse the repository at this point in the history
  19. mingw: allow building with an MSYS2 runtime v3.x

    Recently the Git for Windows project started the upgrade process to
    a MSYS2 runtime version based on Cygwin v3.x.
    
    This has the very notable consequence that `$(uname -r)` no longer
    reports a version starting with "2", but a version with "3".
    
    That breaks our build, as df5218b (config.mak.uname: support MSys2,
    2016-01-13) simply did not expect the version reported by `uname -r` to
    depend on the underlying Cygwin version: it expected the reported
    version to match the "2" in "MSYS2".
    
    So let's invert that test case to test for *anything else* than a
    version starting with "1" (for MSys). That should safeguard us for the
    future, even if Cygwin ends up releasing versionsl like 314.272.65536.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    dscho committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    1393cf5 View commit details
    Browse the repository at this point in the history
  20. macOS: make sure that gettext is found

    Due to reasons (some XCode versions seem to include gettext, some
    don't?), Homebrew does not expose the libraries and headers in
    /usr/local/ by default anymore.
    
    Let's help find them again.
    
    Note: for some reason, this is a change of behavior caused by the
    upgrade to Mojave, identified in our Azure Pipeline; it seems that
    Homebrew used to add the /usr/local/ directories to the include and link
    search path before, but now it no longer does.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    dscho committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    b95ef9d View commit details
    Browse the repository at this point in the history
  21. t9822: skip tests if file names cannot be ISO-8859-1 encoded

    Most notably, it seems that macOS' APFS does not allow that.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    dscho committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    97ee5fc View commit details
    Browse the repository at this point in the history
  22. Merge branch 'js/macos-gettext-build'

    This is patch 1/2 that is needed to cope with Azure Pipelines' macOS
    agents' upgrade to Mojave (which uncovered two bugs in Git).
    dscho committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    b897cba View commit details
    Browse the repository at this point in the history
  23. Merge branch 'js/iso8895-test-on-apfs'

    This is patch 2/2 that is needed to cope with Azure Pipelines' macOS
    agents' upgrade to Mojave (which uncovered two bugs in Git).
    dscho committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    d16e36e View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2019

  1. Merge branch 'ss/msvc-path-utils-fix'

    This is a necessary fix to allow compiling with MSVC again, backported
    from upstream git.git's `pu` branch thicket.
    dscho committed Apr 26, 2019
    Configuration menu
    Copy the full SHA
    6c00e6b View commit details
    Browse the repository at this point in the history

Commits on May 1, 2019

  1. trace2:gvfs:experiment: clear_ce_flags_1

    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed May 1, 2019
    Configuration menu
    Copy the full SHA
    253ca76 View commit details
    Browse the repository at this point in the history
  2. trace2:gvfs:experiment: prime_cache_tree

    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed May 1, 2019
    Configuration menu
    Copy the full SHA
    51804fb View commit details
    Browse the repository at this point in the history
  3. trace2:gvfs:experiment: traverse_trees

    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed May 1, 2019
    Configuration menu
    Copy the full SHA
    fa5a6dc View commit details
    Browse the repository at this point in the history
  4. trace2:gvfs:experiment: report_tracking

    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed May 1, 2019
    Configuration menu
    Copy the full SHA
    cab7dad View commit details
    Browse the repository at this point in the history
  5. Merge pull request #133 from jeffhostetler/gvfs-trace2-checkout-exper…

    …iment
    
    Gvfs trace2 checkout and reset experiment
    jeffhostetler authored May 1, 2019
    Configuration menu
    Copy the full SHA
    e872b12 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2019

  1. fetch: avoid calling write_or_die()

    The write_or_die() function has one quirk that a caller might not
    expect: when it sees EPIPE from the write() call, it translates that
    into a death by SIGPIPE. This doesn't change the overall behavior (the
    program exits either way), but it does potentially confuse test scripts
    looking for a non-signal exit code.
    
    Let's switch away from using write_or_die() in a few code paths, which
    will give us more consistent exit codes. It also gives us the
    opportunity to write more descriptive error messages, since we have
    context that write_or_die() does not.
    
    Note that this won't do much by itself, since we'd typically be killed
    by SIGPIPE before write_or_die() even gets a chance to do its thing.
    That will be addressed in the next patch.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff authored and dscho committed May 13, 2019
    Configuration menu
    Copy the full SHA
    c569f4b View commit details
    Browse the repository at this point in the history
  2. fetch: ignore SIGPIPE during network operation

    The default SIGPIPE behavior can be useful for a command that generates
    a lot of output: if the receiver of our output goes away, we'll be
    notified asynchronously to stop generating it (typically by killing the
    program).
    
    But for a command like fetch, which is primarily concerned with
    receiving data and writing it to disk, an unexpected SIGPIPE can be
    awkward. We're already checking the return value of all of our write()
    calls, and dying due to the signal takes away our chance to gracefully
    handle the error.
    
    On Linux, we wouldn't generally see SIGPIPE at all during fetch. If the
    other side of the network connection hangs up, we'll see ECONNRESET. But
    on OS X, we get a SIGPIPE, and the process is killed. This causes t5570
    to racily fail, as we sometimes die by signal (instead of the expected
    die() call) when the server side hangs up.
    
    Let's ignore SIGPIPE during the network portion of the fetch, which will
    cause our write() to return EPIPE, giving us consistent behavior across
    platforms.
    
    This fixes the test flakiness, but note that it stops short of fixing
    the larger problem. The server side hit a fatal error, sent us an "ERR"
    packet, and then hung up. We notice the failure because we're trying to
    write to a closed socket. But by dying immediately, we never actually
    read the ERR packet and report its content to the user. This is a (racy)
    problem on all platforms. So this patch lays the groundwork from which
    that problem might be fixed consistently, but it doesn't actually fix
    it.
    
    Note the placement of the SIGPIPE handling. The absolute minimal change
    would be to ignore SIGPIPE only when we're writing. But twiddling the
    signal handler for each write call is inefficient and maintenance
    burden. On the opposite end of the spectrum, we could simply declare
    that fetch does not need SIGPIPE handling, since it doesn't generate a
    lot of output, and we could just ignore it at the start of cmd_fetch().
    
    This patch takes a middle ground. It ignores SIGPIPE during the network
    operation (which is admittedly most of the program, since the actual
    network operations are all done under the hood by the transport code).
    So it's still pretty coarse.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff authored and dscho committed May 13, 2019
    Configuration menu
    Copy the full SHA
    de15234 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'jk/no-sigpipe-during-network-transport'

    This branch fixes the flakiness of the git-daemon tests on macOS.
    dscho committed May 13, 2019
    Configuration menu
    Copy the full SHA
    5dff64c View commit details
    Browse the repository at this point in the history
  4. t6500(mingw): use the Windows PID of the shell

    In Git for Windows, we use the MSYS2 Bash which inherits a non-standard
    PID model from Cygwin's POSIX emulation layer: every MSYS2 process has a
    regular Windows PID, and in addition it has an MSYS2 PID (which
    corresponds to a shadow process that emulates Unix-style signal
    handling).
    
    With the upgrade to the MSYS2 runtime v3.x, this shadow process cannot
    be accessed via `OpenProcess()` any longer, and therefore t6500 thought
    incorrectly that the process referenced in `gc.pid` (which is not
    actually a real `gc` process in this context, but the current shell) no
    longer exists.
    
    Let's fix this by making sure that the Windows PID is written into
    `gc.pid` in this test script soo that `git.exe` is able to understand
    that that process does indeed still exist.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed May 13, 2019
    Configuration menu
    Copy the full SHA
    7f8e9de View commit details
    Browse the repository at this point in the history
  5. mingw: allow compiling with GCC 8 and DEVELOPER=1

    The return type of the `GetProcAddress()` function is `FARPROC` which
    evaluates to `long long int (*)()`, i.e. it cannot be cast to the
    correct function signature by GCC 8.
    
    To work around that, we first cast to `void *` and go on with our merry
    lives.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed May 13, 2019
    Configuration menu
    Copy the full SHA
    59a4efb View commit details
    Browse the repository at this point in the history
  6. kwset: allow building with GCC 8

    The kwset functionality makes use of the obstack code, which expects to
    be handed a function that can allocate large chunks of data. It expects
    that function to accept a `size` parameter of type `long`.
    
    This upsets GCC 8 on Windows, because `long` does not have the same
    bit size as `size_t` there.
    
    Now, the proper thing to do would be to switch to `size_t`. But this
    would make us deviate from the "upstream" code even further, making it
    hard to synchronize with newer versions, and also it would be quite
    involved because that `long` type is so invasive in that code.
    
    Let's punt, and instead provide a super small wrapper around
    `xmalloc()`.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed May 13, 2019
    Configuration menu
    Copy the full SHA
    2e27281 View commit details
    Browse the repository at this point in the history
  7. fixup! mingw: kill child processes in a gentler way

    This is needed to make things compile with GCC 8.x and later.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed May 13, 2019
    Configuration menu
    Copy the full SHA
    4ac9d43 View commit details
    Browse the repository at this point in the history
  8. Merge branch 'dscho/gcc-8-gfw'

    This backports several patch series from Git for Windows' `master` to
    make things compile with GCC v8.x, as that will soon be the default for
    Git for Windows (and is already the current setup on this developer's
    machine).
    dscho committed May 13, 2019
    Configuration menu
    Copy the full SHA
    18b387b View commit details
    Browse the repository at this point in the history

Commits on May 21, 2019

  1. merge-recursive: avoid confusing logic in was_dirty()

    It took this developer more than a moment to verify that was_dirty()
    really returns 0 (i.e. "false") if the file was not even tracked. In
    other words, the `dirty` variable that was initialized to 1 (i.e.
    "true") and then negated to be returned was not helping readability.
    
    The same holds for the final return: rather than assigning the value to
    return to `dirty` and then *immediately* returning that, we can simplify
    it to a single statement.
    dscho committed May 21, 2019
    Configuration menu
    Copy the full SHA
    447d760 View commit details
    Browse the repository at this point in the history
  2. merge-recursive: add some defensive coding to was_dirty()

    It took this developer quite a good while to understand why the current
    code cannot get a `NULL` returned by `index_file_exists()`. To
    un-confuse readers (and future-proof the code), let's just be safe and
    check before we dereference the returned pointer.
    dscho committed May 21, 2019
    Configuration menu
    Copy the full SHA
    a4eec27 View commit details
    Browse the repository at this point in the history
  3. merge-recursive: teach was_dirty() about the virtualfilesystem

    The idea of the virtual file system really is to tell Git to avoid
    accessing certain paths. This fixes the case where a given path is not
    yet included in the virtual file system and we are about to write a
    conflicted version of it.
    dscho committed May 21, 2019
    Configuration menu
    Copy the full SHA
    61287c2 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'virtualfilesystem-and-merge-recursive'

    The major work on merge-recursive.c that went into v2.21.0 necessitates
    an adjustment to work well with VFSforGit's virtualfilesystem hook.
    dscho committed May 21, 2019
    Configuration menu
    Copy the full SHA
    f6d0b60 View commit details
    Browse the repository at this point in the history