]> git.proxmox.com Git - libgit2.git/log
libgit2.git
11 years agotests-clar: ifdef GIT_WIN32 win helper functions
Michael Schubert [Thu, 24 Jan 2013 19:38:01 +0000 (20:38 +0100)]
tests-clar: ifdef GIT_WIN32 win helper functions

11 years agoMerge pull request #1277 from sba1/branch-name
Vicent Martí [Fri, 25 Jan 2013 04:45:00 +0000 (20:45 -0800)]
Merge pull request #1277 from sba1/branch-name

Add git_branch_name()

11 years agoAdded git_branch_name().
Sebastian Bauer [Thu, 24 Jan 2013 19:44:17 +0000 (20:44 +0100)]
Added git_branch_name().

This is a convenience function to get the branch name of a given
ref. The returned branch name is compatible with the name that can
be supplied e.g. to git_branch_lookup(). That is, the prefixes
"refs/heads" or "refs/remotes" are omitted.

Also added a new test for testing the new function.

11 years agoindex: Speed up loading a tree into the index
Scott J. Goldman [Fri, 25 Jan 2013 02:53:08 +0000 (18:53 -0800)]
index: Speed up loading a tree into the index

The index is empty; repeated tree entries cannot collide.

cc github/gitrpc#83

11 years agoLeak cleanup in push tests
Philip Kelley [Thu, 24 Jan 2013 19:04:35 +0000 (14:04 -0500)]
Leak cleanup in push tests

11 years agoMerge pull request #1250 from jamill/push_update_tips
Philip Kelley [Thu, 24 Jan 2013 19:03:11 +0000 (11:03 -0800)]
Merge pull request #1250 from jamill/push_update_tips

Update remote tips on push

11 years agoMerge pull request #1275 from ethomson/examples_windows
Vicent Martí [Wed, 23 Jan 2013 23:55:29 +0000 (15:55 -0800)]
Merge pull request #1275 from ethomson/examples_windows

update examples to work on windows

11 years agoupdate examples to work on windows
Edward Thomson [Wed, 23 Jan 2013 23:38:00 +0000 (17:38 -0600)]
update examples to work on windows

11 years agoopts: Some basic tests
Vicent Marti [Wed, 23 Jan 2013 23:09:55 +0000 (00:09 +0100)]
opts: Some basic tests

11 years agoopts: Add getters too
Vicent Marti [Wed, 23 Jan 2013 22:44:34 +0000 (23:44 +0100)]
opts: Add getters too

11 years agoMerge pull request #1273 from sba1/example-diff-fix
Vicent Martí [Wed, 23 Jan 2013 07:03:53 +0000 (23:03 -0800)]
Merge pull request #1273 from sba1/example-diff-fix

Don't clear the opt instance in the diff example.

11 years agoDon't clear the opt instance in the diff example.
Sebastian Bauer [Wed, 23 Jan 2013 06:47:40 +0000 (07:47 +0100)]
Don't clear the opt instance in the diff example.

The version field is overwritten otherwise. The opt instance is
already initialized properly.

11 years agoMerge pull request #1271 from libgit2/global-settings
Vicent Martí [Wed, 23 Jan 2013 02:55:56 +0000 (18:55 -0800)]
Merge pull request #1271 from libgit2/global-settings

Global options setter

11 years agoGlobal options setter
Vicent Marti [Wed, 23 Jan 2013 01:58:58 +0000 (02:58 +0100)]
Global options setter

11 years agoMerge pull request #1270 from libgit2/packed-peeled-objects-fix
Russell Belfer [Wed, 23 Jan 2013 00:02:43 +0000 (16:02 -0800)]
Merge pull request #1270 from libgit2/packed-peeled-objects-fix

Allow peeled references without trailing newline at end of file

11 years agoSeperate out a new test that verifies packed-refs with no trailing newline
Scott J. Goldman [Wed, 23 Jan 2013 00:01:03 +0000 (16:01 -0800)]
Seperate out a new test that verifies packed-refs with no trailing newline

as per @vmg's request

