]> git.proxmox.com Git - libgit2.git/log
libgit2.git
11 years agoTest submodules with empty index or orphaned head
Russell Belfer [Fri, 28 Jun 2013 05:29:05 +0000 (22:29 -0700)]
Test submodules with empty index or orphaned head

In both of these cases, the submodule data should still be loaded
just (obviously) without the data that comes from either the index
or the HEAD.

This fixes a bug in the orphaned head case.

11 years agoMerge pull request #1678 from arthurschreiber/unbreak-local-ls-after-disconnect
Russell Belfer [Tue, 25 Jun 2013 17:42:38 +0000 (10:42 -0700)]
Merge pull request #1678 from arthurschreiber/unbreak-local-ls-after-disconnect

Unbreak git_remote_ls on a local transport after disconnecting.

11 years agoMerge pull request #1680 from csware/win32-junction
Russell Belfer [Tue, 25 Jun 2013 16:40:10 +0000 (09:40 -0700)]
Merge pull request #1680 from csware/win32-junction

Correctly handle win32 junctions

11 years agoCorrectly handle junctions
Sven Strickroth [Tue, 25 Jun 2013 14:46:06 +0000 (16:46 +0200)]
Correctly handle junctions

A junction has S_IFDIR | S_IFLNK set, however, only one makes sense.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
11 years agoRevert "Work around reparse point stat issues"
Sven Strickroth [Tue, 25 Jun 2013 14:43:15 +0000 (16:43 +0200)]
Revert "Work around reparse point stat issues"

This reverts commit 32c12ea6a9cafd76a746af2e2be9366c95752f5b.

11 years agoMake sure we don't leak memory again.
Arthur Schreiber [Tue, 25 Jun 2013 08:17:55 +0000 (11:17 +0300)]
Make sure we don't leak memory again.

11 years agoUnbreak git_remote_ls on a local transport after disconnecting.
Arthur Schreiber [Tue, 25 Jun 2013 07:04:04 +0000 (09:04 +0200)]
Unbreak git_remote_ls on a local transport after disconnecting.

11 years agolibgit2 v0.19.0 "gut merge"
Vicent Marti [Mon, 24 Jun 2013 22:14:45 +0000 (00:14 +0200)]
libgit2 v0.19.0 "gut merge"

Minor point release! We got a lot of rather large features that we
wanted to get settled in:

- New (threadsafe) cache for objects
- Iterator for Status
- New Merge APIs
- SSH support on *NIX
- Function context on diff
- Namespaces support
- Index add/update/remove with wildcard support
- Iterator for References
- Fetch and push refspecs for Remotes
- Rename support in Status
- New 'sys/` namespace for external headers with low-level APIs

As always, this comes with hundreds of bug fixes and performance
improvements. We're faster and better than ever. And we haven't broken
many APIs this time!

Build stuff.

11 years agotest-rename: This is not a decimal, silly
Vicent Marti [Mon, 24 Jun 2013 22:12:19 +0000 (00:12 +0200)]
test-rename: This is not a decimal, silly

11 years agoMerge pull request #1675 from arthurschreiber/fix-leak-in-local-transport
Russell Belfer [Mon, 24 Jun 2013 21:43:33 +0000 (14:43 -0700)]
Merge pull request #1675 from arthurschreiber/fix-leak-in-local-transport

Fix a leak in the local transport code.

11 years agoMerge pull request #1674 from arrbee/fix-checkout-target-dir-win32
Vicent Martí [Mon, 24 Jun 2013 19:02:43 +0000 (12:02 -0700)]
Merge pull request #1674 from arrbee/fix-checkout-target-dir-win32

Fix checkout tests on Windows

11 years agoFix a leak in the local transport code.
Arthur Schreiber [Mon, 24 Jun 2013 19:02:42 +0000 (21:02 +0200)]
Fix a leak in the local transport code.

11 years agoFix checkout tests on Windows
Russell Belfer [Mon, 24 Jun 2013 18:56:35 +0000 (11:56 -0700)]
Fix checkout tests on Windows

11 years agoMerge pull request #1672 from TheRealKerni/fix/header_docs
Vicent Martí [Mon, 24 Jun 2013 18:21:54 +0000 (11:21 -0700)]
Merge pull request #1672 from TheRealKerni/fix/header_docs

