]> git.proxmox.com Git - libgit2.git/log
libgit2.git
9 years agoAdded git_stash_apply() and git_stash_pop() APIs
Pierre-Olivier Latour [Fri, 14 Nov 2014 03:32:47 +0000 (12:32 +0900)]
Added git_stash_apply() and git_stash_pop() APIs

9 years agoMerge pull request #3104 from whoisj/optimal-buffer-size
Carlos Martín Nieto [Sat, 9 May 2015 11:11:46 +0000 (13:11 +0200)]
Merge pull request #3104 from whoisj/optimal-buffer-size

Adjusting stream buffer size to 64KB

9 years agoAdjusting stream buffer size to 64KB
J Wyman [Thu, 7 May 2015 15:50:12 +0000 (08:50 -0700)]
Adjusting stream buffer size to 64KB

64K is optimal buffer size per https://technet.microsoft.com/en-us/library/cc938632.aspx

9 years agoMerge pull request #3086 from yongthecoder/master
Carlos Martín Nieto [Wed, 6 May 2015 16:39:39 +0000 (18:39 +0200)]
Merge pull request #3086 from yongthecoder/master

Android build doesn't need deps/regex

9 years agoMerge pull request #3100 from arthurschreiber/patch-5
Carlos Martín Nieto [Wed, 6 May 2015 05:37:49 +0000 (07:37 +0200)]
Merge pull request #3100 from arthurschreiber/patch-5

Ensure frameworks are mentioned in libgit2.pc

9 years agoEnsure frameworks are mentioned in libgit2.pc
Arthur Schreiber [Tue, 5 May 2015 20:36:24 +0000 (22:36 +0200)]
Ensure frameworks are mentioned in libgit2.pc

When building on Mac OS X, the `CoreFoundation` and `Security` frameworks where missing from `Libs.private` in the generated `libgit2.pc` file.

9 years agoconfig: plug a couple of leaks
Carlos Martín Nieto [Tue, 5 May 2015 07:47:16 +0000 (09:47 +0200)]
config: plug a couple of leaks

9 years agoAndroid build doesn't need deps/regex
Yong Li [Mon, 4 May 2015 13:41:34 +0000 (09:41 -0400)]
Android build doesn't need deps/regex

deps/regex was included in Android build because Android NDK 4 has
a packaging bug and doesn't have the regular expression functions defined
in its libc.so. The bug has been fixed in subsequent Android NDK releases.

If it is still necessary to work around the bug in Android NDK 4, we
should consider to use an option like ANDROID_NDK_RELEASE or
ANDROID_NDK_RELEASE_NUM.

9 years agoMerge pull request #3079 from ethomson/config
Carlos Martín Nieto [Mon, 4 May 2015 13:23:40 +0000 (15:23 +0200)]
Merge pull request #3079 from ethomson/config

Configuration changes for handling multiple of the same sections

9 years agoMerge pull request #3070 from ethomson/checkout_icase
Carlos Martín Nieto [Mon, 4 May 2015 12:59:08 +0000 (14:59 +0200)]
Merge pull request #3070 from ethomson/checkout_icase

Case insensitive checkout improvements

9 years agoconfig: test all multivars are updated
Edward Thomson [Mon, 4 May 2015 12:36:21 +0000 (07:36 -0500)]
config: test all multivars are updated

If a multivar exists within two sections (of the same name)
then they should both be updated in a `set_multivar`.  Ensure
that this is the case.

9 years agoconfig: use wildcard in test instead of empty expr
Edward Thomson [Mon, 27 Apr 2015 20:31:18 +0000 (16:31 -0400)]
config: use wildcard in test instead of empty expr

9 years agoconfig: cleanup some now-unused variables
Edward Thomson [Mon, 27 Apr 2015 20:29:00 +0000 (16:29 -0400)]
config: cleanup some now-unused variables

9 years agoconfig: lock the file for write before reading
Edward Thomson [Mon, 27 Apr 2015 19:38:44 +0000 (15:38 -0400)]
config: lock the file for write before reading

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.

9 years agoTest setting config var under duplicate header.
Ryan Roden-Corrent [Tue, 21 Apr 2015 19:57:20 +0000 (15:57 -0400)]
Test setting config var under duplicate header.

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.

9 years agoconfig: write existing lines as-is when rewriting
Edward Thomson [Mon, 27 Apr 2015 14:43:50 +0000 (10:43 -0400)]
config: write existing lines as-is when rewriting

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.