11 years agoAllow peeled references without trailing newline at end of file
Scott J. Goldman [Tue, 22 Jan 2013 23:49:51 +0000 (15:49 -0800)]
Allow peeled references without trailing newline at end of file

Also ammends one of the tag tests to make sure it's working.

11 years agoMerge pull request #1269 from arrbee/tree-iterator-case-sensitivity-bug
Vicent Martí [Tue, 22 Jan 2013 23:31:44 +0000 (15:31 -0800)]
Merge pull request #1269 from arrbee/tree-iterator-case-sensitivity-bug

Fix case sensitivity bug with tree iterators

11 years agoFix case sensitivity bug with tree iterators
Russell Belfer [Tue, 22 Jan 2013 23:28:25 +0000 (15:28 -0800)]
Fix case sensitivity bug with tree iterators

With the new code to make tree iterators support ignore_case,
there is a bug in setting the start entry for range bounded
iterators where memcmp was being used instead of strncasecmp.
This fixes that and expands the tree iterator test to cover
the cases that were broken.

11 years agoRevert "Handle packed peeled objects without trailing newlines"
Scott J. Goldman [Tue, 22 Jan 2013 22:08:50 +0000 (14:08 -0800)]
Revert "Handle packed peeled objects without trailing newlines"

This reverts commit 28b1cdf3a1bdcd37cf9d550c92b8c19b1782ea6b.

//cc #1262 #1267

11 years agoMerge pull request #1268 from phkelley/development
Vicent Martí [Tue, 22 Jan 2013 17:20:09 +0000 (09:20 -0800)]
Merge pull request #1268 from phkelley/development

A simple perf optimization in pack-objects.c

11 years agoUpdate remote tips on push
Jameson Miller [Thu, 17 Jan 2013 15:20:33 +0000 (10:20 -0500)]
Update remote tips on push

11 years agoFix gen_pktline format specifier for Win32
Philip Kelley [Tue, 22 Jan 2013 14:25:15 +0000 (09:25 -0500)]
Fix gen_pktline format specifier for Win32

11 years agoA simple perf optimization in pack-objects.c
Philip Kelley [Tue, 22 Jan 2013 13:21:08 +0000 (08:21 -0500)]
A simple perf optimization in pack-objects.c

11 years agoMerge pull request #1267 from libgit2/no-newline
Vicent Martí [Mon, 21 Jan 2013 23:09:38 +0000 (15:09 -0800)]
Merge pull request #1267 from libgit2/no-newline

Handle packed peeled objects without trailing newlines

11 years agoHandle packed peeled objects without trailing newlines
Scott J. Goldman [Mon, 21 Jan 2013 22:45:43 +0000 (14:45 -0800)]
Handle packed peeled objects without trailing newlines

Fixes #1262

11 years agoMerge pull request #1266 from arrbee/update-clar
Vicent Martí [Mon, 21 Jan 2013 21:41:35 +0000 (13:41 -0800)]
Merge pull request #1266 from arrbee/update-clar

Update clar to a80e7f30

11 years agoUpdate clar to a80e7f30
Russell Belfer [Mon, 21 Jan 2013 21:39:53 +0000 (13:39 -0800)]
Update clar to a80e7f30

11 years agoMerge pull request #1265 from arrbee/parse-commit-time-as-uint64
Vicent Martí [Mon, 21 Jan 2013 21:23:13 +0000 (13:23 -0800)]
Merge pull request #1265 from arrbee/parse-commit-time-as-uint64

Parse commit time as uint64_t to avoid overflow

11 years agoParse commit time as uint64_t to avoid overflow
Russell Belfer [Mon, 21 Jan 2013 21:19:41 +0000 (13:19 -0800)]
Parse commit time as uint64_t to avoid overflow

The commit time is already stored as a git_time_t, but we were
parsing is as a uint32_t.  This just switches the parser to use
uint64_t which will handle dates further in the future (and adds
some tests of those future dates).

11 years agocommit: don't include the LF in the header field value
Carlos Martín Nieto [Sun, 20 Jan 2013 03:20:09 +0000 (04:20 +0100)]
commit: don't include the LF in the header field value

