Edward Thomson
ba6b288426
revert: correct test that added trailing newline
2015-07-28 08:18:37 +02:00
Edward Thomson
9ff89eaaa1
merge_files: don't add trailing newlines
...
When invoked with three files that each lack a trailing newline,
the merge result should also lack a trailing newline.
2015-07-28 08:18:37 +02:00
Carlos Martín Nieto
f034c8518e
Merge pull request #3287 from ethomson/filter_test_cleanup
...
filter::stream: free the filter sanely
2015-07-02 17:55:16 +02:00
Edward Thomson
79306d8d59
filter::stream: free the filter sanely
...
Don't use the filter's free callback to free the actual data structure
holding the filter, as we may not always actually initialize it (the
test may be skipped).
2015-07-02 10:21:48 -05:00
Carlos Martín Nieto
e8e848a8da
submodule: add failing test for loading the wrong submodule
...
When two submodules are fairly similar, we may end up loading the wrong
one.
2015-07-01 21:14:55 +02:00
Carlos Martín Nieto
34065968ed
submodule: completely remove reload_all
...
The function was removed, but its declaration and changelog entry about
its removal were forgotten.
The comment in the test doesn't make any sense as the function doesn't
exist anymore, so get rid of it as well.
2015-07-01 17:49:07 +02:00
Edward Thomson
eb29292aed
index tests: add eol to avoid compiler warning
2015-06-30 14:31:07 +00:00
Edward Thomson
504b069701
checkout test: mark unused vars
2015-06-30 14:31:07 +00:00
Carlos Martín Nieto
7bfdd1c2d2
Merge pull request #3270 from ethomson/warnings2
...
Remove some warnings
2015-06-30 10:21:06 +02:00
Edward Thomson
64c415c2ae
checkout test: check getcwd return value
2015-06-29 22:34:00 +00:00
Edward Thomson
eadf37151b
clar: test chdir
2015-06-29 22:13:40 +00:00
Edward Thomson
d88abb8949
filter test: pass base type
2015-06-29 22:13:40 +00:00
Edward Thomson
0175971e91
stash: const up conflict params
2015-06-29 21:23:09 +00:00
Edward Thomson
2cf33fee89
index test: include repository.h for decl
2015-06-29 21:23:09 +00:00
Carlos Martín Nieto
c28a5c972d
submodule: remove trailing slashes from submodule paths
...
We allow looking up a submodule by path, but we lost the path
normalisation during the recent changes. Bring it back.
2015-06-29 21:10:47 +02:00
Carlos Martín Nieto
fa399750c6
Merge pull request #3265 from libgit2/leaks
...
Plug a bunch of leaks
2015-06-27 21:26:27 +02:00
Carlos Martín Nieto
92ec9ed328
Merge pull request #3260 from ethomson/apply_with_reflog_indices
...
stash: test we apply using reflog-like indices
2015-06-27 21:15:00 +02:00
Carlos Martín Nieto
24fa21f38e
index, iterator, fetchhead: plug leaks
2015-06-26 19:00:33 +02:00
Carlos Martín Nieto
afd8a94ee7
checkout: plug a few leaks
2015-06-26 18:49:39 +02:00
Carlos Martín Nieto
9568660f62
diff: fix leaks in diff printing
2015-06-26 18:31:39 +02:00
Carlos Martín Nieto
cfafeb843d
Merge pull request #3263 from git-up/fixes
...
Fixes
2015-06-26 18:11:05 +02:00
Edward Thomson
ee6eed5188
stash: test we apply using reflog-like indices
2015-06-26 11:48:48 -04:00
Carlos Martín Nieto
354268ca48
Merge pull request #3259 from ethomson/stash_apply_argh
...
Stash apply: stage new files even when not updating the index
2015-06-26 17:46:35 +02:00
Pierre-Olivier Latour
492851c9a2
Removed unused variables
2015-06-26 08:18:06 -07:00
Vicent Marti
13e5e344a6
test-diff-blob: Pass proper nibble sizes
2015-06-26 16:52:26 +02:00
Vicent Marti
a2f8d1ae2b
revparse: Add test to make sure this doesn't regress
2015-06-26 16:48:58 +02:00
Edward Thomson
619423f238
diff: test we don't update index unnecessarily
...
Test that workdir diffs, when presented with UPDATE_INDEX, only
write the index when they actually make a change.
2015-06-26 02:00:20 -04:00
Edward Thomson
c0280bdd15
Merge pull request #3255 from libgit2/cmn/rename-unspecified
...
Rename FALLBACK to UNSPECIFIED
2015-06-25 18:55:48 -04:00
Edward Thomson
b7f5cb8dd7
stash: stage new files when unstashing them
...
Files that were new (staged additions) in the stash tree should
be staged when unstashing, even when not applying the index.
2015-06-25 18:34:38 -04:00
Edward Thomson
82b1c93d08
stash: don't allow apply with staged changes
2015-06-25 18:34:36 -04:00
Edward Thomson
1db6a0ab52
stash apply: add a newly staged file to tests
2015-06-25 18:33:56 -04:00
Edward Thomson
3b66c6a397
Merge pull request #3256 from libgit2/cmn/fetch-spec-fetchhead
...
remote: insert refspecs with no rhs in FETCH_HEAD
2015-06-25 15:36:53 -04:00
Edward Thomson
87987fd1e0
Merge pull request #3246 from libgit2/cmn/dont-grow-borrowed
...
Don't allow growing borrowed buffers
2015-06-25 15:26:43 -04:00
Carlos Martín Nieto
23aa7c9037
remote: insert refspecs with no rhs in FETCH_HEAD
...
When a refspec contains no rhs and thus won't cause an explicit update,
we skip all the logic, but that means that we don't update FETCH_HEAD
with it, which is what the implicit rhs is.
Add another bit of logic which puts those remote heads in the list of
updates so we put them into FETCH_HEAD.
2015-06-25 13:40:38 +02:00
Carlos Martín Nieto
c2418f4613
Rename FALLBACK to UNSPECIFIED
...
Fallback describes the mechanism, while unspecified explains what the
user is thinking.
2015-06-25 12:48:44 +02:00
Carlos Martín Nieto
a65992355d
buffer: make use of EINVALID for growing a borrowed buffer
...
This explains more closely what happens. While here, set an error
message.
2015-06-24 23:49:10 +02:00
Carlos Martín Nieto
caab22c0d4
buffer: don't allow growing borrowed buffers
...
When we don't own a buffer (asize=0) we currently allow the usage of
grow to copy the memory into a buffer we do own. This muddles the
meaning of grow, and lets us be a bit cavalier with ownership semantics.
Don't allow this any more. Usage of grow should be restricted to buffers
which we know own their own memory. If unsure, we must not attempt to
modify it.
2015-06-24 23:49:10 +02:00
Carlos Martín Nieto
daacf96d10
Merge pull request #3097 from libgit2/cmn/submodule-config-state
...
Remove run-time configuration settings from submodules
2015-06-24 23:34:40 +02:00
Carlos Martín Nieto
9d5efab89f
Merge pull request #3254 from ethomson/diff-binary-patch
...
Handle binary DIFFABLEness properly
2015-06-24 21:13:23 +02:00
Carlos Martín Nieto
c2f274c69e
Merge pull request #3250 from ethomson/stash
...
Stash workdir correctly when added in the index, modified in the workdir
2015-06-24 19:47:34 +02:00
Edward Thomson
ba8fb7c46a
diff::binary tests: empty diff when forced binary
...
Ensure that even when we're forcing a binary diff that we do not
assume that there *is* a diff. There should be an empty diff for
no change.
2015-06-24 11:39:59 -04:00
Carlos Martín Nieto
76633215d1
binary diff: test that the diff and patch otputs are the same
...
We test the generation of the textual patch via the patch function,
which are just one of two possibilities to get the output.
Add a second patch generation via the diff function to make sure both
outputs are in sync.
2015-06-24 14:33:02 +02:00
Pierre-Olivier Latour
8113056c7a
Fixed Xcode 6.1 build warnings
2015-06-23 20:57:09 -07:00
Edward Thomson
cc605e73ac
Merge pull request #3222 from git-up/conflicted
...
Fixed GIT_DELTA_CONFLICTED not returned in some cases
2015-06-23 23:52:03 -04:00
Edward Thomson
bd670abd23
Merge pull request #3226 from libgit2/cmn/racy-diff-again
...
racy-git, the missing link
2015-06-23 23:30:58 -04:00
Edward Thomson
14304b0e87
stash tests: ensure we save the workdir file
...
Ensure that when a file is added in the index and subsequently
modified in the working directory, the stashed working directory
tree contains the actual working directory contents.
2015-06-23 18:17:24 -04:00
Carlos Martín Nieto
16c73d3804
repository: check the format version
...
This is something we do on re-init but not when opening a
repository. This hasn't particularly mattered up to now as the version
has been 0 ever since the first release of git, but the times, they're
a-changing and we will soon see version 1 in the wild. We need to make
sure we don't open those.
2015-06-23 20:44:27 +02:00
Pierre-Olivier Latour
8d8a2eefef
Fixed GIT_DELTA_CONFLICTED not returned in some cases
...
If an index entry for a file that is not in HEAD is in conflicted state,
when diffing HEAD with the index, the status field of the corresponding git_diff_delta was incorrectly reported as GIT_DELTA_ADDED instead of GIT_DELTA_CONFLICTED.
This was due to handle_unmatched_new_item() initially setting the status
to GIT_DELTA_CONFLICTED but then overriding it later with GIT_DELTA_ADDED.
2015-06-23 07:48:26 -07:00
Pierre-Olivier Latour
cb63e7e897
Explicitly handle GIT_DELTA_CONFLICTED in git_diff_merge()
...
This fixes a bug where if a file was in conflicted state in either diff,
it would not always remain in conflicted state in the merged diff.
2015-06-22 21:37:41 -07:00
Edward Thomson
1e46d54584
crlf tests: ensure that Unix obeys autocrlf=true
...
All platforms do terrible, horrible, no good, very bad translation
when core.autocrlf=true. It's not just Windows!
2015-06-22 12:00:26 -04:00