9 years agoconfig: examine whole file when writing
Edward Thomson [Thu, 23 Apr 2015 20:54:36 +0000 (16:54 -0400)]
config: examine whole file when writing

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.

9 years agoconfig: test overwriting cvar in multiple regions
Edward Thomson [Thu, 23 Apr 2015 16:00:05 +0000 (12:00 -0400)]
config: test overwriting cvar in multiple regions

9 years agoconfig: ensure we can write to an empty file
Edward Thomson [Tue, 21 Apr 2015 21:18:21 +0000 (17:18 -0400)]
config: ensure we can write to an empty file

9 years agocheckout test: better case-insensitive test on Mac
Edward Thomson [Thu, 23 Apr 2015 19:58:53 +0000 (15:58 -0400)]
checkout test: better case-insensitive test on Mac

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.

9 years agostatus test: always test the new file path
Edward Thomson [Tue, 31 Mar 2015 20:06:33 +0000 (16:06 -0400)]
status test: always test the new file path

9 years agocheckout test: only run icase on icase platform
Edward Thomson [Thu, 23 Apr 2015 13:21:33 +0000 (09:21 -0400)]
checkout test: only run icase on icase platform

9 years agocheckout: break case-changes into delete/add
Edward Thomson [Tue, 31 Mar 2015 20:29:35 +0000 (16:29 -0400)]
checkout: break case-changes into delete/add

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.

9 years agocheckout: remove blocking dir when FORCEd
Edward Thomson [Tue, 31 Mar 2015 20:28:13 +0000 (16:28 -0400)]
checkout: remove blocking dir when FORCEd

9 years agoRevert "Always checkout with case sensitive iterator"
Edward Thomson [Fri, 27 Mar 2015 19:39:28 +0000 (15:39 -0400)]
Revert "Always checkout with case sensitive iterator"

This reverts commit 40d791545abfb3cb71553a27dc64129e1a9bec28.

9 years agocheckout test: ensure we write to casechanged dir
Edward Thomson [Wed, 1 Apr 2015 19:23:37 +0000 (15:23 -0400)]
checkout test: ensure we write to casechanged dir

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').

9 years agocheckout test: ignore unstaged case-changing renames
Edward Thomson [Fri, 27 Mar 2015 19:33:44 +0000 (15:33 -0400)]
checkout test: ignore unstaged case-changing renames

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.

9 years agoMerge pull request #3087 from ethomson/pr/3054
Carlos Martín Nieto [Mon, 4 May 2015 09:16:52 +0000 (11:16 +0200)]
Merge pull request #3087 from ethomson/pr/3054

Performance Improvements to Status on Windows

9 years agoMerge pull request #3089 from volftomas/patch-2
Edward Thomson [Sat, 2 May 2015 14:51:24 +0000 (10:51 -0400)]
Merge pull request #3089 from volftomas/patch-2

Added call to git_libgit2_shutdown()

9 years agoRestructured to be nicer example
Tomas Paladin Volf [Sat, 2 May 2015 10:16:22 +0000 (12:16 +0200)]
Restructured to be nicer example

Code restructured to better represent best practice when
using libgit2.

9 years agoMerge pull request #3092 from techee/iconv_macports_fix2
Edward Thomson [Fri, 1 May 2015 21:30:51 +0000 (17:30 -0400)]
Merge pull request #3092 from techee/iconv_macports_fix2

Don't search iconv in /opt/local

9 years agoDon't search iconv in /opt/local
Jiří Techet [Fri, 1 May 2015 20:48:33 +0000 (22:48 +0200)]
Don't search iconv in /opt/local

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.

9 years agodiriter: actually use iconv on mac
Edward Thomson [Fri, 1 May 2015 15:27:44 +0000 (11:27 -0400)]
diriter: actually use iconv on mac

9 years agogit_buf_put_w: introduce utf16->utf8 conversion
Edward Thomson [Wed, 29 Apr 2015 22:12:51 +0000 (18:12 -0400)]
git_buf_put_w: introduce utf16->utf8 conversion

9 years agogit_path_diriter: use FindFirstFile in win32
Edward Thomson [Wed, 29 Apr 2015 21:23:02 +0000 (17:23 -0400)]
git_path_diriter: use FindFirstFile in win32

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.

9 years agogit_path_diriter: next shouldn't take path ptr
Edward Thomson [Wed, 29 Apr 2015 18:31:59 +0000 (14:31 -0400)]
git_path_diriter: next shouldn't take path ptr

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.