Fixed most documentation header bugs

11 years agoMerge pull request #1670 from arrbee/open-cloexec
Vicent Martí [Mon, 24 Jun 2013 18:21:09 +0000 (11:21 -0700)]
Merge pull request #1670 from arrbee/open-cloexec

Add O_CLOEXEC to open calls

11 years agoMerge pull request #1669 from arrbee/fix-index-add-bypath
Vicent Martí [Mon, 24 Jun 2013 18:20:57 +0000 (11:20 -0700)]
Merge pull request #1669 from arrbee/fix-index-add-bypath

In loose objects backend, constrain mkdir calls to avoid extra mkdirs

11 years agoWork around reparse point stat issues
Russell Belfer [Mon, 24 Jun 2013 16:19:24 +0000 (09:19 -0700)]
Work around reparse point stat issues

In theory, p_stat should never return an S_ISLNK result, but due
to the current implementation on Windows with mount points it is
possible that it will.  For now, work around that by allowing a
link in the path to a directory being created.  If it is really a
problem, then the issue will be caught on the next iteration of
the loop, but typically this will be the right thing to do.

11 years agoFixed most documentation header bugs
Andreas Linde [Mon, 24 Jun 2013 13:33:41 +0000 (15:33 +0200)]
Fixed most documentation header bugs

Fixed a few header @param and @return typos with the help of -Wdocumentation in Xcode.

The following warnings have not been fixed:
common.h:213 - Not sure how the documentation format is for '...'
notes.h:102 - Correct @param name but empty text
notes.h:111 - Correct @param name but empty text
pack.h:140 - @return missing text
pack.h:148 - @return missing text

11 years agoAdd O_CLOEXEC to open calls
Russell Belfer [Sun, 23 Jun 2013 03:58:32 +0000 (20:58 -0700)]
Add O_CLOEXEC to open calls

11 years agoMerge pull request #1668 from csware/WC_ERR_INVALID_CHARS
Russell Belfer [Sun, 23 Jun 2013 00:22:03 +0000 (17:22 -0700)]
Merge pull request #1668 from csware/WC_ERR_INVALID_CHARS

Do not redefine WC_ERR_INVALID_CHARS

11 years agoConstrain mkdir calls to avoid extra mkdirs
Russell Belfer [Sun, 23 Jun 2013 00:15:31 +0000 (17:15 -0700)]
Constrain mkdir calls to avoid extra mkdirs

This updates the calls that make the subdirectories for objects
to use a base directory above which git_futils_mkdir won't walk
any higher.  This prevents attempts to mkdir all the way up to
the root of the filesystem.

Also, this moves the objects_dir into the loose backend structure
and removes the separate allocation, plus does some preformatting
of the objects_dir value to guarantee a trailing slash, etc.

11 years agoDo not redefine WC_ERR_INVALID_CHARS
Sven Strickroth [Sat, 22 Jun 2013 23:25:34 +0000 (01:25 +0200)]
Do not redefine WC_ERR_INVALID_CHARS

WC_ERR_INVALID_CHARS might be already defined by the Windows SDK.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
11 years agoMerge pull request #1665 from arrbee/checkout-target-directory
Vicent Martí [Fri, 21 Jun 2013 21:29:21 +0000 (14:29 -0700)]
Merge pull request #1665 from arrbee/checkout-target-directory

Add target directory to checkout options

11 years agoAddition checkout target directory tests
Russell Belfer [Fri, 21 Jun 2013 19:29:03 +0000 (12:29 -0700)]
Addition checkout target directory tests

This adds additonal tests of the checkout target directory option
including using it to dump data from bare repos.

11 years agoLoosen ensure_not_bare rules in checkout
Russell Belfer [Fri, 21 Jun 2013 19:26:36 +0000 (12:26 -0700)]
Loosen ensure_not_bare rules in checkout

With the new target directory option to checkout, the non-bareness
of the repository should be checked much later in the parameter
validation process - actually that check was already in place, but
I was doing it redundantly in the checkout APIs.

This removes the now unnecessary early check for bare repos.  It
also adds some other parameter validation and makes it so that
implied parameters can actually be passed as NULL (i.e. if you
pass a git_index, you don't have to pass the git_repository - we
can get it from index).

