summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* errors: Rename error codesbreaking-changesVicent Martí2012-05-1861-170/+171
|
* errors: Rename the generic return codesVicent Martí2012-05-1890-368/+404
|
* Properly tag all `enums` with a `_t`Vicent Martí2012-05-188-31/+34
|
* refs: git_reference_listall -> git_reference_listVicent Martí2012-05-186-7/+7
|
* errors: Remove old commentsVicent Martí2012-05-181-13/+0
|
* global: Fix unit tests after reorderingVicent Martí2012-05-187-82/+82
|
* global: Change parameter ordering in APIVicent Martí2012-05-1814-97/+118
| | | | Consistency is good.
* Merge pull request #709 from arrbee/profiling-with-scottgVicent Martí2012-05-176-25/+52
|\ | | | | Profiling with scottg
| * No point in keeping commented out fnRussell Belfer2012-05-171-9/+0
| |
| * Other optimization and warning fixesRussell Belfer2012-05-172-14/+23
| | | | | | | | | | This fixes a warning left by the earlier optimization and addresses one of the other hotspots identified by GProf.
| * Optimize away git_text_gather_stats in diffRussell Belfer2012-05-173-7/+23
| | | | | | | | | | | | | | | | GProf shows `git_text_gather_stats` as the most expensive call in large diffs. The function calculates a lot of information that is not actually used and does not do so in a optimal order. This introduces a tuned `git_buf_is_binary` function that executes the same algorithm in a fraction of the time.
| * Basic setup for profilingRussell Belfer2012-05-173-2/+13
| | | | | | | | | | This fixes the examples so they will build and adds a PROFILE option to the CMakeFile that enabled gprof info on non-Windows
* | Merge pull request #708 from arrbee/fix-empty-workdir-iteratorVicent Martí2012-05-172-4/+81
|\ \ | |/ |/| Fix workdir iterators on empty directories
| * Fix workdir iterators on empty directoriesRussell Belfer2012-05-172-4/+81
|/ | | | | | | Creating a workdir iterator on a directory with absolutely no files was returning an error (GIT_ENOTFOUND) instead of an iterator for nothing. This fixes that and includes two new tests that cover that case.
* Merge pull request #706 from arrbee/fix_592_againVicent Martí2012-05-1625-36/+148
|\ | | | | Fix status for files under ignored dirs
| * Fix status for files under ignored dirsRussell Belfer2012-05-1625-36/+148
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a bug where tracked files inside directories that were inside ignored directories where not being found by status. To make that a little clearer, if you have a .gitignore with: ignore/ And then have the following files: ignore/dir/tracked <-- actually a tracked file ignore/dir/untracked <-- should be ignored Then we would show the tracked file as being removed (because when we got the to contained item "dir/" inside the ignored directory, we decided it was safe to skip -- bzzt, wrong!). This update is much more careful about checking that we are not skipping over any prefix of a tracked item, regardless of whether it is ignored or not. As documented in diff.c, this commit does create behavior that still differs from core git with regards to the handling of untracked files contained inside ignored directories. With libgit2, those files will just not show up in status or diff. With core git, those files don't show up in status or diff either *unless* they are explicitly ignored by a .gitignore pattern in which case they show up as ignored files. Needless to say, this is a local behavior difference only, so it should not be important and (to me) the libgit2 behavior seems more consistent.
* Merge pull request #705 from nulltoken/fix/note_list_callback_signatureVicent Martí2012-05-163-11/+24
|\ | | | | notes: make git_note_foreach() callback signature easier to cope with from a binding perspective
| * notes: make git_note_foreach() callback signature easier to cope with from a ↵nulltoken2012-05-163-11/+24
|/ | | | binding perspective
* tree: Naming conventionsVicent Martí2012-05-166-14/+17
|
* clar: Fix warningVicent Martí2012-05-161-1/+0
|
* tree: Kill the `git_tree_diff` functionsVicent Martí2012-05-163-472/+0
| | | | These are deprecated and replaced with the diffing code in git2/diff.h
* Merge pull request #700 from cholin/revwalk_resetVicent Martí2012-05-161-0/+3
|\ | | | | really reset walker with git_revwalk_reset
| * really reset walker with git_revwalk_resetNico von Geyso2012-05-151-0/+3
| | | | | | | | | | | | | | | | From the description of git_revwalk_reset in revwalk.h the function should clear all pushed and hidden commits, and leave the walker in a blank state (just like at creation). Apparently everything gets reseted appart of pushed commits (walk->one and walk->twos) This fix should reset the walker properly.
* | Merge pull request #702 from arrbee/fix-status-fileVicent Martí2012-05-1619-330/+766
|\ \ | | | | | | Update git_status_file and add ranged iterators
| * | Document git_buf_common_prefixRussell Belfer2012-05-152-0/+4
| | | | | | | | | | | | | | | This function fills in a git_buf with the common prefix of an array of strings, but let's make that a little more clear.
| * | Fix notes to use new fixed iterator signatureRussell Belfer2012-05-151-1/+1
| | |
| * | Ranged iterators and rewritten git_status_fileRussell Belfer2012-05-1518-329/+761
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of this work is to rewrite git_status_file to use the same underlying code as git_status_foreach. This is done in 3 phases: 1. Extend iterators to allow ranged iteration with start and end prefixes for the range of file names to be covered. 2. Improve diff so that when there is a pathspec and there is a common non-wildcard prefix of the pathspec, it will use ranged iterators to minimize excess iteration. 3. Rewrite git_status_file to call git_status_foreach_ext with a pathspec that covers just the one file being checked. Since ranged iterators underlie the status & diff implementation, this is actually fairly efficient. The workdir iterator does end up loading the contents of all the directories down to the single file, which should ideally be avoided, but it is pretty good.
* | | Merge pull request #703 from carlosmn/consistencyVicent Martí2012-05-162-5/+17
|\ \ \ | |/ / |/| | A few indexer consistency checks
| * | indexer: add more consistency checksCarlos Martín Nieto2012-05-161-0/+11
| | | | | | | | | | | | | | | Error out in finalize if there is junk after the packfile hash or we couldn't process all the objects.
| * | Introduce GITERR_INDEXERCarlos Martín Nieto2012-05-152-5/+6
|/ /
* | Merge pull request #699 from nulltoken/fix/compilation-warningsVicent Martí2012-05-142-7/+5
|\ \ | | | | | | Fix compilation warnings
| * | Fix compilation warningsnulltoken2012-05-142-7/+5
|/ /
* | Merge pull request #696 from nulltoken/topic/notes-listVicent Martí2012-05-143-37/+252
|\ \ | | | | | | Add git_note_foreach()
| * | notes: add git_notes_foreach()nulltoken2012-05-143-37/+252
| | |
* | | Revert "Specifiy dllimport to MSVC if we're not building libgit2.dll"Vicent Martí2012-05-141-5/+1
|/ / | | | | | | This reverts commit 1093e2de22f6ca245b09d758a3510899a8362048.
* | Merge pull request #693 from nulltoken/topic/enhance_branch_move_test_coverageVicent Martí2012-05-141-0/+10
|\ \ | | | | | | branch: cover with test that moving a non existing branch returns ENOTFOUND
| * | branch: cover with test that moving a non existing branch returns ENOTFOUNDnulltoken2012-05-131-0/+10
| |/
* | Merge pull request #692 from nulltoken/fix/delete-branch_ENOTFOUNDVicent Martí2012-05-142-1/+16
|\ \ | | | | | | branch: make git_branch_delete() return GIT_ENOTFOUND when the branch doesn't exist
| * | branch: make git_branch_delete() return GIT_ENOTFOUND when the branch ↵nulltoken2012-05-132-1/+16
| |/ | | | | | | doesn't exist
* | Merge pull request #688 from hanwen/masterVicent Martí2012-05-1424-10/+505
|\ \ | | | | | | See issue https://github.com/libgit2/libgit2/issues/680
| * | Handle duplicate objects from different backends in git_odb_read_prefix().Han-Wen Nienhuys2012-05-1224-10/+505
| |/
* | Specifiy dllimport to MSVC if we're not building libgit2.dllSascha Cunz2012-05-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building a "shared object" (DLL) in Windows includes 2 steps: - specify __declspec(dllexport) when building the library itself. MSVC will disallow itself from optimizing these symbols out and reference them in the PE's Exports-Table. Further, a static link library will be generated. This library contains the symbols which are exported via the declsepc above. The __declspec(dllexport) becomes part of the symbol-signature (like parameter types in C++ are 'mangled' into the symbol name, the export specifier is mingled with the name) - specify __declspec(dllimport) when using the library. This again mingles the declspec into the name and declares the function / variable with external linkage. cmake automatically adds -Dgit2_EXPORTS to the compiler arguments when compiling the libgit2 project. The 'git2' is the name specified via PROJECT() in CMakeLists.txt.
* | Merge pull request #671 from nulltoken/topic/blob_create_fromdiskVicent Martí2012-05-143-16/+121
|\ \ | | | | | | Add git_blob_create_fromdisk()
| * | tests: make sure we clean up in objects/blob/write.cCarlos Martín Nieto2012-05-131-4/+5
| | |
| * | blob: Add git_blob_create_fromdisk()nulltoken2012-05-133-16/+120
| |/ | | | | | | This function will create blobs in the object database from files anywhere on the filesystem. This can be run against bare and non-bare repositories.
* | Merge pull request #681 from scottjg/solaris-fixesVicent Martí2012-05-149-14/+54
|\ \ | | | | | | Fix build/runtime issues on Solaris
| * | Add a test to verify FILENAME_MAXScott J. Goldman2012-05-131-0/+11
| | | | | | | | | | | | | | | | | | Since we now rely on it (at least under Solaris), I figured we probably want to make sure it's accurate. The new test makes sure that creating a file with a name of length FILENAME_MAX+1 fails.
| * | Fix readdir_r() usage for SolarisScott J. Goldman2012-05-122-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | On Solaris, struct dirent is defined differently than Linux. The field containing the path name is of size 0, rather than NAME_MAX. So, we need to use a properly sized buffer on Solaris to avoid a stack overflow. Also fix some DIR* leaks on cleanup.
| * | Fix comment typo in common.hScott J. Goldman2012-05-101-1/+1
| | |
| * | Fix rmdir() usage on SolarisScott J. Goldman2012-05-101-1/+1
| | | | | | | | | | | | | | | On Solaris, rmdir() throws EEXIST if the folder is not empty, so just add one more case to check for that, alongside ENOTEMPTY.