9 years agogit_path_dirload_with_stat: moved to fs_iterator
Edward Thomson [Wed, 29 Apr 2015 18:04:01 +0000 (14:04 -0400)]
git_path_dirload_with_stat: moved to fs_iterator

9 years agogit_path_dirload_with_stat: use git_path_diriter
Edward Thomson [Wed, 29 Apr 2015 17:28:29 +0000 (13:28 -0400)]
git_path_dirload_with_stat: use git_path_diriter

9 years agogit_win32_path_dirload_with_stat: removed
Edward Thomson [Wed, 29 Apr 2015 18:03:20 +0000 (14:03 -0400)]
git_win32_path_dirload_with_stat: removed

9 years agogit_path_dirload: use git_path_diriter
Edward Thomson [Wed, 29 Apr 2015 15:58:10 +0000 (11:58 -0400)]
git_path_dirload: use git_path_diriter

9 years agogit_path: introduce 'git_path_diriter'
Edward Thomson [Wed, 29 Apr 2015 15:05:27 +0000 (11:05 -0400)]
git_path: introduce 'git_path_diriter'

Introduce a new `git_path_diriter` that can iterate directories
efficiently for each platform.

9 years agoMerge pull request #3059 from libgit2/cmn/negotiation-notify
Edward Thomson [Fri, 1 May 2015 15:28:54 +0000 (11:28 -0400)]
Merge pull request #3059 from libgit2/cmn/negotiation-notify

[WIP/RFC] push: report the update plan to the caller

9 years agoMerge pull request #3081 from leoyanggit/build_warnings
Edward Thomson [Fri, 1 May 2015 13:01:34 +0000 (09:01 -0400)]
Merge pull request #3081 from leoyanggit/build_warnings

Fix some build warnings

9 years agoMerge pull request #3090 from libgit2/jamill/doc_update
Carlos Martín Nieto [Thu, 30 Apr 2015 19:55:10 +0000 (21:55 +0200)]
Merge pull request #3090 from libgit2/jamill/doc_update

Update documentation for API changes

9 years agoMerge pull request #3088 from volftomas/patch-1
Carlos Martín Nieto [Thu, 30 Apr 2015 19:25:54 +0000 (21:25 +0200)]
Merge pull request #3088 from volftomas/patch-1

Fixed unused warning in tests/rebase/merge.c

9 years agoUpdate documentation for API changes
Jameson Miller [Thu, 30 Apr 2015 14:57:13 +0000 (10:57 -0400)]
Update documentation for API changes

9 years agoAdded call to git_libgit2_shutdown()
Tomas Paladin Volf [Thu, 30 Apr 2015 13:10:28 +0000 (15:10 +0200)]
Added call to git_libgit2_shutdown()

Added forgotten call to git_libgit2_shutdown() to the /examples/network/git2.c.

9 years agoFixed unused warning in tests/rebase/merge.c
Tomas Paladin Volf [Thu, 30 Apr 2015 12:17:05 +0000 (14:17 +0200)]
Fixed unused warning in tests/rebase/merge.c

9 years agoMerge pull request #3085 from yongthecoder/regfree
Carlos Martín Nieto [Wed, 29 Apr 2015 20:08:46 +0000 (22:08 +0200)]
Merge pull request #3085 from yongthecoder/regfree

Do not call regfree() on an empty regex that is not successfully created...

9 years agoDo not call regfree() on an empty regex that is not successfully created by regcomp
Yong Li [Wed, 29 Apr 2015 17:40:42 +0000 (13:40 -0400)]
Do not call regfree() on an empty regex that is not successfully created by regcomp

(also removed an unused member "has_regex" from all_iter)

9 years agowin32: keep full path for realpath usage
Edward Thomson [Tue, 28 Apr 2015 20:39:47 +0000 (16:39 -0400)]
win32: keep full path for realpath usage

9 years agowin32: mimic git_path_dirload_with_stat closely
Edward Thomson [Tue, 28 Apr 2015 16:24:08 +0000 (12:24 -0400)]
win32: mimic git_path_dirload_with_stat closely

9 years agodirload: loop conditional; less path mangling
Edward Thomson [Tue, 28 Apr 2015 15:16:42 +0000 (11:16 -0400)]
dirload: loop conditional; less path mangling

9 years agowin32 dirload: don't heap allocate DIR structure
Edward Thomson [Mon, 27 Apr 2015 22:02:06 +0000 (18:02 -0400)]
win32 dirload: don't heap allocate DIR structure

