summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | config: cleanup some now-unused variablesEdward Thomson2015-05-042-9/+16
| | | |
| * | | config: lock the file for write before readingEdward Thomson2015-05-041-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When writing a configuration file, we want to take a lock on the new file (eg, `config.lock`) before opening the configuration file (`config`) for reading so that we can prevent somebody from changing the contents underneath us.
| * | | Test setting config var under duplicate header.Ryan Roden-Corrent2015-05-041-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a test that exposes a bug in config_write. It is valid to have multiple separate headers for the same config section, but config_write will exit after finding the first matching section in certain situations. This test proves that config_write will duplicate a variable that already exists instead of overwriting it if the variable is defined under a duplicate section header.
| * | | config: write existing lines as-is when rewritingEdward Thomson2015-05-041-28/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When updating a configuration file, we want to copy the old data from the file to preserve comments and funny whitespace, instead of writing it in some "canonical" format. Thus, we keep a pointer to the start of the line and the line length to preserve these things we don't care to rewrite.
| * | | config: examine whole file when writingEdward Thomson2015-05-042-396/+421
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we would try to be clever when writing the configuration file and try to stop parsing (and simply copy the rest of the old file) when we either found the value we were trying to write, or when we left the section that value was in, the assumption being that there was no more work to do. Regrettably, you can have another section with the same name later in the file, and we must cope with that gracefully, thus we read the whole file in order to write a new file. Now, writing a file looks even more than reading. Pull the config parsing out into its own function that can be used by both reading and writing the configuration.
| * | | config: test overwriting cvar in multiple regionsEdward Thomson2015-05-041-0/+36
| | | |
| * | | config: ensure we can write to an empty fileEdward Thomson2015-05-041-0/+72
| | | |
* | | | Merge pull request #3070 from ethomson/checkout_icaseCarlos Martín Nieto2015-05-046-25/+253
|\ \ \ \ | |/ / / |/| | | Case insensitive checkout improvements
| * | | checkout test: better case-insensitive test on MacEdward Thomson2015-05-041-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Mac OS, `realpath` is deficient in determining the actual filename on-disk as it will simply provide the string you gave it if that file exists, instead of returning the filename as it exists. Instead we must read the directory entries for the parent directory to get the canonical filename.
| * | | status test: always test the new file pathEdward Thomson2015-05-041-8/+12
| | | |
| * | | checkout test: only run icase on icase platformEdward Thomson2015-05-042-79/+61
| | | |
| * | | checkout: break case-changes into delete/addEdward Thomson2015-05-043-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When checking out with a case-insensitive working directory, we want to change the case of items in the working directory to reflect changes that occured in the checkout target. Diff now has an option to break case-changing renames into delete/add.
| * | | checkout: remove blocking dir when FORCEdEdward Thomson2015-05-042-10/+117
| | | |
| * | | Revert "Always checkout with case sensitive iterator"Edward Thomson2015-05-042-3/+14
| | | | | | | | | | | | | | | | This reverts commit 40d791545abfb3cb71553a27dc64129e1a9bec28.
| * | | checkout test: ensure we write to casechanged dirEdward Thomson2015-05-041-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | Ensure that on a case insensitive filesystem that we can checkout into some folder 'FOLDER' that exists on disk, even if the target of the checkout is a different case (eg 'folder').
| * | | checkout test: ignore unstaged case-changing renamesEdward Thomson2015-05-041-0/+22
|/ / / | | | | | | | | | | | | | | | | | | | | | On Windows, you might sloppily rewrite a file (or have a sloppy text editor that does it for you) and accidentally change its case. (eg, "README" -> "readme"). Git ignores this accidental case changing rename during checkout and will happily write the new content to the file despite the name change. We should, too.
* | | Merge pull request #3087 from ethomson/pr/3054Carlos Martín Nieto2015-05-0422-358/+852
|\ \ \ | | | | | | | | Performance Improvements to Status on Windows
| * | | diriter: actually use iconv on macEdward Thomson2015-05-012-86/+94
| | | |
| * | | git_buf_put_w: introduce utf16->utf8 conversionEdward Thomson2015-05-015-27/+81
| | | |
| * | | git_path_diriter: use FindFirstFile in win32Edward Thomson2015-05-014-8/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Using FindFirstFile and FindNextFile in win32 allows us to use the directory information that is returned, instead of us having to get the file attributes all over again, which is a distinct cost savings on win32.
| * | | git_path_diriter: next shouldn't take path ptrEdward Thomson2015-05-014-23/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The _next method shouldn't take a path pointer (and a path_len pointer) as 100% of current users use the full path and ignore the filename. Plus let's add some docs and a unit test.
| * | | git_path_dirload_with_stat: moved to fs_iteratorEdward Thomson2015-05-013-170/+116
| | | |
| * | | git_path_dirload_with_stat: use git_path_diriterEdward Thomson2015-05-011-123/+51
| | | |
| * | | git_win32_path_dirload_with_stat: removedEdward Thomson2015-05-013-209/+1
| | | |
| * | | git_path_dirload: use git_path_diriterEdward Thomson2015-05-013-83/+116
| | | |
| * | | git_path: introduce 'git_path_diriter'Edward Thomson2015-05-014-1/+163
| | | | | | | | | | | | | | | | | | | | Introduce a new `git_path_diriter` that can iterate directories efficiently for each platform.
| * | | win32: keep full path for realpath usageEdward Thomson2015-04-281-8/+34
| | | |
| * | | win32: mimic git_path_dirload_with_stat closelyEdward Thomson2015-04-281-40/+28
| | | |
| * | | dirload: loop conditional; less path manglingEdward Thomson2015-04-281-59/+102
| | | |
| * | | win32 dirload: don't heap allocate DIR structureEdward Thomson2015-04-281-22/+18
| | | |
| * | | win32: abstract file attributes -> struct stat fnEdward Thomson2015-04-284-80/+81
| | | |
| * | | Improvements to status performance on Windows.J Wyman2015-04-285-87/+281
| | | | | | | | | | | | | | | | Changed win32/path_w32.c to utilize NTFS' FindFirst..FindNext data instead of doing an lstat per file. Avoiding unnecessary directory opens and file scans reduces IO, improving overall performance. Effect is magnified due to NTFS being a kernel mode file system (as opposed to user mode).
| * | | Improvements to ignore performance on Windows.J Wyman2015-04-287-18/+45
| | |/ | |/| | | | | | | Minimizing the number directory and file opens, minimizes the amount of IO thus reducing the overall cost of performing ignore operations.
* | | Merge pull request #3089 from volftomas/patch-2Edward Thomson2015-05-021-5/+12
|\ \ \ | | | | | | | | Added call to git_libgit2_shutdown()
| * | | Restructured to be nicer exampleTomas Paladin Volf2015-05-021-9/+14
| | | | | | | | | | | | | | | | | | | | Code restructured to better represent best practice when using libgit2.
| * | | Added call to git_libgit2_shutdown()Tomas Paladin Volf2015-04-301-2/+4
| | |/ | |/| | | | Added forgotten call to git_libgit2_shutdown() to the /examples/network/git2.c.
* | | Merge pull request #3092 from techee/iconv_macports_fix2Edward Thomson2015-05-011-3/+0
|\ \ \ | | | | | | | | Don't search iconv in /opt/local
| * | | Don't search iconv in /opt/localJiří Techet2015-05-011-3/+0
|/ / / | | | | | | | | | | | | | | | | | | Since OpenSSL isn't used any more on OS X, there is no dependency on any MacPorts library under /opt/local and there is no danger of conflicts between MacPorts and system iconv. For this reason the system iconv can always be used now.
* | | Merge pull request #3059 from libgit2/cmn/negotiation-notifyEdward Thomson2015-05-017-7/+91
|\ \ \ | | | | | | | | [WIP/RFC] push: report the update plan to the caller
| * | | push: report the update plan to the callercmn/negotiation-notifyCarlos Martín Nieto2015-04-197-7/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be useful for the caller to know which update commands will be sent to the server before the packfile is pushed up. git does this via the pre-push hook. We don't have hooks, but as it adds introspection into what is happening, we can add a callback which performs the same function.
* | | | Merge pull request #3081 from leoyanggit/build_warningsEdward Thomson2015-05-013-8/+8
|\ \ \ \ | | | | | | | | | | Fix some build warnings
| * | | | Fix some build warningsLeo Yang2015-04-283-8/+8
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In checkout.c and filter.c we were casting a sub struct to a parent struct which breaks the strict aliasing rules in C. However we can use .parent or .base to access the parent struct to avoid the build warnings. In remote.c the local variable error was not initialized or updated in some cases. For unintialized error a build warning will be generated. So always keep error variable up-to-date.
* | | | Merge pull request #3090 from libgit2/jamill/doc_updateCarlos Martín Nieto2015-04-302-1/+4
|\ \ \ \ | | | | | | | | | | Update documentation for API changes
| * | | | Update documentation for API changesjamill/doc_updateJameson Miller2015-04-302-1/+4
| | |_|/ | |/| |
* | | | Merge pull request #3088 from volftomas/patch-1Carlos Martín Nieto2015-04-301-0/+5
|\ \ \ \ | |/ / / |/| | | Fixed unused warning in tests/rebase/merge.c
| * | | Fixed unused warning in tests/rebase/merge.cTomas Paladin Volf2015-04-301-0/+5
|/ / /
* | | Merge pull request #3085 from yongthecoder/regfreeCarlos Martín Nieto2015-04-291-3/+2
|\ \ \ | |/ / |/| | Do not call regfree() on an empty regex that is not successfully created...
| * | Do not call regfree() on an empty regex that is not successfully created by ↵Yong Li2015-04-291-3/+2
|/ / | | | | | | | | | | regcomp (also removed an unused member "has_regex" from all_iter)
* | Merge pull request #3071 from linquize/git_reflog_dropEdward Thomson2015-04-241-1/+1
|\ \ | | | | | | Fix wrong format string in git_reflog_drop() error message
| * | Fix wrong format string in git_reflog_drop() error messageLinquize2015-04-241-1/+1
| | |