When the encoding header changed to be treated as an additional
header, the EOL pointer started to point to the byte after the LF,
making the git__strndup call copy the LF into the value.

Increase the EOL pointer value after copying the data to keep the rest
of the semantics but avoid copying LF.

11 years agoFix compilation on OpenBSD
Carlos Martín Nieto [Sun, 20 Jan 2013 00:57:32 +0000 (01:57 +0100)]
Fix compilation on OpenBSD

11 years agoMerge pull request #1260 from phkelley/development
Philip Kelley [Fri, 18 Jan 2013 20:05:10 +0000 (12:05 -0800)]
Merge pull request #1260 from phkelley/development

Fix really bad error handling in git_smart__negotiate_fetch

11 years agoFix really bad error handling in git_smart__negotiate_fetch
Philip Kelley [Fri, 18 Jan 2013 19:51:46 +0000 (14:51 -0500)]
Fix really bad error handling in git_smart__negotiate_fetch

11 years agoMerge pull request #1258 from zcbenz/fix_index_remove_test
Vicent Martí [Fri, 18 Jan 2013 06:09:57 +0000 (22:09 -0800)]
Merge pull request #1258 from zcbenz/fix_index_remove_test

Fix linking error caused by ddcb28a41f3774e26fc6ae0a7174a5565e4749ce.

11 years agoFix linking error caused by ddcb28a41f3774e26fc6ae0a7174a5565e4749ce.
Zhao Cheng [Fri, 18 Jan 2013 05:22:55 +0000 (13:22 +0800)]
Fix linking error caused by ddcb28a41f3774e26fc6ae0a7174a5565e4749ce.

11 years agoMerge pull request #1239 from ethomson/index_remove
Vicent Martí [Fri, 18 Jan 2013 00:56:57 +0000 (16:56 -0800)]
Merge pull request #1239 from ethomson/index_remove

add an index_remove_bypath that removes conflicts

11 years agoMerge pull request #1256 from arrbee/asciify-test-data
Vicent Martí [Fri, 18 Jan 2013 00:33:40 +0000 (16:33 -0800)]
Merge pull request #1256 from arrbee/asciify-test-data

Move all non-ascii test data to raw hex

11 years agoMerge pull request #1257 from ethomson/crlf_test_fix
Vicent Martí [Fri, 18 Jan 2013 00:32:46 +0000 (16:32 -0800)]
Merge pull request #1257 from ethomson/crlf_test_fix

add a git config, don't run crlf tests on non-win32

11 years agoadd a git config, don't run crlf tests on non-win32
Edward Thomson [Fri, 18 Jan 2013 00:18:44 +0000 (18:18 -0600)]
add a git config, don't run crlf tests on non-win32

11 years agoMove all non-ascii test data to raw hex
Russell Belfer [Thu, 17 Jan 2013 23:47:10 +0000 (15:47 -0800)]
Move all non-ascii test data to raw hex

This takes all of the characters in core::env and makes them use
hex sequences instead of keeping tricky character data inline in
the test.

11 years agoMerge pull request #1244 from carlosmn/pack-evict
Vicent Martí [Thu, 17 Jan 2013 21:45:52 +0000 (13:45 -0800)]
Merge pull request #1244 from carlosmn/pack-evict

A comparison of eviction algorithms for the delta base cache

11 years agoMerge pull request #1247 from sba1/dont-segfault-if-transport-doesnt-support-push
Ben Straub [Thu, 17 Jan 2013 21:37:32 +0000 (13:37 -0800)]
Merge pull request #1247 from sba1/dont-segfault-if-transport-doesnt-support-push

Don't segfault if transport doesn't support push.

11 years agoMerge pull request #1255 from arrbee/fix-signed-commit-header-parsing
Vicent Martí [Thu, 17 Jan 2013 21:36:33 +0000 (13:36 -0800)]
Merge pull request #1255 from arrbee/fix-signed-commit-header-parsing

Add skipping of unknown commit headers

11 years agoMerge pull request #1254 from ethomson/index_filtered_size
Vicent Martí [Thu, 17 Jan 2013 21:34:20 +0000 (13:34 -0800)]
Merge pull request #1254 from ethomson/index_filtered_size