9 years agowin32: abstract file attributes -> struct stat fn
Edward Thomson [Mon, 27 Apr 2015 21:47:51 +0000 (17:47 -0400)]
win32: abstract file attributes -> struct stat fn

9 years agoImprovements to status performance on Windows.
J Wyman [Thu, 26 Mar 2015 22:10:24 +0000 (18:10 -0400)]
Improvements to status performance on Windows.

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).

9 years agoImprovements to ignore performance on Windows.
J Wyman [Mon, 30 Mar 2015 21:07:44 +0000 (14:07 -0700)]
Improvements to ignore performance on Windows.

Minimizing the number directory and file opens, minimizes the amount of IO thus reducing the overall cost of performing ignore operations.

9 years agoFix some build warnings
Leo Yang [Tue, 28 Apr 2015 16:40:20 +0000 (12:40 -0400)]
Fix some build warnings

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.

9 years agoMerge pull request #3071 from linquize/git_reflog_drop
Edward Thomson [Fri, 24 Apr 2015 16:00:51 +0000 (12:00 -0400)]
Merge pull request #3071 from linquize/git_reflog_drop

Fix wrong format string in git_reflog_drop() error message

9 years agoFix wrong format string in git_reflog_drop() error message
Linquize [Fri, 24 Apr 2015 15:56:59 +0000 (23:56 +0800)]
Fix wrong format string in git_reflog_drop() error message

9 years agoMerge pull request #3063 from ethomson/config_validate_name
Carlos Martín Nieto [Fri, 24 Apr 2015 00:46:49 +0000 (02:46 +0200)]
Merge pull request #3063 from ethomson/config_validate_name

Validate configuration keys

9 years agoMerge pull request #2997 from libgit2/cmn/secure-transport
Edward Thomson [Thu, 23 Apr 2015 19:24:05 +0000 (15:24 -0400)]
Merge pull request #2997 from libgit2/cmn/secure-transport

Use SecureTransport on OS X

9 years agoSecureTransport: handle graceful closes
Carlos Martín Nieto [Mon, 13 Apr 2015 13:39:58 +0000 (15:39 +0200)]
SecureTransport: handle graceful closes

On close, we might get a return code which looks like an error but just
means that the other side closed gracefully. Handle that.

9 years agoSecureTransport: require TLS v1.x
Carlos Martín Nieto [Tue, 24 Mar 2015 15:31:51 +0000 (16:31 +0100)]
SecureTransport: require TLS v1.x

Anything SSL is deprecated. Let's make sure we don't try to use SSL v3
when talking to the server.

9 years agoUpdate THREADING and CHANGELOG with SecureTransport details
Carlos Martín Nieto [Thu, 19 Mar 2015 13:26:07 +0000 (14:26 +0100)]
Update THREADING and CHANGELOG with SecureTransport details

9 years agoSecureTransport: allow overriding a bad certificate
Carlos Martín Nieto [Thu, 19 Mar 2015 09:51:48 +0000 (10:51 +0100)]
SecureTransport: allow overriding a bad certificate

Do not automatically fail on a bad certificate, but let the caller
decide. This means we don't need our switch on errors anymore but can
return a string representation from the security framework.

9 years agoRename GIT_SSL to GIT_OPENSSL
Carlos Martín Nieto [Thu, 19 Mar 2015 08:55:20 +0000 (09:55 +0100)]
Rename GIT_SSL to GIT_OPENSSL

This is what it's meant all along, but now we actually have multiple
implementations, it's clearer to use the name of the library.

9 years agoSilence unused warnings when not using OpenSSL
Carlos Martín Nieto [Wed, 18 Mar 2015 23:45:43 +0000 (00:45 +0100)]
Silence unused warnings when not using OpenSSL

9 years agoAbstract away the TLS stream implementation
Carlos Martín Nieto [Wed, 18 Mar 2015 23:18:03 +0000 (00:18 +0100)]
Abstract away the TLS stream implementation

Instead, provide git_tls_stream_new() to ask for the most appropriate
encrypted stream and use it in our HTTP transport.

9 years agoAdd a SecureTransport TLS channel
Carlos Martín Nieto [Sun, 2 Nov 2014 12:23:32 +0000 (13:23 +0100)]
Add a SecureTransport TLS channel

As an alternative to OpenSSL when we're on OS X. This one can actually
take advantage of stacking the streams.