11 years agoAdd target directory to checkout
Russell Belfer [Fri, 21 Jun 2013 18:51:16 +0000 (11:51 -0700)]
Add target directory to checkout

This adds the ability for checkout to write to a target directory
instead of having to use the working directory of the repository.
This makes it easier to do exports of repository data and the like.

This is similar to, but not quite the same as, the --prefix option
to `git checkout-index` (this will always be treated as a directory
name, not just as a simple text prefix).

As part of this, the workdir iterator was extended to take the
path to the working directory as a parameter and fallback on the
git_repository_workdir result only if it's not specified.

Fixes #1332

11 years agoMerge pull request #1664 from arrbee/checkout-deleted-with-fix
Vicent Martí [Fri, 21 Jun 2013 18:41:40 +0000 (11:41 -0700)]
Merge pull request #1664 from arrbee/checkout-deleted-with-fix

Checkout should not recreate deleted files - with fix

11 years agoFix checkout of modified file when missing from wd
Russell Belfer [Fri, 21 Jun 2013 18:20:54 +0000 (11:20 -0700)]
Fix checkout of modified file when missing from wd

This fixes the checkout case when a file is modified between the
baseline and the target and yet missing in the working directory.
The logic for that case appears to have been wrong.

This also adds a useful checkout notify callback to the checkout
test helpers that will count notifications and also has a debug
mode to visualize what checkout thinks that it's doing.

11 years agotest asserting checkout should not recreate deleted files
Edward Thomson [Fri, 21 Jun 2013 00:05:38 +0000 (19:05 -0500)]
test asserting checkout should not recreate deleted files

11 years agoMerge pull request #1662 from arrbee/examples-like-git
Vicent Martí [Thu, 20 Jun 2013 22:27:25 +0000 (15:27 -0700)]
Merge pull request #1662 from arrbee/examples-like-git

Command line status example (with bug fixes)

11 years agoAdd test for fixed diff bug
Russell Belfer [Thu, 20 Jun 2013 22:15:10 +0000 (15:15 -0700)]
Add test for fixed diff bug

Add test for bug fixed in 852ded96982ae70acb63c3940fae08ea29e40fee
Sorry, I wrote that bug fix and forgot to check in a test at the
same time.  Here is one that fails on the old version of the code
and now works.

11 years agoFix comment and copyright in example
Russell Belfer [Thu, 20 Jun 2013 22:10:42 +0000 (15:10 -0700)]
Fix comment and copyright in example

11 years agoAdd example implementation of long format status
Russell Belfer [Thu, 20 Jun 2013 21:27:14 +0000 (14:27 -0700)]
Add example implementation of long format status

11 years agoAdd status flags to force output sort order
Russell Belfer [Thu, 20 Jun 2013 19:16:06 +0000 (12:16 -0700)]
Add status flags to force output sort order

Files in status will, be default, be sorted according to the case
insensitivity of the filesystem that we're running on.  However,
in some cases, this is not desirable.  Even on case insensitive
file systems, 'git status' at the command line will generally use
a case sensitive sort (like 'ls').  Some GUIs prefer to display a
list of file case insensitively even on case-sensitive platforms.

This adds two new flags: GIT_STATUS_OPT_SORT_CASE_SENSITIVELY
and GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY that will override the
default sort order of the status output and give the user control.
This includes tests for exercising these new options and makes
the examples/status.c program emulate core Git and always use a
case sensitive sort.

11 years agoInitial implementation of status example
Russell Belfer [Thu, 20 Jun 2013 18:39:31 +0000 (11:39 -0700)]
Initial implementation of status example

11 years agoFix bug in diff untracked dir scan
Russell Belfer [Thu, 20 Jun 2013 18:37:58 +0000 (11:37 -0700)]
Fix bug in diff untracked dir scan

When scanning untracked directories looking for non-ignored files
there was a bug where an empty directory would generate a false
error.

11 years agoMerge pull request #1661 from arrbee/index-add-all
Vicent Martí [Wed, 19 Jun 2013 23:18:30 +0000 (16:18 -0700)]
Merge pull request #1661 from arrbee/index-add-all

Index operations using globs

11 years agoAdd tests and fix use of freed memory
Russell Belfer [Wed, 19 Jun 2013 22:54:19 +0000 (15:54 -0700)]
Add tests and fix use of freed memory

