Revwalk merge base #581

wants to merge 77 commits into from
Commits on Mar 3, 2012
  1. @vmg
  2. @vmg

    error-handling: Add new routines

    vmg committed Feb 14, 2012
    Obviously all the old throw routines are still in place, so we can
    gradually port over.
  3. @vmg

    refs: Error handling rework. WIP

    vmg committed Feb 15, 2012
Commits on Mar 5, 2012
  1. @vmg

    error-handling: References

    vmg committed Feb 17, 2012
    Yes, this is error handling solely for `refs.c`, but some of the
    abstractions leak all ofer the code base.
Commits on Mar 6, 2012
  1. @vmg

    diff: Fix rebase breackage

    vmg committed Mar 6, 2012
  2. @vmg

    error-handling: Repository

    vmg committed Mar 7, 2012
    This also includes droping `git_buf_lasterror` because it makes no sense
    in the new system. Note that in most of the places were it has been
    dropped, the code needs cleanup. I.e. GIT_ENOMEM is going away, so
    instead it should return a generic `-1` and obviously not throw
Commits on Mar 7, 2012
  1. @arrbee

    Migrating diff to new error handling

    arrbee committed Mar 6, 2012
    Ended up migrating a bunch of upstream functions as well
    including vector, attr_file, and odb in order to get this
    to work right.
  2. @vmg

    error-handling: Config

    vmg committed Mar 7, 2012
  3. @arrbee

    Fix issues raised on pull request

    arrbee committed Mar 7, 2012
    This resolves the comments on pull request #590
  4. @arrbee

    Merge pull request #590 from arrbee/new-error-handling

    arrbee committed Mar 7, 2012
    Migrating diff to new error handling
Commits on Mar 9, 2012
  1. @vmg

    error-handling: On-disk config file backend

    vmg committed Mar 9, 2012
    	- Proper error reporting when encountering syntax errors in a
    	config file (file, line number, column).
    	- Rewritten `config_write`, now with 99% less goto-spaghetti
    	- Error state in `git_filebuf`: filebuf write functions no longer
    	need to be checked for error returns. If any of the writes performed
    	on a buffer fail, the last call to `git_filebuf_commit` or
    	`git_filebuf_hash` will fail accordingly and set the appropiate error
    	message. Baller!
Commits on Mar 13, 2012
  1. @arrbee

    Migrate ODB files to new error handling

    arrbee committed Mar 12, 2012
    This migrates odb.c, odb_loose.c, odb_pack.c and pack.c to
    the new style of error handling.  Also got the unix and win32
    versions of map.c.  There are some minor changes to other
    files but no others were completely converted.
    This also contains an update to filebuf so that a zeroed out
    filebuf will not think that the fd (== 0) is actually open
    (and inadvertently call close() on fd 0 if cleaned up).
    Lastly, this was built and tested on win32 and contains a
    bunch of fixes for the win32 build which was pretty broken.
  2. @arrbee

    Add map.c with shared p_mmap param validation

    arrbee committed Mar 12, 2012
    Forgot to add this file in the previous commit
  3. @arrbee

    Resolve comments from pull request

    arrbee committed Mar 13, 2012
    This converts the map validation function into a macro, tweaks
    the GITERR_OS system error automatic appending, and adds a
    tentative new error access API and some quick unit tests for
    both the old and new error APIs.
Commits on Mar 14, 2012
  1. @arrbee

    Convert attr and other files to new errors

    arrbee committed Mar 14, 2012
    This continues to add other files to the new error handling
    style.  I think the only real concerns here are that there are
    a couple of error return cases that I have converted to asserts,
    but I think that it was the correct thing to do given the new
    error style.
Commits on Mar 15, 2012
  1. @arrbee

    Continue error conversion

    arrbee committed Mar 14, 2012
    This converts blob.c, fileops.c, and all of the win32 files.
    Also, various minor cleanups throughout the code.  Plus, in
    testing the win32 build, I cleaned up a bunch (although not
    all) of the warnings with the 64-bit build.
  2. @vmg

    Merge pull request #595 from arrbee/new-errors-odb

    vmg committed Mar 14, 2012
    Update odb code to new error handling
Commits on Mar 16, 2012
  1. @nulltoken
  2. @vmg

    Merge pull request #600 from nulltoken/fix/windows-network-paths

    vmg committed Mar 16, 2012
    Fix windows network paths
  3. @arrbee

    Convert attr, ignore, mwindow, status to new errors

    arrbee committed Mar 16, 2012
    Also cleaned up some previously converted code that still had
    little things to polish.