9 years agoconfig: peek returns '\n' on EOF; handle in write
Edward Thomson [Tue, 21 Apr 2015 21:18:35 +0000 (17:18 -0400)]
config: peek returns '\n' on EOF; handle in write

9 years agoconfig: ensure we can write to an empty file
Edward Thomson [Tue, 21 Apr 2015 21:18:21 +0000 (17:18 -0400)]
config: ensure we can write to an empty file

9 years agoconfig: validate config keys
Edward Thomson [Tue, 21 Apr 2015 16:52:29 +0000 (12:52 -0400)]
config: validate config keys

9 years agoconfig: test that we validate the key
Edward Thomson [Tue, 21 Apr 2015 16:49:57 +0000 (12:49 -0400)]
config: test that we validate the key

9 years agoMerge pull request #3064 from rcorre/config-write-fix
Carlos Martín Nieto [Thu, 23 Apr 2015 15:23:04 +0000 (17:23 +0200)]
Merge pull request #3064 from rcorre/config-write-fix

config_write -- handle duplicate section headers when deleting entries

9 years agoMerge branch 'attr-ignore'
Carlos Martín Nieto [Thu, 23 Apr 2015 15:08:10 +0000 (17:08 +0200)]
Merge branch 'attr-ignore'

9 years agoattr_file: fix subdirectory attr case.
Mike McQuaid [Sat, 18 Apr 2015 01:27:28 +0000 (18:27 -0700)]
attr_file: fix subdirectory attr case.

Closes #2966.

9 years agoAdd failing subdirectory gitignore attr test.
Mike McQuaid [Sat, 28 Mar 2015 18:37:15 +0000 (18:37 +0000)]
Add failing subdirectory gitignore attr test.

9 years agoMerge pull request #3032 from jfultz/index-file-modes
Edward Thomson [Thu, 23 Apr 2015 14:54:08 +0000 (10:54 -0400)]
Merge pull request #3032 from jfultz/index-file-modes

Fix git_checkout_tree() to do index filemodes correctly on Windows.

9 years agoMerge pull request #3065 from cthomas/master
Carlos Martín Nieto [Wed, 22 Apr 2015 14:16:27 +0000 (16:16 +0200)]
Merge pull request #3065 from cthomas/master

Fix for Issue #3023 tests fail with no network

9 years agoFix for Issue #3023 tests fail with no network
cthomas [Wed, 22 Apr 2015 00:02:24 +0000 (20:02 -0400)]
Fix for Issue #3023 tests fail with no network

Moved offending tests from network to online so they will get skipped
when there is a lack of network connectivity:
-test_online_remotes__single_branch
-test_online_remotes__restricted_refspecs

9 years agoMerge pull request #3051 from jeffhostetler/jeffhostetler/memleak_windows_tls_data
Edward Thomson [Tue, 21 Apr 2015 22:21:59 +0000 (18:21 -0400)]
Merge pull request #3051 from jeffhostetler/jeffhostetler/memleak_windows_tls_data

Attempt to fix Windows TLS memory leak.

9 years agogit_config_delete: search until last section.
Ryan Roden-Corrent [Thu, 16 Apr 2015 19:32:16 +0000 (15:32 -0400)]
git_config_delete: search until last section.

If git_config_delete is to work properly in the presence of duplicate section
headers, it cannot stop searching at the end of the first matching section, as
there may be another matching section later.
When config_write is used for deletion (value = NULL), it may only terminate
when the desired key is found or there are no sections left to parse.

9 years agoSpecify mock config file content in test.
Ryan Roden-Corrent [Thu, 16 Apr 2015 19:20:33 +0000 (15:20 -0400)]
Specify mock config file content in test.

Instead of using a config file in resources, include the config file content to
be tested directly in the test.

9 years agoUnittest to validate config entry deletion bug.
Ryan Roden-Corrent [Thu, 16 Apr 2015 14:53:22 +0000 (10:53 -0400)]
Unittest to validate config entry deletion bug.

Add a unittest to validate bug #3043, where a duplicate empty config header
could cause deletion of a config entry to fail silently. The bug is currently
unresolved and this test will fail.

9 years agoMerge pull request #2992 from ethomson/rebase_fixes
Carlos Martín Nieto [Tue, 21 Apr 2015 12:38:23 +0000 (14:38 +0200)]
Merge pull request #2992 from ethomson/rebase_fixes

Rebase fixes

