summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* submodule: plug a few leakscmn/plug-smCarlos Martín Nieto2015-09-241-13/+21
|
* Merge pull request #3434 from ethomson/reservednamesCarlos Martín Nieto2015-09-2124-4/+89
|\ | | | | Win32 Reserved names: don't reserve names outside the working directory
| * repository: only reserve repo dirs in the workdirEdward Thomson2015-09-181-4/+20
| | | | | | | | | | | | | | | | | | | | Check that the repository directory is beneath the workdir before adding it to the list of reserved paths. If it is not, then there is no possibility of checking out files into it, and it should not be a reserved word. This is a particular problem with submodules where the repo directory may be in the super's .git directory.
| * repo::reservedname: test a submodule updateEdward Thomson2015-09-1823-0/+69
| | | | | | | | | | | | | | Test an initial submodule update, where we are trying to checkout the submodule for the first time, and placing a file within the submodule working directory with the same name as the submodule (and consequently, the same name as the repository itself).
* | Merge pull request #3433 from libgit2/cmn/config-commentEdward Thomson2015-09-182-7/+43
|\ \ | | | | | | Keep config comments in the same place as git
| * | config: buffer comments to match git's variable-addingcmn/config-commentCarlos Martín Nieto2015-09-181-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | When there is a comment at the end of a section, git keeps it there, while we write the new variable right at the end. Keep comments buffered and dump them when we're going to output a variable or section, or reach EOF. This puts us in line with the config files which git produces.
| * | config: test that comments are left as with gitLinquize2015-09-181-3/+8
|/ /
* | Fix a couple of warningsCarlos Martín Nieto2015-09-182-2/+1
| |
* | Merge pull request #3418 from DimStar77/masterCarlos Martín Nieto2015-09-182-2/+20
|\ \ | | | | | | pkg-config: fix directory references in libgit2.pc
| * | pkg-config: fix directory references in libgit2.pcDominique Leuenberger2015-09-182-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: libdir=/usr//usr/lib64 includedir=/usr//usr/include After: libdir=/usr/lib64 includedir=/usr/include (note the duplication of /usr in the before case)
* | | Merge pull request #3432 from ethomson/mkdirCarlos Martín Nieto2015-09-1725-172/+365
|\ \ \ | |_|/ |/| | `mkdir`: split into `mkdir` and `mkdir_relative`
| * | `mkdir`: cope with root path on win32Edward Thomson2015-09-172-4/+5
| | |
| * | win32: return EACCES in `p_lstat`Edward Thomson2015-09-171-2/+9
| | | | | | | | | | | | | | | | | | Don't coalesce all errors into ENOENT. At least identify EACCES. All callers should be handling this case already, as the POSIX `lstat` will return this.
| * | mkdir: chmod existing paths with `GIT_MKDIR_CHMOD`Edward Thomson2015-09-171-42/+49
| | |
| * | mkdir: find component paths for mkdir_relativeEdward Thomson2015-09-172-51/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `git_futils_mkdir` does not blindly call `git_futils_mkdir_relative`. `git_futils_mkdir_relative` is used when you have some base directory and want to create some path inside of it, potentially removing blocking symlinks and files in the process. This is not suitable for a general recursive mkdir within the filesystem. Instead, when `mkdir` is being recursive, locate the first existent parent directory and use that as the base for `mkdir_relative`.
| * | core::mkdir tests: ensure we don't stomp symlinks in mkdirEdward Thomson2015-09-173-0/+51
| | | | | | | | | | | | | | | In `mkdir` and `mkdir_r`, ensure that we don't try to remove symlinks that are in our way.
| * | core::mkdir tests: include absolute mkdirsEdward Thomson2015-09-171-0/+35
| | |
| * | git_futils_mkdir_*: make a relative-to-base mkdirEdward Thomson2015-09-1722-104/+105
|/ / | | | | | | | | | | | | | | | | | | | | | | Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter assumes that we own everything beneath the base, as if it were being called with a base of the repository or working directory, and is tailored towards checkout and ensuring that there is no bogosity beneath the base that must be cleaned up. This is (at best) slow and (at worst) unsafe in the larger context of a filesystem where we do not own things and cannot do things like unlink symlinks that are in our way.
* | Merge pull request #3429 from ethomson/checkout_chmodCarlos Martín Nieto2015-09-162-12/+87
|\ \ | | | | | | Checkout: handle mode changes
| * | checkout: overwrite files with differing modesEdward Thomson2015-09-162-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a file exists on disk and we're checking out a file that differs in executableness, remove the old file. This allows us to recreate the new file with p_open, which will take the new mode into account and handle setting the umask properly. Remove any notion of chmod'ing existing files, since it is now handled by the aforementioned removal and was incorrect, as it did not take umask into account.
| * | checkout::tree tests: don't use hardcoded modeEdward Thomson2015-09-161-8/+8
| | |
| * | checkout::tree tests: don't use static bufferEdward Thomson2015-09-161-6/+9
| | |
| * | Check that checkout preserves filemode in working directory.Matti Virolainen2015-09-161-0/+63
| | |
| * | Check that an executable in index is not an executable after checkout.Matti Virolainen2015-09-161-0/+11
|/ /
* | Merge pull request #3428 from ethomson/clone_test_bufferEdward Thomson2015-09-142-3/+8
|\ \ | | | | | | Clone test buffer
| * | cl_git_path_url: assert sane static buffer sizeEdward Thomson2015-09-141-0/+2
| | |
| * | clone::nonetwork: don't use fixed size bufferEdward Thomson2015-09-141-3/+6
|/ /
* | Merge pull request #3425 from ethomson/diriter_rootCarlos Martín Nieto2015-09-132-2/+39
|\ \ | | | | | | Handle `git_path_diriter` instances at the drive root on Windows
| * | diriter: don't double '/' on posixEdward Thomson2015-09-131-1/+5
| | | | | | | | | | | | | | | | | | The canonical directory path of the root directory of a volume on POSIX already ends in a slash (eg, `/`). This is true only at the root. Do not add a slash to paths in this case.
| * | diriter: don't double '/' on WindowsEdward Thomson2015-09-131-1/+5
| | | | | | | | | | | | | | | | | | The canonical directory path of the root directory of a volume on windows already ends in a slash (eg, `c:/`). This is true only at the volume root. Do not add a slash to paths in this case.
| * | diriter: test we can iterate rootEdward Thomson2015-09-131-0/+29
| | | | | | | | | | | | | | | | | | Ensure that we can iterate the filesystem root and that paths come back well-formed, not with an additional '/'. (eg, when iterating `c:/`, expect that we do not get some path like `c://autoexec.bat`).
* | | Merge pull request #3426 from ethomson/fs_iteratorCarlos Martín Nieto2015-09-131-35/+50
|\ \ \ | | | | | | | | iterator: loop fs_iterator advance (don't recurse)
| * | | iterator: loop fs_iterator advance (don't recurse)Edward Thomson2015-09-131-35/+50
|/ / /
* | | Merge pull request #3423 from libgit2/cmn/push-tests-inline-oidCarlos Martín Nieto2015-09-133-11/+6
|\ \ \ | | | | | | | | push: put the git_oid inline in the test structure
| * | | push: put the git_oid inline in the test structurecmn/push-tests-inline-oidCarlos Martín Nieto2015-09-133-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | These are small pieces of data, so there is no advantage to allocating them separately. Include the two ids inline in the struct we use to check that the expected and actual ids match.
* | | | Merge pull request #3420 from ethomson/iteratorCarlos Martín Nieto2015-09-131-42/+56
|\ \ \ \ | |_|/ / |/| | | iterator: advance the tree iterator smartly
| * | | iterator: advance the tree iterator smartlyEdward Thomson2015-09-111-42/+56
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While advancing the tree iterator, if we advance over things that we aren't interested in, then call `current`. Which may *itself* call advance. While advancing the tree iterator, if we advance over things that we aren't interested in, then call `current`. Which may *itself* call advance. While advancing the tree iterator, if we advance over things that we aren't interested in, then call `current`. Which may *itself* call advance. While advancing the tree iterator, if we advance over things that we aren't interested in, then call `current`. Which may *itself* call advance. While advancing the tree iterator, if we advance over things that we aren't interested in, then call `current`. Which may *itself* call advance. Error: stack overflow.
* | | Merge pull request #3424 from ↵Carlos Martín Nieto2015-09-132-1/+10
|\ \ \ | | | | | | | | | | | | | | | | arthurschreiber/arthur/transaction-dont-free-config Don't free config in `git_transaction_commit`.
| * | | Don't free config in `git_transaction_commit`.Arthur Schreiber2015-09-132-1/+10
|/ / / | | | | | | | | | The config is not owned by the transaction, so please don’t free it.
* | | Merge branch 'cmn/ignore-dir-check'Carlos Martín Nieto2015-09-132-7/+26
|\ \ \
| * | | ignore: add test and adjust style and comment for dir with wildmatchCarlos Martín Nieto2015-09-132-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | The previous commit left the comment referencing the earlier state of the code, change it to explain the current logic. While here, change the logic to avoid repeating the copy of the base pattern.
| * | | Fix 'If we're dealing with a directory' checkVsevolod Parfenov2015-08-241-1/+1
| | | |
* | | | Merge pull request #3370 from libgit2/cmn/submodule-refactorCarlos Martín Nieto2015-09-132-144/+274
|\ \ \ \ | |_|_|/ |/| | | submodule: refactor to be more explicit in the search
| * | | submodule: add a test for a renamed submdoule dircmn/submodule-refactorCarlos Martín Nieto2015-09-101-0/+55
| | | |
| * | | submodule: refactor to be more explicit in the searchCarlos Martín Nieto2015-09-101-144/+219
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | When searching for information about a submdoule, let's be more explicit in what we expect to find. We currently insert a submodule into the map and change certain parameters when the config callback gets called. Switch to asking for the configuration we're interested in, rather than taking it in an arbitrary order.
* | | Merge pull request #3422 from ethomson/workdir_diffCarlos Martín Nieto2015-09-122-8/+60
|\ \ \ | | | | | | | | diff: examine pathlist on non-files
| * | | diff: check pathspec on non-filesEdward Thomson2015-09-121-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we're not doing pathspec matching, we let the iterator handle file matching for us. However, we can only trust the iterator to return *files* that match the pattern, because the iterator must return directories that are not strictly in the pathlist, but that are the parents of files that match the pattern, so that diff can later recurse into them. Thus, diff must examine non-files explicitly before including them in the delta list.
| * | | diff::workdir: ensure ignored files are not returnedEdward Thomson2015-09-121-0/+43
|/ / / | | | | | | | | | | | | Ensure that a diff with the workdir is not erroneously returning directories.
* | | Merge pull request #3421 from ethomson/mempack-fixCarlos Martín Nieto2015-09-122-2/+8
|\ \ \ | |/ / |/| | Mempack fix
| * | mempack: expose clear functionEdward Thomson2015-09-112-4/+3
| | |