Commits on Mar 19, 2012
  1. @arrbee

    Update to latest clar

    arrbee committed Mar 19, 2012
  2. @arrbee

    Migrate index, oid, and utils to new errors

    arrbee committed Mar 19, 2012
    This includes a few cleanups that came up while converting
    these files.
    This commit introduces a could new git error classes, including
    the catchall class: GITERR_INVALID which I'm using as the class
    for invalid and out of range values which are detected at too low
    a level of library to use a higher level classification.  For
    example, an overflow error in parsing an integer or a bad letter
    in parsing an OID string would generate an error in this class.
Commits on Mar 20, 2012
  1. @arrbee

    Convert indexer, notes, sha1_lookup, and signature

    arrbee committed Mar 19, 2012
    More files moved to new error handling style.
Commits on Mar 21, 2012
  1. @arrbee

    Convert reflog to new errors

    arrbee committed Mar 20, 2012
    Cleaned up some other issues.
  2. @nulltoken
  3. @arrbee

    Merge pull request #602 from arrbee/more-error-handling

    arrbee committed Mar 21, 2012
    More error handling conversions
  4. @arrbee

    Reimplment git_status_foreach using git diff

    arrbee committed Mar 21, 2012
    This is an initial reimplementation of status using diff a la
    the way that core git does it.
Commits on Mar 22, 2012
  1. @arrbee

    Adding new tests for new status command

    arrbee committed Mar 22, 2012
    This is a work in progress.  This adds two new sets of tests,
    the issue_592 tests from @nulltoken's pull request #601 and
    some new tests for submodules.  The submodule tests still have
    issues where the status is not reported correctly.  That needs
    to be fixed before merge.
  2. @arrbee

    New status fixes

    arrbee committed Mar 22, 2012
    This adds support for roughly-right tracking of submodules
    (although it does not recurse into submodules to detect
    internal modifications a la core git), and it adds support
    for including unmodified files in diff iteration if requested.
  3. @arrbee

    More status testing

    arrbee committed Mar 22, 2012
    This "fixes" the broken t18 status tests to accurately reflect
    the new behavior for "created" untracked subdirectories.  See
    discussion in the PR for more details.
    This also contains the submodules unit test that I forgot to
    git add, and ports most of the t18-status.c tests to clar (still
    missing a couple of the git_status_file() single file tests).
  4. @arrbee

    Migrate remaining status tests to Clar

    arrbee committed Mar 22, 2012
    This finishes up the migration of remaining tests from
    tests/t18-status.c over the tests-clar/status/worktree.c.
  5. @arrbee

    Merge pull request #607 from nulltoken/fix/file-close-on-error

    arrbee committed Mar 22, 2012
    test helpers: Fix file close on error
Commits on Mar 23, 2012
  1. @arrbee

    Fix crash in new status and add recurse option

    arrbee committed Mar 23, 2012
    This fixes the bug that @nulltoken found (thank you!) where
    if there were untracked directories alphabetically after the
    last tracked item, the diff implementation would deref a NULL
    The fix involved the code which decides if it is necessary
    to recurse into a directory in the working dir, so it was
    easy to add a new option `GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS`
    to control if the contents of untracked directories should be
    included in status.
  2. @arrbee

    Restore default status recursion behavior

    arrbee committed Mar 23, 2012
    This gives `git_status_foreach()` back its old behavior of
    emulating the "--untracked=all" behavior of git.  You can
    get any of the various --untracked options by passing flags
    to `git_status_foreach_ext()` but the basic version will
    keep the behavior it has always had.
Commits on Mar 26, 2012
  1. @arrbee

    Fix error in tree iterator when popping up trees

    arrbee committed Mar 25, 2012
    There was an error in the tree iterator where it would
    delete two tree levels instead of just one when popping
    up a tree level.  Unfortunately the test data for the
    tree iterator did not have any deep trees with subtrees
    in the middle of the tree items, so this problem went
    unnoticed.  This contains the 1-line fix plus new test
    data and tests that reveal the issue.
  2. @arrbee

    Eliminate hairy COITERATE macro

    arrbee committed Mar 25, 2012
    I decided that the COITERATE macro was, in the end causing
    more confusion that it would save and decided just to write
    out the loops that I needed for parallel diff list iteration.
    It is not that much code and this just feels less obfuscated.
  3. @arrbee
Commits on Mar 28, 2012
  1. @arrbee

    Added submodule API and use in status

    arrbee committed Mar 28, 2012
    When processing status for a newly checked out repo, it is
    possible that there will be submodules that have not yet been
    initialized.  The only way to distinguish these from untracked
    directories is to have some knowledge of submodules.  This
    commit adds a new submodule API which, given a name or path,
    can determine if it appears to be a submodule and can give
    information about the submodule.