cache should contain on-disk (filtered) file size

11 years agoTest that pushs properly fail for transports that don't provide a push implementation.
Sebastian Bauer [Thu, 17 Jan 2013 21:27:04 +0000 (22:27 +0100)]
Test that pushs properly fail for transports that don't provide a push implementation.

11 years agoAdd skipping of unknown commit headers
Russell Belfer [Thu, 17 Jan 2013 21:19:09 +0000 (13:19 -0800)]
Add skipping of unknown commit headers

This moves the check for the "encoding" header into a loop which
is just scanning for non-required headers at the end of a commit
header.  That loop will skip unrecognized lines (including header
continuation lines) until a terminating completely blank line is
found, and only then does it move to reading the commit message.

11 years agocache should contain on-disk (filtered) file size
Edward Thomson [Thu, 17 Jan 2013 19:11:57 +0000 (13:11 -0600)]
cache should contain on-disk (filtered) file size

11 years agoDon't segfault if transport doesn't support push.
Sebastian Bauer [Tue, 15 Jan 2013 20:39:37 +0000 (21:39 +0100)]
Don't segfault if transport doesn't support push.

Instead, set an more informative error message.

11 years agoMerge pull request #1211 from arrbee/fix-icase-status-file
Vicent Martí [Wed, 16 Jan 2013 23:52:58 +0000 (15:52 -0800)]
Merge pull request #1211 from arrbee/fix-icase-status-file

Fix case insensitivity issues in git_status_file

11 years agoMerge pull request #1248 from sba1/doc-fix
Vicent Martí [Wed, 16 Jan 2013 22:20:41 +0000 (14:20 -0800)]
Merge pull request #1248 from sba1/doc-fix

Some doc improvements in transport.h

11 years agoMerge pull request #1245 from nulltoken/topic/git_branch_tracking_name
Vicent Martí [Wed, 16 Jan 2013 22:17:48 +0000 (14:17 -0800)]
Merge pull request #1245 from nulltoken/topic/git_branch_tracking_name

Introduce git_branch_tracking_name()

11 years agobranch: Introduce git_branch_tracking_name()
nulltoken [Mon, 14 Jan 2013 13:22:11 +0000 (14:22 +0100)]
branch: Introduce git_branch_tracking_name()

11 years agoFix indentations
nulltoken [Mon, 14 Jan 2013 11:09:10 +0000 (12:09 +0100)]
Fix indentations

11 years agoSome doc improvements
Sebastian Bauer [Wed, 16 Jan 2013 11:25:28 +0000 (12:25 +0100)]
Some doc improvements

11 years agoShortcut spool and sort for empty iterator
Russell Belfer [Thu, 10 Jan 2013 19:11:42 +0000 (11:11 -0800)]
Shortcut spool and sort for empty iterator

11 years agoSupport case insensitive tree iterators and status
Russell Belfer [Thu, 10 Jan 2013 00:07:54 +0000 (16:07 -0800)]
Support case insensitive tree iterators and status

This makes tree iterators directly support case insensitivity by
using a secondary index that can be sorted by icase.  Also, this
fixes the ambiguity check in the git_status_file API to also be
case insensitive.  Lastly, this adds new test cases for case
insensitive range boundary checking for all types of iterators.

With this change, it should be possible to deprecate the spool
and sort iterator, but I haven't done that yet.

11 years agoAdd git_tree_entry_cmp and git_tree_entry_icmp
Russell Belfer [Thu, 10 Jan 2013 00:03:35 +0000 (16:03 -0800)]
Add git_tree_entry_cmp and git_tree_entry_icmp

This adds a new external API git_tree_entry_cmp and a new internal
API git_tree_entry_icmp for sorting tree entries.  The case
insensitive one is internal only because general users should
never be seeing case-insensitively sorted trees.

11 years agoAdd git_path_icmp to case-insensitive path cmp
Russell Belfer [Thu, 10 Jan 2013 00:02:42 +0000 (16:02 -0800)]
Add git_path_icmp to case-insensitive path cmp

This adds git_path_icmp to complement git_path_cmp.