This adds some tests for updating the index and having it remove
items to make sure that the iteration over the index still works
even as earlier items are removed.

In testing with valgrind, this found a path that would use the
path string from the index entry after it had been freed.  The
bug fix is simply to copy the path of the index entry before
doing any actual index manipulation.

11 years agoAdd index pathspec-based operations
Russell Belfer [Wed, 19 Jun 2013 22:27:25 +0000 (15:27 -0700)]
Add index pathspec-based operations

This adds three new public APIs for manipulating the index:

1. `git_index_add_all` is similar to `git add -A` and will add
   files in the working directory that match a pathspec to the
   index while honoring ignores, etc.
2. `git_index_remove_all` removes files from the index that match
   a pathspec.
3. `git_index_update_all` updates entries in the index based on
   the current contents of the working directory, either added
   the new information or removing the entry from the index.

11 years agoAdd fn to check pathspec for ignored files
Russell Belfer [Wed, 19 Jun 2013 22:22:48 +0000 (15:22 -0700)]
Add fn to check pathspec for ignored files

Command line Git sometimes generates an error message if given a
pathspec that contains an exact match to an ignored file (provided
--force isn't also given).  This adds an internal function that
makes it easy to check it that has happened.  Right now, I'm not
creating a public API for this because that would get a little
more complicated with a need for callbacks for all invalid paths.

11 years agoAdd higher level pathspec API
Russell Belfer [Wed, 19 Jun 2013 22:20:59 +0000 (15:20 -0700)]
Add higher level pathspec API

Right now, setting up a pathspec to be parsed and processed
requires several data structures and a couple of API calls.  This
adds a new high level data structure that contains all the items
that you'll need and high-level APIs that do all of the setup and
all of the teardown.  This will make it easier to use pathspecs
in various places with less repeated code.

11 years agoMerge pull request #1660 from trast/tr/fix-zlib-configuration
Vicent Martí [Wed, 19 Jun 2013 13:42:22 +0000 (06:42 -0700)]
Merge pull request #1660 from trast/tr/fix-zlib-configuration

CMakeLists: fix zlib linker setup

11 years agoCMakeLists: fix zlib linker setup
Thomas Rast [Wed, 19 Jun 2013 11:36:59 +0000 (13:36 +0200)]
CMakeLists: fix zlib linker setup

b53671a (Search for zlib unconditional, 2012-12-18) changed things
around to always (even on windows, that's what the subject refers to)
call FIND_PACKAGE(ZLIB).

However, it did not correctly handle the case where ZLIB_LIBRARY is
cached, either by the user setting it manually or by an earlier
search.  In that case, the IF(ZLIB_FOUND) would not trigger (that
variable is not cached) and we'd instead use the built-in version.

000e689 (CMake: don't try to use bundled zlib when the system's path
is in the cache, 2013-05-12) tried to fix that, but it actually made
the problem worse: now with ZLIB_LIBRARY cached, _neither_ of the
blocks would execute, resulting in a linker error for me when trying
to build such a doubly-configured setup.

To fix the issue, we just trust CMake to do the right thing.  If
ZLIB_LIBRARY is set (either from user or cache) then the find_library
in FindZLIB.cmake will use that instead of searching again.  So we can
unconditionally (for real this time) call FIND_PACKAGE(ZLIB), and just
check its result.

11 years agoMerge pull request #1659 from arrbee/rename-cycle-fixes
Vicent Martí [Tue, 18 Jun 2013 23:42:35 +0000 (16:42 -0700)]
Merge pull request #1659 from arrbee/rename-cycle-fixes

Diff rename detection cycle fixes

11 years agoFix rename looped reference issues
Russell Belfer [Tue, 18 Jun 2013 23:14:35 +0000 (16:14 -0700)]
Fix rename looped reference issues

This makes the diff rename tracking code more careful about the
order in which it processes renames and more thorough in updating
the mapping of correct renames when an earlier rename update
alters the index of a later matched pair.

11 years agotest illustrating tri-cyclic rename failure
Edward Thomson [Mon, 17 Jun 2013 22:39:59 +0000 (17:39 -0500)]
test illustrating tri-cyclic rename failure

11 years agotest failure when renames produce similar similarities
Edward Thomson [Mon, 17 Jun 2013 22:33:40 +0000 (17:33 -0500)]
test failure when renames produce similar similarities

11 years agoMerge pull request #1657 from arrbee/diff-blob-as-path
Vicent Martí [Tue, 18 Jun 2013 11:30:25 +0000 (04:30 -0700)]
Merge pull request #1657 from arrbee/diff-blob-as-path

Add "as_path" parameters to blob and buffer diff APIs

11 years agoAdd "as_path" parameters to blob and buffer diffs
Russell Belfer [Tue, 18 Jun 2013 00:03:34 +0000 (17:03 -0700)]
Add "as_path" parameters to blob and buffer diffs

This adds parameters to the four functions that allow for blob-to-
blob and blob-to-buffer differencing (either via callbacks or by
making a git_diff_patch object).  These parameters let you say
that filename we should pretend the blob has while doing the diff.
If you pass NULL, there should be no change from the existing
behavior, which is to skip using attributes for file type checks
and just look at content.  With the parameters, you can plug into
the new diff driver functionality and get binary or non-binary
behavior, plus function context regular expressions, etc.

This commit also fixes things so that the git_diff_delta that is
generated by these functions will actually be populated with the
data that we know about the blobs (or buffers) so you can use it
appropriately.  It also fixes a bug in generating patches from
the git_diff_patch objects created via these functions.

Lastly, there is one other behavior change that may matter.  If
there is no difference between the two blobs, these functions no
longer generate any diff callbacks / patches unless you have
passed in GIT_DIFF_INCLUDE_UNMODIFIED.  This is pretty natural,
but could potentially change the behavior of existing usage.

11 years agoMerge pull request #1651 from arrbee/status_indexed_updates
Russell Belfer [Mon, 17 Jun 2013 17:46:15 +0000 (10:46 -0700)]
Merge pull request #1651 from arrbee/status_indexed_updates

Status indexed updates

11 years agoUpdate clar to latest version
Russell Belfer [Mon, 17 Jun 2013 17:23:53 +0000 (10:23 -0700)]
Update clar to latest version

11 years agoFix memory leaks in diff rename tests
Russell Belfer [Mon, 17 Jun 2013 16:55:29 +0000 (09:55 -0700)]
Fix memory leaks in diff rename tests

This fixes a couple objects I forgot to free, and also updates
the valgrind suppressions file on the Mac to cover a few more
cases that had crept in.

11 years agoAdd test of rename with no changes
Russell Belfer [Mon, 17 Jun 2013 04:51:43 +0000 (21:51 -0700)]
Add test of rename with no changes

A tree to index rename with no changes was getting erased by
the iteration routine (if the routine actually loaded the data
for the unmodified file).  This invokes the code path that was
previously messing up the diff and iterates twice to make sure
that the iteration process itself doesn't modify the data.

11 years agoMore tests and bug fixes for status with rename
Russell Belfer [Fri, 14 Jun 2013 23:18:04 +0000 (16:18 -0700)]
More tests and bug fixes for status with rename

This changes the behavior of the status RENAMED flags so that they
will be combined with the MODIFIED flags if appropriate.  If a file
is modified in the index and also renamed, then the status code
will have both the GIT_STATUS_INDEX_MODIFIED and INDEX_RENAMED bits
set.  If it is renamed but the OID has not changed, then just the
GIT_STATUS_INDEX_RENAMED bit will be set.  Similarly, the flags
GIT_STATUS_WT_MODIFIED and GIT_STATUS_WT_RENAMED can both be set
independently of one another.

This fixes a serious bug where the check for unmodified files that
was done at data load time could end up erasing the RENAMED state
of a file that was renamed with no changes.

Lastly, this contains a bunch of new tests for status with renames,
including tests where the only rename changes are case changes.
The expected results of these tests have to vary by whether the
platform uses a case sensitive filesystem or not, so the expected
data covers those platform differences separately.

11 years agoTest has to work on case sensitive systems
Russell Belfer [Thu, 13 Jun 2013 23:31:11 +0000 (16:31 -0700)]
Test has to work on case sensitive systems

11 years agoAlways do tree to index diffs case sensitively
Russell Belfer [Thu, 13 Jun 2013 23:09:53 +0000 (16:09 -0700)]
Always do tree to index diffs case sensitively

Trees are always case sensitive.  The index is always case
preserving and will be case sensitive when it is turned into a
tree.  Therefore the tree and the index can and should always
be compared to one another case sensitively.

This will restore the index to case insensitive order after the
diff has been generated.

Consider this a short-term fix.  The long term fix is to have the
index always stored both case sensitively and case insensitively
(at least on platforms that sometimes require case insensitivity).

11 years agoMake index_insert keep existing case
Russell Belfer [Thu, 13 Jun 2013 22:52:12 +0000 (15:52 -0700)]
Make index_insert keep existing case

In a case insensitive index, if you attempt to add a file from
disk with a different case pattern, the old case pattern in the
index should be preserved.

This fixes that (and a couple of minor warnings).

11 years agosome simple case-sensitive index tests
Edward Thomson [Fri, 31 May 2013 23:12:49 +0000 (18:12 -0500)]
some simple case-sensitive index tests

11 years agoImprove case handling in git_diff__paired_foreach
Russell Belfer [Thu, 13 Jun 2013 22:37:06 +0000 (15:37 -0700)]
Improve case handling in git_diff__paired_foreach

This commit reinstates some changes to git_diff__paired_foreach
that were discarded during the rebase (because the diff_output.c
file had gone away), and also adjusts the case insensitively
logic slightly to hopefully deal with either mismatched icase
diffs and other case insensitivity scenarios.

11 years agoBe more careful about the path with diffs
Russell Belfer [Thu, 13 Jun 2013 22:32:09 +0000 (15:32 -0700)]
Be more careful about the path with diffs

This makes diff more careful about picking the canonical path
when generating a delta so that it won't accidentally pick up a
case-mismatched path on a case-insensitive file system.  This
should make sure we use the "most accurate" case correct version
of the path (i.e. from the tree if possible, or the index if
need be).

11 years agoFix broken status EXCLUDE_SUBMODULES logic
Russell Belfer [Thu, 13 Jun 2013 22:30:26 +0000 (15:30 -0700)]
Fix broken status EXCLUDE_SUBMODULES logic

The exclude submodules flag was not doing the right thing, in
that a file with no diff between the head and the index and just
a delete in the workdir could be excluded if submodules were
excluded.

11 years agoClarify some docs and minor reordering
Russell Belfer [Thu, 13 Jun 2013 22:27:30 +0000 (15:27 -0700)]
Clarify some docs and minor reordering

This simplifies some documentation and hopefully makes a couple
of things easier to read.  Also, this rearrages the order in this
branch so that the overall diff against the trunk will hopefully
be a bit cleaner.

11 years agoFix some warnings
Russell Belfer [Thu, 13 Jun 2013 22:26:56 +0000 (15:26 -0700)]
Fix some warnings

11 years agogit__strcasesort_cmp: strcasecmp sorting rules but requires strict equality
Edward Thomson [Fri, 31 May 2013 21:30:09 +0000 (16:30 -0500)]
git__strcasesort_cmp: strcasecmp sorting rules but requires strict equality

11 years agohandle renames in status computation
Edward Thomson [Thu, 23 May 2013 04:19:40 +0000 (23:19 -0500)]
handle renames in status computation

11 years agostatus access by index, providing more details to callers
Edward Thomson [Tue, 21 May 2013 16:05:21 +0000 (11:05 -0500)]
status access by index, providing more details to callers

11 years agobranch: More obvious semantics in `foreach`
Vicent Marti [Mon, 17 Jun 2013 16:48:02 +0000 (18:48 +0200)]
branch: More obvious semantics in `foreach`

11 years agoMerge pull request #1655 from yorah/fix/ref-memleak
Vicent Martí [Mon, 17 Jun 2013 16:38:04 +0000 (09:38 -0700)]
Merge pull request #1655 from yorah/fix/ref-memleak

ref: free the last ref when cancelling git_branch_foreach()

11 years agoref: free the last ref when cancelling git_branch_foreach()
yorah [Mon, 17 Jun 2013 16:25:30 +0000 (18:25 +0200)]
ref: free the last ref when cancelling git_branch_foreach()

Also fixed an assert typo on nulltoken's HEAD

11 years agoMerge pull request #1654 from yorah/memzero
Vicent Martí [Mon, 17 Jun 2013 15:53:22 +0000 (08:53 -0700)]
Merge pull request #1654 from yorah/memzero

Memzero stuffs

11 years agocred: deploy git__memzero to clear memory holding a password
yorah [Mon, 17 Jun 2013 12:31:14 +0000 (14:31 +0200)]
cred: deploy git__memzero to clear memory holding a password

11 years agoutil: git__memzero() tweaks
yorah [Mon, 17 Jun 2013 12:27:34 +0000 (14:27 +0200)]
util: git__memzero() tweaks

On Linux: fix a warning message related to the volatile qualifier (cast)
On Windows: use SecureZeroMemory()

On both, inline the call, so that no entry point can lead back to this "secure" memory zeroing.

11 years agoMerge pull request #1652 from yorah/fix/build-warnings
Vicent Martí [Fri, 14 Jun 2013 18:13:05 +0000 (11:13 -0700)]
Merge pull request #1652 from yorah/fix/build-warnings

Fix/build warnings

11 years agodiff: fix warning
yorah [Fri, 14 Jun 2013 12:02:00 +0000 (14:02 +0200)]
diff: fix warning

11 years agofileops: fix invalid read
yorah [Fri, 14 Jun 2013 10:10:13 +0000 (12:10 +0200)]
fileops: fix invalid read

11 years agoMerge pull request #1650 from nulltoken/ntk/winrc-filename
Vicent Martí [Thu, 13 Jun 2013 09:47:45 +0000 (02:47 -0700)]
Merge pull request #1650 from nulltoken/ntk/winrc-filename

cmake: Add option to specify the name of the binary

11 years agocmake: Add option to specify the name of the binary
nulltoken [Wed, 12 Jun 2013 19:15:58 +0000 (21:15 +0200)]
cmake: Add option to specify the name of the binary

11 years agoRevert "cmake: Update Windows resources to reflect the optional vendor string"
Vicent Marti [Wed, 12 Jun 2013 19:14:04 +0000 (21:14 +0200)]
Revert "cmake: Update Windows resources to reflect the optional vendor string"

This reverts commit 095bfd748766966f5515bdfe64867d6a09287123.

11 years agoutil: It's called `memzero`
Vicent Marti [Wed, 12 Jun 2013 19:10:33 +0000 (21:10 +0200)]
util: It's called `memzero`

11 years agoMerge remote-tracking branch 'arrbee/minor-paranoia' into development
Vicent Marti [Wed, 12 Jun 2013 19:05:48 +0000 (21:05 +0200)]
Merge remote-tracking branch 'arrbee/minor-paranoia' into development

11 years agoMerge pull request #1647 from arrbee/fix-win32-warnings-part-112
Russell Belfer [Wed, 12 Jun 2013 22:39:22 +0000 (15:39 -0700)]
Merge pull request #1647 from arrbee/fix-win32-warnings-part-112

Fix Windows warnings and missing prototypes

11 years agoFix Windows warnings
Russell Belfer [Wed, 12 Jun 2013 22:21:21 +0000 (15:21 -0700)]
Fix Windows warnings

This fixes problems with missing function prototypes and 64-bit
data issues on Windows.

11 years agoMerge pull request #1643 from ethomson/rename_source
Vicent Martí [Wed, 12 Jun 2013 21:54:32 +0000 (14:54 -0700)]
Merge pull request #1643 from ethomson/rename_source

Keep data about source of similarity

11 years agoMerge pull request #1642 from arrbee/diff-function-context
Vicent Martí [Wed, 12 Jun 2013 21:52:47 +0000 (14:52 -0700)]
Merge pull request #1642 from arrbee/diff-function-context

Diff code reorg plus function context in diff headers

11 years agoFix diff header naming issues
Russell Belfer [Wed, 12 Jun 2013 21:18:09 +0000 (14:18 -0700)]
Fix diff header naming issues

This makes the git_diff_patch definition private to diff_patch.c
and fixes a number of other header file naming inconsistencies to
use `git_` prefixes on functions and structures that are shared
between files.

11 years agoImprovements to git_array
Russell Belfer [Wed, 12 Jun 2013 20:46:44 +0000 (13:46 -0700)]
Improvements to git_array

This changes the size data to uint32_t, fixes the array growth
logic to use a simple 1.5x multiplier, and uses a generic inline
function for growing the array to make the git_array_alloc API
feel more natural (i.e. it returns a pointer to the new item).

11 years agoAdd patch from blobs API
Russell Belfer [Wed, 12 Jun 2013 18:55:27 +0000 (11:55 -0700)]
Add patch from blobs API

This adds two new public APIs: git_diff_patch_from_blobs and
git_diff_patch_from_blob_and_buffer, plus it refactors the code
for git_diff_blobs and git_diff_blob_to_buffer so that they code
is almost entirely shared between these APIs, and adds tests for
the new APIs.

11 years agoFix some diff driver memory leaks
Russell Belfer [Wed, 12 Jun 2013 18:54:11 +0000 (11:54 -0700)]
Fix some diff driver memory leaks

11 years agoAdd diff drivers tests (and fix bugs)
Russell Belfer [Wed, 12 Jun 2013 00:45:14 +0000 (17:45 -0700)]
Add diff drivers tests (and fix bugs)

This adds real tests for user-configured diff drivers and in the
process found a bunch of bugs.

11 years agoMerge pull request #1645 from csware/config_level_app
Vicent Martí [Tue, 11 Jun 2013 22:34:53 +0000 (15:34 -0700)]
Merge pull request #1645 from csware/config_level_app

Add high(est) config level for application specific config files

11 years agoAdd high(est) config level for application specific config files
Sven Strickroth [Tue, 11 Jun 2013 19:33:18 +0000 (21:33 +0200)]
Add high(est) config level for application specific config files

Some tools use an extra level to maintain an application specific config files on top of the normal ones. Revision 16adc9fade52b49e2bc13cb52407cc0025a93c8b broke this.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
11 years agoImplement regex pattern diff driver
Russell Belfer [Tue, 11 Jun 2013 18:22:22 +0000 (11:22 -0700)]
Implement regex pattern diff driver

This implements the loading of regular expression pattern lists
for diff drivers that search for function context in that way.
This also changes the way that diff drivers update options and
interface with xdiff APIs to make them a little more flexible.

11 years agoMerge pull request #1644 from carlosmn/sig-isspace
Vicent Martí [Tue, 11 Jun 2013 13:30:18 +0000 (06:30 -0700)]
Merge pull request #1644 from carlosmn/sig-isspace

signature: extend trimming to more whitespace

11 years agosignature: extend trimming to more whitespace
Carlos Martín Nieto [Tue, 11 Jun 2013 08:48:00 +0000 (10:48 +0200)]
signature: extend trimming to more whitespace

There are all sorts of misconfiguration in the wild. We already rely
on the signature constructor to trim SP. Extend the logic to use
`isspace` to decide whether a character should be trimmed.

11 years agostart implementing diff driver registry
Russell Belfer [Mon, 10 Jun 2013 22:24:20 +0000 (15:24 -0700)]
start implementing diff driver registry

11 years agoFix some memory leaks
Russell Belfer [Mon, 10 Jun 2013 21:16:56 +0000 (14:16 -0700)]
Fix some memory leaks

11 years agofix missing file and bad prototype
Russell Belfer [Mon, 10 Jun 2013 21:16:49 +0000 (14:16 -0700)]
fix missing file and bad prototype

11 years agokeep source similarity in rename detection
Edward Thomson [Mon, 10 Jun 2013 20:16:44 +0000 (15:16 -0500)]
keep source similarity in rename detection

11 years agofailing unit test for similar renames
Edward Thomson [Mon, 10 Jun 2013 19:17:54 +0000 (14:17 -0500)]
failing unit test for similar renames

11 years agoReorganize diff and add basic diff driver
Russell Belfer [Mon, 10 Jun 2013 17:10:39 +0000 (10:10 -0700)]
Reorganize diff and add basic diff driver

This is a significant reorganization of the diff code to break it
into a set of more clearly distinct files and to document the new
organization.  Hopefully this will make the diff code easier to
understand and to extend.

This adds a new `git_diff_driver` object that looks of diff driver
information from the attributes and the config so that things like
function content in diff headers can be provided.  The full driver
spec is not implemented in the commit - this is focused on the
reorganization of the code and putting the driver hooks in place.

This also removes a few #includes from src/repository.h that were
overbroad, but as a result required extra #includes in a variety
of places since including src/repository.h no longer results in
pulling in the whole world.