Commits on Mar 30, 2012
  1. @arrbee

    Improve config handling for diff,submodules,attrs

    arrbee committed Mar 30, 2012
    This adds support for a bunch of core.* settings that affect
    diff and status, plus fixes up some incorrect implementations
    of those settings from before.  Also, this cleans up the
    handling of config settings in the new submodules code and
    in the old attrs/ignore code.
  2. @arrbee

    Fix bug when join_n refers to original buffer

    arrbee committed Mar 30, 2012
    There was a bug in git_buf_join_n when the contents of the
    original buffer were joined into itself and the realloc
    moved the pointer to the original buffer.
Commits on Mar 31, 2012
  1. @vmg

    Merge pull request #610 from arrbee/status-rewrite

    vmg committed Mar 31, 2012
    Rewrite status using diff
Commits on Apr 1, 2012
  1. @nulltoken
Commits on Apr 2, 2012
  1. @vmg

    error-handling: Commit (WIP)

    vmg committed Mar 28, 2012
Commits on Apr 3, 2012
  1. @vmg

    Merge pull request #596 from nulltoken/fix/non-7bit-ascii-reference-n…

    vmg committed Apr 2, 2012
    Allow references to bear non-7bit-ascii names on Windows
Commits on Apr 4, 2012
  1. @carlosmn

    Clean up valgrind warnings

    carlosmn committed Apr 4, 2012
  2. @nulltoken
  3. @vmg

    Merge pull request #618 from nulltoken/fix/warning

    vmg committed Apr 4, 2012
    Fix compilation warning
Commits on Apr 10, 2012
  1. @nulltoken
  2. @nulltoken
  3. @nulltoken

    Add basic branch management API: git_branch_create(), git_branch_dele…

    nulltoken committed Apr 4, 2012
    …te(), git_branch_list()
  4. @nulltoken
  5. @nulltoken
Commits on Apr 11, 2012
  1. @vmg

    Merge branch 'new-error-handling' of into …

    vmg committed Apr 11, 2012
  2. @nulltoken @vmg
  3. @vmg

    Merge pull request #619 from nulltoken/topic/branches

    vmg committed Apr 11, 2012
    Basic branch management API
  4. @carlosmn
  5. @nulltoken @vmg

    Fix compilation errors and warnings

    nulltoken committed with vmg Apr 11, 2012
  6. @carlosmn @vmg

    error-handling: remote, transport

    carlosmn committed with vmg Mar 6, 2012
  7. @carlosmn @vmg

    error-handling: protocol, pkt

    carlosmn committed with vmg Mar 6, 2012
  8. @carlosmn @vmg

    error-handling: git transport

    carlosmn committed with vmg Mar 6, 2012
  9. @carlosmn @vmg

    error-handling: http

    carlosmn committed with vmg Mar 6, 2012
  10. @carlosmn @vmg

    error-handling: netops

    carlosmn committed with vmg Mar 7, 2012
  11. @carlosmn @vmg
  12. @carlosmn @vmg
  13. @carlosmn @vmg

    error-handling: fetch

    carlosmn committed with vmg Mar 30, 2012
  14. @carlosmn @vmg

    error-handling local transport

    carlosmn committed with vmg Apr 1, 2012
  15. @vmg

    tests: Remove unused file

    vmg committed Apr 11, 2012
  16. @vmg

    status: Remove status_old

    vmg committed Apr 11, 2012
    This is Git yo. You can fetch stuff from the history if you need it.
  17. @arrbee
Commits on Apr 12, 2012
  1. @carlosmn

    revwalk: allow pushing/hiding a reference by name

    carlosmn committed Feb 28, 2012
    The code was already there, so factor it out and let users push an OID
    by giving it a reference name. Only refs to commits are
    supported. Annotated tags will throw an error.
  2. @carlosmn

    Implement git_merge_base()

    carlosmn committed Mar 3, 2012
    It's implemented in revwalk.c so it has access to the revision
    walker's commit cache and related functions. The algorithm is the one
    used by git, modified so it fits better with the library's functions.
  3. @carlosmn
  4. @carlosmn

    revwalk: use merge bases to speed up processing

    carlosmn committed Mar 3, 2012
    There is no need walk down the parents of a merge base to mark them as
    uninteresting because we'll never see them. Calculate the merge bases
    in prepare_walk() so mark_uninteresting() can stop at a merge base
    instead of walking all the way to the root.
  5. @carlosmn

    revwalk: add test hiding a commit without a merge base

    carlosmn committed Mar 3, 2012
    Nothing should be hidden and this shouldn't bother the merge base
  6. @carlosmn

    revwalk: use a priority queue for calculating merge bases

    carlosmn committed Mar 4, 2012
    As parents are older than their children, we're appending to the
    commit list most of the time, which makes an ordered linked list quite
    While we're there, don't sort the results list in the main loop, as
    we're sorting them afterwards and it creates extra work.
  7. @carlosmn
  8. @carlosmn

    error-handling: revwalk

    carlosmn committed Apr 12, 2012