11 years agoAdd payload "_r" versions of bsearch and tsort
Russell Belfer [Thu, 10 Jan 2013 00:00:16 +0000 (16:00 -0800)]
Add payload "_r" versions of bsearch and tsort

git__bsearch and git__tsort did not pass a payload through to the
comparison function.  This makes it impossible to implement sorted
lists where the sort order depends on external data (e.g. building
a secondary sort order for the entries in a tree).  This commit
adds git__bsearch_r and git__tsort_r versions that pass a third
parameter to the cmp function of a user payload.

11 years agoTest for ignore_case ranges on workdir iterator
Russell Belfer [Tue, 8 Jan 2013 23:56:11 +0000 (15:56 -0800)]
Test for ignore_case ranges on workdir iterator

This adds a test that confirms that the working directory iterator
can actually correctly process ranges of files case insensitively
with proper sorting and proper boundaries.

11 years agoUpdate iterator API with flags for ignore_case
Russell Belfer [Tue, 8 Jan 2013 23:53:13 +0000 (15:53 -0800)]
Update iterator API with flags for ignore_case

This changes the iterator API so that flags can be passed in to
the constructor functions to control the ignore_case behavior.
At this point, the flags are not supported on tree iterators (i.e.
there is no functional change over the old API), but the API
changes are all made to accomodate this.

By the way, I went with a flags parameter because in the future
I have a couple of other ideas for iterator flags that will make
it easier to fix some diff/status/checkout bugs.

11 years agoFix err msg for ambiguous path in git_status_file
Russell Belfer [Tue, 8 Jan 2013 21:45:06 +0000 (13:45 -0800)]
Fix err msg for ambiguous path in git_status_file

Returning GIT_EAMBIGUOUS from inside the status callback gets
overridden with GIT_EUSER.  `git_status_file` accounted for this
via the callback payload, but was allowing the error message to
be cleared.  Move the `giterr_set` call outside the callback to
where the EUSER case was being dealt with.

11 years agoMinor iterator API cleanups
Russell Belfer [Tue, 8 Jan 2013 21:39:15 +0000 (13:39 -0800)]
Minor iterator API cleanups

In preparation for further iterator changes, this cleans up a few
small things in the iterator API:

* removed the git_iterator_for_repo_index_range API
* made git_iterator_free not be inlined
* minor param name and test function name tweaks

11 years agoSimplify git_diff__paired_foreach icase handling
Russell Belfer [Tue, 8 Jan 2013 21:27:25 +0000 (13:27 -0800)]
Simplify git_diff__paired_foreach icase handling

11 years agostatus: Enhance git_status_file() test coverage
nulltoken [Sat, 5 Jan 2013 19:58:25 +0000 (20:58 +0100)]
status: Enhance git_status_file() test coverage

11 years agoMerge pull request #1238 from nulltoken/fix/checkout-index
Russell Belfer [Tue, 15 Jan 2013 17:46:50 +0000 (09:46 -0800)]
Merge pull request #1238 from nulltoken/fix/checkout-index

checkout: Teach checkout to cope with orphaned Head

11 years agoMerge pull request #1242 from sba1/init-with-template-fix
Russell Belfer [Mon, 14 Jan 2013 18:05:35 +0000 (10:05 -0800)]
Merge pull request #1242 from sba1/init-with-template-fix

Some fixes for external template support

11 years agopack: evict all of the pages at once
Carlos Martín Nieto [Mon, 14 Jan 2013 16:42:12 +0000 (17:42 +0100)]
pack: evict all of the pages at once

Somewhat surprisingly, this can increase the speed considerably, as we
don't bother trying to decide what to evict, and the most used entries
are quickly back into the cache.

11 years agopack: evict objects from the cache in groups of eight
Carlos Martín Nieto [Mon, 14 Jan 2013 15:39:22 +0000 (16:39 +0100)]
pack: evict objects from the cache in groups of eight

This drops the cache eviction below libcrypto and zlib in the perf
output. The number has been chosen empirically.

11 years agoAltered the description of the template.
Sebastian Bauer [Sun, 13 Jan 2013 11:21:52 +0000 (12:21 +0100)]
Altered the description of the template.