9 years agoMerge pull request #3060 from ethomson/2851
Carlos Martín Nieto [Tue, 21 Apr 2015 12:04:45 +0000 (14:04 +0200)]
Merge pull request #3060 from ethomson/2851

Handle invalid multiline configuration

9 years agoFix index-adding functions to know when to trust filemodes.
John Fultz [Tue, 21 Apr 2015 04:41:04 +0000 (23:41 -0500)]
Fix index-adding functions to know when to trust filemodes.

The idea...sometimes, a filemode is user-specified via an
explicit git_index_entry.  In this case, believe the user, always.

Sometimes, it is instead built up by statting the file system.  In
those cases, go with the existing logic we have to determine
whether the file system supports all filemodes and symlinks, and
make the best guess.

On file systems which have full filemode and symlink support, this
commit should make no difference.  On others (most notably Windows),
this will fix problems things like:
* git_index_add and git_index_add_frombuffer() should be believed.
* As a consequence, git_checkout_tree should make the filemodes in
the index match the ones in the tree.
* And diffs with GIT_DIFF_UPDATE_INDEX don't write the wrong filemodes.
* And merges, and probably other downstream stuff now fixed, too.

This makes my previous changes to checkout.c unnecessary,
so they are now reverted.

Also, added a test for index_entry permissions from git_index_add
and git_index_add_frombuffer, both of which failed before these changes.

9 years agorebase: correct documentation, CHANGELOG
Edward Thomson [Mon, 20 Apr 2015 21:22:39 +0000 (17:22 -0400)]
rebase: correct documentation, CHANGELOG

9 years agorebase: include checkout opts within rebase opts
Edward Thomson [Mon, 20 Apr 2015 21:19:08 +0000 (17:19 -0400)]
rebase: include checkout opts within rebase opts

9 years agorebase: test checkout options for rebase
Edward Thomson [Tue, 17 Mar 2015 21:21:11 +0000 (17:21 -0400)]
rebase: test checkout options for rebase

9 years agorebase: init and open take a rebase_options
Edward Thomson [Tue, 17 Mar 2015 19:53:04 +0000 (15:53 -0400)]
rebase: init and open take a rebase_options

`git_rebase_init` and `git_rebase_open` should take a
`git_rebase_options` and use it for future rebase operations on
that `rebase` object.

9 years agorebase: take `checkout_options` where appropriate
Edward Thomson [Tue, 17 Mar 2015 15:47:16 +0000 (11:47 -0400)]
rebase: take `checkout_options` where appropriate

9 years agoreset: `git_checkout_options` is `const`
Edward Thomson [Tue, 17 Mar 2015 15:46:55 +0000 (11:46 -0400)]
reset: `git_checkout_options` is `const`

9 years agorebase: block rebase_commit with unstaged changes
Edward Thomson [Tue, 17 Mar 2015 21:53:07 +0000 (17:53 -0400)]
rebase: block rebase_commit with unstaged changes

9 years agorebase: commit should return GIT_EUNMERGED
Edward Thomson [Tue, 17 Mar 2015 21:45:31 +0000 (17:45 -0400)]
rebase: commit should return GIT_EUNMERGED

git_rebase_commit should return `GIT_EUNMERGED` when unmerged items
exist in the index, per the documentation.  Test that this is correct.

9 years agorebase: identify a rebase that has not started
Edward Thomson [Tue, 17 Mar 2015 14:04:08 +0000 (10:04 -0400)]
rebase: identify a rebase that has not started

In `git_rebase_operation_current()`, indicate when a rebase has not
started (with `GIT_REBASE_NO_OPERATION`) rather than conflating that
with the first operation being in-progress.

9 years agoconfig_file: comment char can be invalid escape
Edward Thomson [Mon, 20 Apr 2015 04:22:20 +0000 (00:22 -0400)]
config_file: comment char can be invalid escape

Don't assume that comment chars are comment chars, they may be (an
attempt to be escaped).  If so, \; is not a valid escape sequence,
complain.

9 years agoconfig_file: parse multilines generously
Edward Thomson [Mon, 20 Apr 2015 03:55:02 +0000 (23:55 -0400)]
config_file: parse multilines generously

Combine unquoting and multiline detection to avoid ambiguity when
parsing.

9 years agoMerge pull request #3024 from git-up/diff_merge_fix
Edward Thomson [Sun, 19 Apr 2015 23:58:03 +0000 (19:58 -0400)]
Merge pull request #3024 from git-up/diff_merge_fix

Make sure to also update delta->nfiles when merging diffs