|
fe3b9d07
|
2014-06-06T00:54:11
|
|
remote: failing test for rename
When there is a reference in the target namespace, we should overwrite
it. Instead it gets a different name under the current code.
|
|
dfcba09e
|
2014-06-03T13:05:20
|
|
Merge pull request #2395 from libgit2/cmn/ref-iter-concurrent
Concurrent ref iterator access
|
|
bccb36eb
|
2014-06-03T17:25:59
|
|
Merge pull request #2389 from arthurschreiber/arthur/set-error-when-no-remote-found
Remote: Set an error when a remote cannot be found.
|
|
69a1a691
|
2014-06-03T16:18:08
|
|
Plug a leak in the tests
|
|
4ee2543c
|
2014-06-02T16:46:47
|
|
refs: failing test for concurrent ref access
If we remove a reference while we're iterating through the packed refs,
the position in the iterator will be off.
|
|
d723dbed
|
2014-05-30T19:26:49
|
|
Remote: Set an error when a remote cannot be found.
Inside `git_remote_load`, the calls to `get_optional_config` use
`giterr_clear` to unset any errors that are set due to missing config
keys. If neither a fetch nor a push url config was found for a remote,
we should set an error again.
|
|
49837fd4
|
2014-05-30T11:30:53
|
|
Ignore core.safecrlf=warn until we have a warn infrastructure
|
|
9d6c3d28
|
2014-05-30T15:15:54
|
|
Refs: Extend unicode test for branch creation.
This adds another assertion to ensure that the reference name inside
the git_reference struct returned by `git_branch_create` is returned as
precomposed if `core.precomposeunicode` is enabled.
|
|
1a90b1e3
|
2014-05-30T14:53:28
|
|
Refs: Add a unicode test for git_branch_move.
This tests that decomposed branch names are correctly precomposed when
passed to `git_branch_move` and `core.precomposeunicode` is enabled.
|
|
31c55152
|
2014-05-29T14:50:57
|
|
Merge pull request #2011 from libgit2/cmn/clone-local
Local clone
|
|
bc9f67fa
|
2014-05-29T10:03:04
|
|
clone: more explicit local tests
Assert the exact amount of links we expect. While there, check that a
plain git_clone() automatically chooses to link.
|
|
2614819c
|
2014-05-28T11:28:57
|
|
clone: allow for linking in local clone
If requested, git_clone_local_into() will try to link the object files
instead of copying them.
This only works on non-Windows (since it doesn't have this) when both
are on the same filesystem (which are unix semantics).
|
|
94f742ba
|
2014-05-28T10:18:05
|
|
fileops: allow linking files when copying directory structures
When passed the LINK_FILES flag, the recursive copy will hardlink files
instead of copying them.
|
|
c1dbfcbb
|
2014-05-28T10:07:23
|
|
clone: add flag not to link
|
|
121b2673
|
2013-12-23T11:12:31
|
|
clone: add flags to override whether to perform a local clone
|
|
5d91bea2
|
2014-05-28T13:55:57
|
|
Merge pull request #2380 from libgit2/cmn/index-add-modes
index: check for valid filemodes on add
|
|
ab882e21
|
2014-05-28T13:49:38
|
|
Merge pull request #2385 from karipe/development
Fix compile error on Visual Studio
|
|
eff531e1
|
2014-05-27T20:58:20
|
|
Modify GIT_MERGE_CONFIG -> GIT_MERGE_PREFERENCE
|
|
a3622ba6
|
2014-05-16T13:54:40
|
|
Move GIT_MERGE_CONFIG_* to its own enum
|
|
d362093f
|
2014-05-08T15:41:36
|
|
Introduce GIT_MERGE_CONFIG_* for merge.ff settings
git_merge_analysis will now return GIT_MERGE_CONFIG_NO_FASTFORWARD
when merge.ff=false and GIT_MERGE_CONFIG_FASTFORWARD_ONLY when
merge.ff=true
|
|
3ac1ff42
|
2014-05-27T23:32:38
|
|
Fix compile error on Visual Studio
|
|
052a2ffd
|
2014-05-22T16:01:02
|
|
index: check for valid filemodes on add
|
|
a5982644
|
2014-05-22T02:28:42
|
|
Merge pull request #2376 from libgit2/cmn/remote-symref
Add support for the symref extension
|
|
7ee233a9
|
2014-05-22T02:27:33
|
|
Merge pull request #2375 from libgit2/rb/safecrlf-on-lf-platform
Make core.safecrlf not generate an error on LF-ending platforms
|
|
d22db24f
|
2014-05-21T09:32:35
|
|
remote: add api to guess the remote's default branch
If the remote supports the symref protocol extension, then we return
that, otherwise we guess with git's rules.
|
|
306475eb
|
2014-05-20T09:55:26
|
|
remote: expose the remote's symref mappings
Add a symref_target field to git_remote_head to expose the symref
mappings to the user.
|
|
430866d2
|
2014-05-20T08:29:51
|
|
Fix a leak in the tests
|
|
16798d08
|
2014-05-19T14:57:09
|
|
Make core.safecrlf work on LF-ending platforms
If you enabled core.safecrlf on an LF-ending platform, we would
error even for files with all LFs. We should only be warning on
irreversible mappings, I think.
|
|
124a45ea
|
2014-05-19T15:00:50
|
|
Merge pull request #2354 from libgit2/cmn/clone-into-mirror
Allow mirror-clone via `git_clone_into()`
|
|
b2067248
|
2014-05-15T09:03:30
|
|
clone: add failing test for a mirror-clone with clone_into
Show a failure to perform a mirror-clone from a repository, both local
and remote.
|
|
49e369b2
|
2014-05-18T10:06:49
|
|
message: don't assume the comment char
The comment char is configurable and we need to provide a way for the
user to specify which comment char they chose for their message.
|
|
d7a29463
|
2014-05-17T16:58:09
|
|
Fix a bug in the pack::packbuilder suite
|
|
191ff936
|
2014-05-17T02:37:13
|
|
Merge pull request #2362 from libgit2/rb/update-4k-to-8k
Test and fix Git diff binary detection compatibility
|
|
8af4966d
|
2014-05-16T16:30:58
|
|
Git binary check compat tests
A variety of data patterns for diffs verified to match the
behavior of binary detection with Git on the command line.
|
|
228272ef
|
2014-05-16T11:56:37
|
|
Merge pull request #2313 from libgit2/cmn/remote-delete
Remote deletion
|
|
ec8a949a
|
2014-04-30T09:20:03
|
|
remote: remove remote-tracking branches on delete
When we delete a remote, we also need to go through its fetch refspecs
and remove the references they create locally.
|
|
8487e237
|
2014-05-15T10:56:28
|
|
Better search path sandboxing
There are a number of tests that modify the global or system
search paths during the tests. This adds a helper function to
make it easier to restore those paths and makes sure that they
are getting restored in a manner that preserves test isolation.
|
|
03fcef18
|
2014-05-13T12:40:13
|
|
Merge pull request #2328 from libgit2/rb/how-broken-can-ignores-be
Improve checks for ignore containment
|
|
df341926
|
2014-05-12T10:51:56
|
|
Merge pull request #2336 from libgit2/rb/unicode-branch-names
Pass unconverted Unicode path data when iconv doesn't like it
|
|
af567e88
|
2014-05-12T10:44:13
|
|
Merge pull request #2334 from libgit2/rb/fix-2333
Be more careful with user-supplied buffers
|
|
ce3b71d9
|
2014-05-12T10:28:45
|
|
Don't scale diff stat when not needed
|
|
7bcced44
|
2014-05-12T10:15:30
|
|
Merge pull request #2300 from libgit2/cmn/match-host-tests
Some improvements to the cert checking
|
|
d2c4d1c6
|
2014-05-12T10:04:52
|
|
Merge pull request #2188 from libgit2/cmn/config-snapshot
Configuration snapshotting
|
|
e18d5e52
|
2014-05-09T08:59:59
|
|
Merge pull request #2331 from libgit2/rb/dont-stop-diff-on-safecrlf
Add filter options and ALLOW_UNSAFE
|
|
bb45e390
|
2014-05-08T15:01:07
|
|
Disable threads::refdb::edit_while_iterate test
It seems that with the various recent changes to reference updating
and reflog writing, that the thread safety of refdb updates has
been reduced (either that or it was never thread safe and the
window for error has increased). Either way, this test is now
sometimes segfaulting which is no good, so let's disable the test
for now. We don't really make any public promises about thread
safety for this type of operation, so I think this is acceptable,
at least in the short term.
|
|
8a2ef218
|
2014-05-08T14:48:27
|
|
Don't always test composed-insensitive lookups
Only on a filesystem that is composed/decomposed insensitive,
should be testing that a branch can be looked up by the opposite
form and still work correctly.
|
|
be20ac5a
|
2014-05-08T14:33:37
|
|
Allow cl_repo_get_bool to work with missing key
One of the test helpers provides a quick way for looking up a
boolean key. But if the key way missing completely, the check
would actually raise an error. Given the way we use this helper,
if the key is missing, this should just return false, I think.
|
|
43a04135
|
2014-05-08T13:52:46
|
|
Pass unconverted data when iconv doesn't like it
When using Iconv to convert unicode data and iconv doesn't like
the source data (because it thinks that it's not actual UTF-8),
instead of stopping the operation, just use the unconverted data.
This will generally do the right thing on the filesystem, since
that is the source of the non-UTF-8 path data anyhow.
This adds some tests for creating and looking up branches with
messy Unicode names. Also, this takes the helper function that
was previously internal to `git_repository_init` and makes it
into `git_path_does_fs_decompose_unicode` which is a useful in
tests to understand what the expected results should be.
|
|
1e4976cb
|
2014-05-08T10:17:14
|
|
Be more careful with user-supplied buffers
This adds in missing calls to `git_buf_sanitize` and fixes a
number of places where `git_buf` APIs could inadvertently write
NUL terminator bytes into invalid buffers. This also changes the
behavior of `git_buf_sanitize` to NUL terminate a buffer if it can
and of `git_buf_shorten` to do nothing if it can.
Adds tests of filtering code with zeroed (i.e. unsanitized) buffer
which was previously triggering a segfault.
|
|
5269008c
|
2014-05-06T16:01:49
|
|
Add filter options and ALLOW_UNSAFE
Diff and status do not want core.safecrlf to actually raise an
error regardless of the setting, so this extends the filter API
with an additional options flags parameter and adds a flag so that
filters can be applied with GIT_FILTER_OPT_ALLOW_UNSAFE, indicating
that unsafe filter application should be downgraded from a failure
to a warning.
|
|
f554611a
|
2014-05-06T12:41:26
|
|
Improve checks for ignore containment
The diff code was using an "ignored_prefix" directory to track if
a parent directory was ignored that contained untracked files
alongside tracked files. Unfortunately, when negative ignore rules
were used for directories inside ignored parents, the wrong rules
were applied to untracked files inside the negatively ignored
child directories.
This commit moves the logic for ignore containment into the workdir
iterator (which is a better place for it), so the ignored-ness of
a directory is contained in the frame stack during traversal. This
allows a child directory to override with a negative ignore and yet
still restore the ignored state of the parent when we traverse out
of the child.
Along with this, there are some problems with "directory only"
ignore rules on container directories. Given "a/*" and "!a/b/c/"
(where the second rule is a directory rule but the first rule is
just a generic prefix rule), then the directory only constraint
was having "a/b/c/d/file" match the first rule and not the second.
This was fixed by having ignore directory-only rules test a rule
against the prefix of a file with LEADINGDIR enabled.
Lastly, spot checks for ignores using `git_ignore_path_is_ignored`
were tested from the top directory down to the bottom to deal with
the containment problem, but this is wrong. We have to test bottom
to top so that negative subdirectory rules will be checked before
parent ignore rules.
This does change the behavior of some existing tests, but it seems
only to bring us more in line with core Git, so I think those
changes are acceptable.
|
|
ee311907
|
2014-05-05T16:04:14
|
|
odb: ignore files in the objects dir
We assume that everything under GIT_DIR/objects/ is a directory. This is
not necessarily the case if some process left a stray file in there.
Check beforehand if we do have a directory and ignore the entry
otherwise.
|
|
272b462d
|
2014-05-02T09:50:15
|
|
Merge pull request #2308 from libgit2/rb/diff-update-index-stat-cache
Reduce excessive OID calculation for diff and stat
|
|
9862ef8e
|
2014-05-02T09:42:07
|
|
Merge pull request #2310 from libgit2/cmn/commit-create-safe
commit: safer commit creation with reference update
|
|
99dfa470
|
2014-05-01T15:12:12
|
|
Some further sandboxing cleanups to tests
Trying to find other issues where tests may not clean up quite
properly when they are through...
|
|
0f603132
|
2014-05-01T14:47:33
|
|
Improve handling of fake home directory
There are a few tests that set up a fake home directory and a
fake GLOBAL search path so that we can test things in global
ignore or attribute or config files. This cleans up that code to
work more robustly even if there is a test failure. This also
fixes some valgrind warnings where scanning search paths for
separators could end up doing a little bit of sketchy data access
when coming to the end of search list.
|
|
bc91347b
|
2014-04-30T11:16:31
|
|
Fix remaining init_options inconsistencies
There were a couple of "init_opts()" functions a few more cases
of structure initialization that I somehow missed.
|
|
9c8ed499
|
2014-04-29T15:05:58
|
|
Remove trace / add git_diff_perfdata struct + api
|
|
7a2e56a3
|
2014-04-29T14:30:15
|
|
Get rid of redundant git_diff_options_init fn
Since git_diff_init_options was introduced, remove this old fn.
|
|
b23b112d
|
2014-04-29T11:29:49
|
|
Add payloads, bitmaps to trace API
This is a proposed adjustment to the trace APIs. This makes the
trace levels into a bitmask so that they can be selectively enabled
and adds a callback-level payload, plus a message-level payload.
This makes it easier for me to a GIT_TRACE_PERF callbacks that
are simply bypassed if the PERF level is not set.
|
|
225aab5d
|
2014-04-28T16:47:39
|
|
Don't use trace if GIT_TRACE not defined
|
|
cd424ad5
|
2014-04-28T16:39:53
|
|
Add GIT_STATUS_OPT_UPDATE_INDEX and use trace API
This adds an option to refresh the stat cache while generating
status. It also rips out the GIT_PERF stuff I had an makes use
of the trace API to keep statistics about what happens during diff.
|
|
94fb4aad
|
2014-04-28T14:48:41
|
|
Add diff option to update index stat cache
When diff is scanning the working directory, if it finds a file
where it is not sure if the index entry matches the working dir,
it will recalculate the OID (which is pretty expensive). This
adds a new flag to diff so that if the OID calculation finds that
the file actually has not changed (i.e. just the modified time was
altered or such), then it will refresh the stat cache in the index
so that future calls to diff will not have to check the oid again.
|
|
8ef4e11a
|
2014-04-28T14:16:26
|
|
Skip diff oid calc when size definitely changed
When we think the stat cache in the index seems valid and the size
or mode of a file has definitely changed, then don't bother trying
to recalculate the OID of the workdir bits to confirm that it is
modified - just accept that it is modified.
This can result in files that show as modified with no actual diff,
but the behavior actually appears to match Git on the command line.
This also includes a minor optimization to not perform a submodule
lookup on the ".git" directory itself.
|
|
240f4af3
|
2014-04-28T14:04:29
|
|
Add build option for diff internal statistics
|
|
d19b2f9f
|
2014-05-01T12:46:46
|
|
Make ** pattern eat trailing slash
This allows "foo/**/*.html" to match "foo/file.html"
|
|
40e48ea4
|
2013-11-15T15:36:37
|
|
remote: Introduce git_remote_delete()
|
|
48ebea66
|
2013-01-07T00:20:13
|
|
tests: Introduce count_config_entries_match() helper
|
|
217c029b
|
2014-04-09T14:08:22
|
|
commit: safer commit creation with reference update
The current version of the commit creation and amend function are unsafe
to use when passing the update_ref parameter, as they do not check that
the reference at the moment of update points to what the user expects.
Make sure that we're moving history forward when we ask the library to
update the reference for us by checking that the first parent of the new
commit is the current value of the reference. We also make sure that the
ref we're updating hasn't moved between the read and the write.
Similarly, when amending a commit, make sure that the current tip of the
branch is the commit we're amending.
|
|
1f0d4f3d
|
2014-04-26T13:51:14
|
|
netops: unit-test the cert host-name pattern matching
This kind of stuff should have unit tests, even if it's just to show
what we expect to match successfully.
|
|
7b8d564d
|
2014-04-25T15:49:58
|
|
Reset tests: Use sandboxed index
|
|
8443ed6c
|
2014-04-25T02:10:19
|
|
Merge pull request #2284 from jacquesg/push-progress-callback
Fire progress and update tips callbacks also for pushes.
|
|
332e4f20
|
2014-04-25T02:07:42
|
|
Merge pull request #2297 from libgit2/rb/status-with-precomposed-changes
Improve test coverage of status with different core.precomposeunicode settings
|
|
2ad51b81
|
2014-04-25T02:04:12
|
|
Merge pull request #2241 from libgit2/rb/stash-skip-submodules
Improve stash and checkout for ignored + untracked items
|
|
af9eeac9
|
2014-04-24T16:20:08
|
|
Merge pull request #2294 from ethomson/merge_checkout_strategy
Merge checkout strategy
|
|
6b833e3a
|
2014-04-24T15:40:50
|
|
Improve docs for status rename detection limits
and make tests empty on platforms without iconv support.
|
|
f608f3bb
|
2014-04-24T15:25:01
|
|
Test toggling core.precomposeunicode yields rename
There is an interesting difference with core Git here, though.
Because libgit2 will do rename detection with the working directory,
in the last case where the HEAD and the working directory both
have the decomposed data and the index has the composed data, we
generate a single status record with two renames whereas Git will
generate one rename (head to index) and one untracked file.
|
|
2334e3d8
|
2014-04-24T14:46:59
|
|
Test decomposed unicode renames work as expected
|
|
bdc82e1c
|
2014-04-24T14:08:29
|
|
fetchhead: deal with quotes in branch names
The current FETCH_HEAD parsing code assumes that a quote must end the
branch name. Git however allows for quotes as part of a branch name,
which causes us to consider the FETCH_HEAD file as invalid.
Instead of searching for a single quote char, search for a quote char
followed by SP, which is not a valid part of a ref name.
|
|
a4e2c36a
|
2014-04-23T19:40:21
|
|
merge: checkout default shouldn't clobber given
|
|
26564d80
|
2014-04-23T19:26:58
|
|
merge: default checkout strategy for should be SAFE
|
|
212b6205
|
2014-04-23T09:27:15
|
|
Merge pull request #2291 from ethomson/patch_binary
patch: emit deflated binary patches (optionally)
|
|
5ca410b9
|
2014-04-23T07:13:49
|
|
Merge pull request #2283 from phkelley/win32_fs
Win32: UTF-8 <-> WCHAR conversion overhaul
|
|
7110000d
|
2014-04-22T10:21:19
|
|
React to feedback for UTF-8 <-> WCHAR and reparse work
|
|
37da3685
|
2014-04-22T21:51:54
|
|
Make checkout match diff for untracked/ignored dir
When diff finds an untracked directory, it emulates Git behavior
by looking inside the directory to see if there are any untracked
items inside it. If there are only ignored items inside the dir,
then diff considers it ignored, even if there is no direct ignore
rule for it.
Checkout was not copying this behavior - when it found an untracked
directory, it just treated it as untracked. Unfortunately, when
combined with GIT_CHECKOUT_REMOVE_UNTRACKED, this made is seem that
checkout (and stash, which uses checkout) was removing ignored
items when you had only asked it to remove untracked ones.
This commit moves the logic for advancing past an untracked dir
while scanning for non-ignored items into an iterator helper fn,
and uses that for both diff and checkout.
|
|
e349ed50
|
2014-04-22T14:58:33
|
|
patch: emit binary patches (optionally)
|
|
3c1aa4c1
|
2014-04-22T15:23:39
|
|
Failing test for stashing a buried ignored file
|
|
24d17de2
|
2014-04-02T12:07:27
|
|
Make stash and checkout ignore contained repos
To emulate git, stash should not remove untracked git repositories
inside the parent repo, and checkout's REMOVE_UNTRACKED should
also skip over these items.
`git stash` actually prints a warning message for these items.
That should be possible with a checkout notify callback if you
wanted to, although it would require a bit of extra logic as things
are at the moment.
|
|
8d09efa2
|
2014-04-22T12:33:27
|
|
Use git_diff_get_stats in example/diff + refactor
This takes the `--stat` and related example options in the example
diff.c program and converts them to use the `git_diff_get_stats`
API which nicely formats stats for you.
I went to add bar-graph scaling to the stats formatter and noticed
that the `git_diff_stats` structure was holding on to all of the
`git_patch` objects. Unfortunately, each of these objects keeps
the full text of the diff in memory, so this is very expensive. I
ended up modifying `git_diff_stats` to keep just the data that it
needs to keep and allowed it to release the patches. Then, I added
width scaling to the output on top of that.
In making the diff example program match 'git diff' output, I ended
up removing an newline from the sumamry output which I then had to
compensate for in the email formatting to match the expectations.
Lastly, I went through and refactored the tests to use a couple of
helper functions and reduce the overall amount of code there.
|
|
65477db1
|
2014-04-21T23:32:31
|
|
Handle win32 reparse points properly
|
|
bd101a7e
|
2014-04-21T11:54:54
|
|
Fix reset for staged deletes
|
|
f70cfd34
|
2014-04-21T17:49:38
|
|
Verify update_tips callbacks in push test cases
|
|
c2c81615
|
2014-04-19T18:05:31
|
|
Win32: UTF-8 <-> WCHAR conversion overhaul
|
|
7b0f8ba9
|
2014-04-19T13:05:32
|
|
Merge pull request #2279 from libgit2/rb/moar-eegnöre-fîxés
Fix several ignore and attribute file behavior bugs
|
|
916fcbd6
|
2014-04-18T14:42:40
|
|
Fix ignore difference from git with trailing /*
Ignore patterns that ended with a trailing '/*' were still needing
to match against another actual '/' character in the full path.
This is not the same behavior as core Git.
Instead, we strip a trailing '/*' off of any patterns that were
matching and just take it to imply the FNM_LEADING_DIR behavior.
|
|
e3a2a04c
|
2014-04-18T14:29:58
|
|
Preload attribute files that may contain macros
There was a latent bug where files that use macro definitions
could be parsed before the macro definitions were loaded. Because
of attribute file caching, preloading files that are going to be
used doesn't add a significant amount of overhead, so let's always
preload any files that could contain macros before we assemble the
actual vector of files to scan for attributes.
|
|
50e46d60
|
2014-04-18T10:58:01
|
|
Cleanup tests with helper functions
|
|
6a0956e5
|
2014-04-18T10:32:35
|
|
Pop ignore only if whole relative path matches
When traversing the directory structure, the iterator pushes and
pops ignore files using a vector. Some directories don't have
ignore files, so it uses a path comparison to decide when it is
right to actually pop the last ignore file. This was only
comparing directory suffixes, though, so a subdirectory with the
same name as a parent could result in the parent's .gitignore
being popped off the list ignores too early. This changes the
logic to compare the entire relative path of the ignore file.
|
|
386777fd
|
2014-04-18T09:26:38
|
|
Merge pull request #2213 from ethomson/safecrlf
Introduce core.safecrlf handling
|
|
8c1f4ab4
|
2014-04-09T12:26:53
|
|
config: refresh on delete
When we delete an entry, we also want to refresh the configuration to
catch any changes that happened externally.
This allows us to simplify the logic, as we no longer need to delete
these variables internally. The whole state will be refreshed and the
deleted entries won't be there.
|