Before, it was identical to the default template making it difficult
to check, if the proper template was copied an external template
test.

11 years agoNow checks in the template test whether the description file has
Sebastian Bauer [Sun, 13 Jan 2013 11:23:30 +0000 (12:23 +0100)]
Now checks in the template test whether the description file has
been properly copied.

This is a minimal effort to test whether the template really has
been used when creating an repo with external templates.

11 years agoDo not use GIT_CPDIR_CHMOD flag when copying the template.
Sebastian Bauer [Sun, 13 Jan 2013 10:30:05 +0000 (11:30 +0100)]
Do not use GIT_CPDIR_CHMOD flag when copying the template.

This is an intermin solution. While this essentially disables the
--shared flag feature, previously external templates did not work
at all. This change fixes the previously corrected, and since
then failing, repo_init__extended_with_template() test.

The problem is now documented in the source code comments.

11 years agoFix Travis compilation warnings
nulltoken [Sat, 12 Jan 2013 18:37:14 +0000 (19:37 +0100)]
Fix Travis compilation warnings

11 years agocheckout: Teach checkout to cope with orphaned Head
nulltoken [Sat, 12 Jan 2013 18:27:31 +0000 (19:27 +0100)]
checkout: Teach checkout to cope with orphaned Head

Fix #1236

11 years agoadd an index_remove_bypath that removes conflicts, renamed add_from_workdir to match
Edward Thomson [Sat, 12 Jan 2013 19:47:56 +0000 (13:47 -0600)]
add an index_remove_bypath that removes conflicts, renamed add_from_workdir to match

11 years agoClear local error variable after invoking giterr_clear().
Sebastian Bauer [Sat, 12 Jan 2013 19:02:00 +0000 (20:02 +0100)]
Clear local error variable after invoking giterr_clear().

11 years agopack: fixes to the cache
Carlos Martín Nieto [Sat, 12 Jan 2013 18:31:07 +0000 (19:31 +0100)]
pack: fixes to the cache

The offset should be git_off_t, and we should check the return value
of the mutex lock function.

11 years agotests: plug leaks
Carlos Martín Nieto [Sat, 12 Jan 2013 18:01:45 +0000 (19:01 +0100)]
tests: plug leaks

11 years agoindexer: properly free the packfile resources
Carlos Martín Nieto [Sat, 12 Jan 2013 17:38:19 +0000 (18:38 +0100)]
indexer: properly free the packfile resources

The indexer needs to call the packfile's free function so it takes care of
freeing the caches.

We still need to close the mwf descriptor manually so we can rename the
packfile into its final name on Windows.

11 years agoAdded flag GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE to test_repo_init__extended_with_tem...
Sebastian Bauer [Sat, 12 Jan 2013 17:44:50 +0000 (18:44 +0100)]
Added flag GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE to test_repo_init__extended_with_template().

Otherwise the template functionallity is not tested (as a TODO we
also shall test that the specified template really got copied).

11 years agoMerge pull request #1222 from scunz/clone_branch
Vicent Martí [Sat, 12 Jan 2013 10:14:14 +0000 (02:14 -0800)]
Merge pull request #1222 from scunz/clone_branch

Switch to specified branch during clone

11 years agoDefault git_clone_options' checkout strategy to GIT_CHECKOUT_SAFE_CREATE
Sascha Cunz [Sat, 12 Jan 2013 04:51:00 +0000 (05:51 +0100)]
Default git_clone_options' checkout strategy to GIT_CHECKOUT_SAFE_CREATE

11 years agobuf: Is this the function you were looking for?
Vicent Marti [Sat, 12 Jan 2013 00:40:35 +0000 (01:40 +0100)]
buf: Is this the function you were looking for?

11 years agoKill vestigal dangling-remote code
Ben Straub [Sat, 12 Jan 2013 04:23:46 +0000 (20:23 -0800)]
Kill vestigal dangling-remote code

Fixes #1232

11 years agoMerge pull request #1215 from phkelley/binaryunicode
Philip Kelley [Sat, 12 Jan 2013 01:16:55 +0000 (17:16 -0800)]
Merge pull request #1215 from phkelley/binaryunicode

Add a failing test for CRLF filters

11 years agoFix up binaryunicode test repo
Philip Kelley [Sat, 12 Jan 2013 00:00:19 +0000 (19:00 -0500)]
Fix up binaryunicode test repo

11 years agoTests: Add test for check out of given branch during clone
Sascha Cunz [Fri, 11 Jan 2013 23:08:48 +0000 (00:08 +0100)]
Tests: Add test for check out of given branch during clone

11 years agoTest: Cleanup some cleaning code
Sascha Cunz [Fri, 11 Jan 2013 23:07:44 +0000 (00:07 +0100)]
Test: Cleanup some cleaning code

11 years agoCheck for binary blobs in checkout
Russell Belfer [Thu, 10 Jan 2013 23:59:36 +0000 (15:59 -0800)]
Check for binary blobs in checkout

This adds a git_buf_text_is_binary check to blobs before applying
filters when the blob data is being written to disk.

11 years agoMerge pull request #1230 from arrbee/match-core-git-diff-binary-detection
Vicent Martí [Fri, 11 Jan 2013 19:35:09 +0000 (11:35 -0800)]
Merge pull request #1230 from arrbee/match-core-git-diff-binary-detection

Match binary file check of core git in diff

11 years agoMerge pull request #1229 from arrbee/fix-diff-patch-line-numbers
Vicent Martí [Fri, 11 Jan 2013 19:34:13 +0000 (11:34 -0800)]
Merge pull request #1229 from arrbee/fix-diff-patch-line-numbers

Fix diff patch line number calculation

11 years agoMatch binary file check of core git in diff
Russell Belfer [Fri, 11 Jan 2013 19:24:26 +0000 (11:24 -0800)]
Match binary file check of core git in diff

Core git just looks for NUL bytes in files when deciding about
is-binary inside diff (although it uses a better algorithm in
checkout, when deciding if CRLF conversion should be done).
Libgit2 was using the better algorithm in both places, but that
is causing some confusion.  For now, this makes diff just look
for NUL bytes to decide if a file is binary by content in diff.

11 years agoFix diff patch line number calculation
Russell Belfer [Fri, 11 Jan 2013 19:20:44 +0000 (11:20 -0800)]
Fix diff patch line number calculation

This was just wrong.  Added a test that verifying patch line
numbers even for hunks further into a file and then fixed the
algorithm.  I needed to add a little extra state into the patch
so that I could track old and new file numbers independently,
but it should be okay.

11 years agoRevert "pack: packfile_free -> git_packfile_free and use it in the indexers"
Carlos Martín Nieto [Fri, 11 Jan 2013 19:15:06 +0000 (20:15 +0100)]
Revert "pack: packfile_free -> git_packfile_free and use it in the indexers"

This reverts commit f289f886cb81bb570bed747053d5ebf8aba6bef7, which
makes the tests fail on Windows. Revert until we can figure out a
solution.

11 years agoMerge pull request #1227 from nulltoken/topic/emergeconflict
Vicent Martí [Fri, 11 Jan 2013 18:59:31 +0000 (10:59 -0800)]
Merge pull request #1227 from nulltoken/topic/emergeconflict

Introduce EMERGECONFLICT

11 years agoFix MSVC Clar compilation warnings
nulltoken [Fri, 11 Jan 2013 14:39:14 +0000 (15:39 +0100)]
Fix MSVC Clar compilation warnings

11 years agoFix MSVC compilation warnings
nulltoken [Fri, 11 Jan 2013 13:40:09 +0000 (14:40 +0100)]
Fix MSVC compilation warnings

11 years agocheckout: Deploy EMERGECONFLICT usage
nulltoken [Thu, 10 Jan 2013 22:27:13 +0000 (23:27 +0100)]
checkout: Deploy EMERGECONFLICT usage

11 years agoerrors: Introduce EMERGECONFLICT error code
nulltoken [Thu, 10 Jan 2013 11:11:49 +0000 (12:11 +0100)]
errors: Introduce EMERGECONFLICT error code