Commit Graph

868 Commits

Author SHA1 Message Date
nulltoken
e4aa7f58fe refs: cover git_reference_name_to_oid() unfound behavior 2012-12-01 08:34:26 +01:00
nulltoken
80d9d1df14 refs: Deploy EINVALIDSPEC usage 2012-12-01 08:34:26 +01:00
nulltoken
47261d9c8a tests: drop unused variables 2012-12-01 08:34:25 +01:00
nulltoken
032ba9e4ad remote: deploy EINVALIDSPEC usage 2012-12-01 08:34:23 +01:00
nulltoken
3da73c40fc Fix compilation warnings 2012-12-01 08:34:21 +01:00
Ben Straub
0ab3a2ab2c Deploy GIT_INIT_STRUCTURE 2012-11-30 20:34:50 -08:00
Ben Straub
1071176900 Deploy versioned git_transport structure 2012-11-30 13:12:15 -08:00
Ben Straub
79cfa20d60 Deploy GIT_STATUS_OPTIONS_INIT 2012-11-30 13:12:15 -08:00
Ben Straub
b4d136527c Deploy GIT_REPOSITORY_INIT_OPTIONS_INIT 2012-11-30 13:12:15 -08:00
Ben Straub
9267ff586f Deploy GIT_REMOTE_CALLBACKS_INIT 2012-11-30 13:12:15 -08:00
Ben Straub
55f6f21b7d Deploy versioned git_odb_backend structure 2012-11-30 13:12:15 -08:00
Ben Straub
ca901e7b0f Deploy GIT_DIFF_FIND_OPTIONS_INIT 2012-11-30 13:12:15 -08:00
Ben Straub
2f8d30becb Deploy GIT_DIFF_OPTIONS_INIT 2012-11-30 13:12:14 -08:00
Ben Straub
6917762139 Deploy git_config_backend version 2012-11-30 13:12:14 -08:00
Ben Straub
b81aa2f1de Deploy GIT_CHECKOUT_OPTS_INIT 2012-11-30 13:12:14 -08:00
Ben Straub
f4fc9fdba0 Cleanup nitpicky things 2012-11-30 13:12:10 -08:00
Ben Straub
bde336ea51 Add version fields and init macros for public input structs. 2012-11-30 12:55:45 -08:00
Russell Belfer
f684970a10 Merge pull request #1108 from libgit2/ahead-behind-count
Add API to calculate ahead/behind count
2012-11-29 22:53:34 -08:00
Scott J. Goldman
1a0c5a34e0 Fixup ahead/behind tests
Fix a typo that caused a failing test, and use cl_assert_equal
instead of cl_assert.
2012-11-29 18:11:30 -08:00
Russell Belfer
d5e44d8498 Fix function name and add real error check
`revwalk.h:commit_lookup()` -> `git_revwalk__commit_lookup()`
and make `git_commit_list_parse()` do real error checking that
the item in the list is an actual commit object.  Also fixed an
apparent typo in a test name.
2012-11-29 17:02:27 -08:00
Vicent Martí
f1e5c506b2 Merge pull request #1110 from libgit2/features/push_rebased
Push! By schu, phkelley, and congyiwu
2012-11-29 12:18:05 -08:00
Philip Kelley
36c730daa0 Remove more sample hooks from test repo for push 2012-11-29 10:34:16 -05:00
Philip Kelley
3238ee3e07 Remove sample hooks from test repo for push 2012-11-29 08:37:32 -05:00
Philip Kelley
ac22d08f2f Remove git_object_oid2type 2012-11-29 08:22:15 -05:00
Vicent Martí
e2934db2c7 Merge pull request #1090 from arrbee/ignore-invalid-by-default
Ignore invalid entries by default
2012-11-29 02:05:46 -08:00
Vicent Martí
ee06fec507 Merge pull request #1083 from nulltoken/fix/tracking
Fix git_branch_tracking() for branches with empty merge and/or remote config entries
2012-11-29 01:29:50 -08:00
Vicent Martí
2775d1cb8f Merge pull request #1102 from nulltoken/topic/fetch-test-coverage
fetch: enhance test coverage
2012-11-29 01:02:08 -08:00
Vicent Martí
3ae550e36c Merge pull request #1107 from nulltoken/fix/diff-null-tree-against-workdir
Enhance diff test coverage between a null Tree and the Workdir
2012-11-29 01:01:44 -08:00
Scott J. Goldman
0984c8768d Rename git_count_ahead_behind -> git_graph_ahead_behind
Moved it into graph.{c,h} which i created for the new "graph"
functions namespace. Also adjusted the function prototype
to use `size_t` and `const git_oid *`.
2012-11-28 18:54:57 -08:00
Scott J. Goldman
0d9e0323a5 Add the ahead/behind test that Carlos suggested
Adds a repo with a more complex topology to test the ahead-behind
count.
2012-11-28 18:54:57 -08:00
Scott J. Goldman
eddde61846 Add tests for ahead-behind count 2012-11-28 18:54:57 -08:00
nulltoken
046a1573ff fetch: enhance test coverage 2012-11-29 00:05:16 +01:00
nulltoken
59a0d772f8 diff: enhance test coverage against the workdir 2012-11-28 20:04:34 +01:00
nulltoken
37849a8ec3 tracking: fix retrieval of the tracking ref of branch with empty merge and/or remote entry 2012-11-28 20:00:07 +01:00
nulltoken
f1bd50d61d tracking: remove code duplication in test 2012-11-28 20:00:06 +01:00
nulltoken
35108a216e Fix MSVC compilation warning 2012-11-28 19:37:31 +01:00
Russell Belfer
7bf87ab698 Consolidate text buffer functions
There are many scattered functions that look into the contents of
buffers to do various text manipulations (such as escaping or
unescaping data, calculating text stats, guessing if content is
binary, etc).  This groups all those functions together into a
new file and converts the code to use that.

This has two enhancements to existing functionality.  The old
text stats function is significantly rewritten and the BOM
detection code was extended (although largely we can't deal with
anything other than a UTF8 BOM).
2012-11-28 09:58:48 -08:00
Philip Kelley
613d5eb939 Push! By schu, phkelley, and congyiwu, et al 2012-11-28 11:42:37 -05:00
Russell Belfer
c3fb7d04ed Make git_odb_foreach_cb take const param
This makes the first OID param of the ODB callback a const pointer
and also propogates that change all the way to the backends.
2012-11-27 15:00:49 -08:00
Russell Belfer
2bd5998c9c Remove git_note_data structure 2012-11-27 14:47:39 -08:00
Ben Straub
cb7ac81c4d Fix warning 2012-11-27 13:30:04 -08:00
Ben Straub
df705148ec API updates for remote.h
Includes typedef for git_direction, and renames for
GIT_DIR_[FETCH|PUSH] to GIT_DIRECTION_(\1).
2012-11-27 13:19:49 -08:00
Russell Belfer
a8122b5d4a Fix warnings on Win64 build 2012-11-27 13:18:29 -08:00
Russell Belfer
16248ee2d1 Fix up some missing consts in tree & index
This fixes some missed places where we can apply const-ness to
various public APIs.

There are still some index and tree APIs that cannot take const
pointers because we sort our `git_vectors` lazily and so we can't
reliably bsearch the index and tree content without applying a
`git_vector_sort()` first.

This also fixes some missed places where size_t can be used and
where const can be applied to a couple internal functions.
2012-11-27 13:18:29 -08:00
Ben Straub
f45d51ff8e API updates for index.h 2012-11-27 13:18:28 -08:00
Russell Belfer
d9023dbe0c API updates for tag.h 2012-11-27 13:18:28 -08:00
Russell Belfer
9cd423583f API updates for submodule.h 2012-11-27 13:18:28 -08:00
Russell Belfer
793c438559 Update diff callback param order
This makes the diff functions that take callbacks both take
the payload parameter after the callback function pointers and
pass the payload as the last argument to the callback function
instead of the first.  This should make them consistent with
other callbacks across the API.
2012-11-27 13:18:28 -08:00
Ben Straub
54b2a37ac7 Clean up config.h 2012-11-27 13:18:28 -08:00
Russell Belfer
e120123e36 API review / update for tree.h 2012-11-27 13:18:28 -08:00
Vicent Marti
cfbe4be3fb More external API cleanup
Conflicts:
	src/branch.c
	tests-clar/refs/branches/create.c
2012-11-27 13:18:27 -08:00
Ben Straub
2508cc66eb Rename ref and reflog apis for consistency 2012-11-27 13:17:45 -08:00
Vicent Martí
c4d8df27bc Merge pull request #1097 from nulltoken/topic/head_tree_error
Make `git_repository_head_tree()` return error codes
2012-11-23 15:19:47 -08:00
Sascha Cunz
9094d30b93 Reset all static variables to NULL in clar's __cleanup
Without this change, any failed assertion in the second (or a later) test
inside a test suite has a chance of double deleting memory, resulting in
a heap corruption. See #1096 for details.

This leaves alone the test cases where we "just" use cl_git_sandbox_init()
and cl_git_sandbox_cleanup(). These methods already take good care to not
double delete a repository.

Fixes #1096
2012-11-23 11:41:56 +01:00
nulltoken
5cec896a3b repo: Make git_repository_head_tree() return error codes 2012-11-22 18:51:06 +01:00
nulltoken
a94002a983 test: Minor fixes 2012-11-22 18:50:50 +01:00
Philip Kelley
5cf1b4f094 Call git_remote_update_tips before git_remote_disconnect 2012-11-22 11:16:35 -05:00
Eduardo Bart
e566b609df Update clar tests p_lstat_posixly and p_lstat 2012-11-20 00:57:56 -02:00
Russell Belfer
d46b0a04c7 Improve iterator ignoring .git file
The workdir iterator has always tried to ignore .git files, but
it turns out there were some bugs.  This makes it more robust at
ignoring .git files.

This also makes iterators always check ".git" case insensitively
regardless of the properties of the system.  This will make libgit2
skip ".GIT" and the like.  This is different from core git, but on
systems with case insensitive but case preserving file systems,
allowing ".GIT" to be added is problematic.
2012-11-19 16:34:44 -08:00
Russell Belfer
02df42ddbf Set up default internal ignores
This adds "." ".." and ".git" to the internal ignores list by
default - asking about paths with these files will always say
that they are ignored.
2012-11-19 16:33:30 -08:00
Scott J. Goldman
1876360f81 Add a test for invalid filenames while writing tree from index 2012-11-18 16:59:42 -08:00
Scott J. Goldman
19af78bb36 Prevent creating .., ., and .git with tree builder
As per core git.
2012-11-18 15:15:24 -08:00
Michael Schubert
0066955d97 Fix a couple of warnings 2012-11-18 04:27:49 +01:00
nulltoken
b15df1d937 reflog: make entry_byindex() and drop() git compliant
Passing 0 as the index now retrieves the most recent entry instead
of the oldest one.
2012-11-17 18:30:35 -08:00
nulltoken
270160b91a config: Opening a nonexistent file returns ENOTFOUND 2012-11-17 18:30:34 -08:00
nulltoken
6091457e76 repo: ensure is_empty() checks there are no refs 2012-11-17 07:20:08 -08:00
nulltoken
f5a0e734bc tests: introduce cl_git_remove_placeholders() 2012-11-17 07:20:07 -08:00
nulltoken
5df7207a67 repo: readonly tests don't need a sandboxed repo 2012-11-17 07:20:04 -08:00
nulltoken
0e95e70a55 env: ensure git_futils_find_xxx() returns ENOTFOUND 2012-11-17 05:41:22 -08:00
nulltoken
aa8a76eff9 tag: rename git_tag_type to git_tag_target_type 2012-11-17 05:41:20 -08:00
nulltoken
86b9dbc12f Fix MSVC compilation warnings 2012-11-17 05:13:13 -08:00
Vicent Martí
e087973ec7 Merge pull request #1075 from carlosmn/alternates-recurse
odb: recursively load alternates
2012-11-16 10:27:46 -08:00
Carlos Martín Nieto
85e7efa163 odb: recursively load alternates
The maximum depth is 5, like in git
2012-11-16 08:46:02 -08:00
Scott J. Goldman
0cd063fd87 Merge pull request #1071 from arrbee/alternate-fix-strcmp
Win32 fixes for diff/checkout/reset
2012-11-15 23:28:52 -08:00
Russell Belfer
bbe6dbec81 Add explicit git_index ptr to diff and checkout
A number of diff APIs and the `git_checkout_index` API take a
`git_repository` object an operate on the index.  This updates
them to take a `git_index` pointer explicitly and only fall back
on the `git_repository` index if the index input is NULL.  This
makes it easier to operate on a temporary index.
2012-11-14 23:29:48 -08:00
Russell Belfer
bad68c0a99 Add iterator for git_index object
The index iterator could previously only be created from a repo
object, but this allows creating an iterator from a `git_index`
object instead (while keeping, though renaming, the old function).
2012-11-14 22:55:40 -08:00
Russell Belfer
5735bf5e6a Fix diff API to better parameter order
The diff API is not in the parameter order one would expect from
other libgit2 APIs.  This fixes that.
2012-11-14 22:54:31 -08:00
Russell Belfer
402b92cfe9 Fix reset hard tests on platforms with CRLF
The reset hard tests had hardcoded expected file content and was
not correctly compensating for CRLF filtering when a file needed
to be reverted by the reset hard.  This fixes that.
2012-11-14 22:44:17 -08:00
Russell Belfer
cccacac555 Add POSIX compat lstat() variant for win32
The existing p_lstat implementation on win32 is not quite POSIX
compliant when setting errno to ENOTDIR.  This adds an option to
make is be compliant so that code (such as checkout) that cares
to have separate behavior for ENOTDIR can use it portably.

This also contains a couple of other minor cleanups in the
posix_w32.c implementations to avoid unnecessary work.
2012-11-14 22:41:51 -08:00
Vicent Martí
513e794ef4 Merge pull request #1068 from carlosmn/config-empty-value
Deal with empty and nonexsitent values in config
2012-11-13 14:59:18 -08:00
Carlos Martín Nieto
0da81d2b39 config: return an emtpy string when there is no value
Returning NULL for the string when we haven't signaled an error
condition is counter-intuitive and causes unnecessary edge
cases. Return an empty string when asking for a string value for a
configuration variable such as '[section] var' to avoid these edge
cases.

If the distinction between no value and an empty value is needed, this
can be retrieved from the entry directly. As a side-effect, this
change stops the int parsing functions from segfaulting on such a
variable.
2012-11-13 14:49:16 -08:00
Vicent Martí
aa1c3b588e Merge pull request #1016 from arrbee/fix-checkout-dir-removal
Update checkout with new strategies & behavior
2012-11-13 14:13:47 -08:00
Carlos Martín Nieto
47db054df0 config: distinguish between a lone variable name and one without rhs
'[section] variable' and '[section] variable =' behave differently
when parsed as booleans, so we need to store that distinction
internally.
2012-11-13 13:53:41 -08:00
Carlos Martín Nieto
3ee078c0f7 config: rename get_config_entry -> config_entry
We're already in the git_config namespace, there is no need to repeat
it.
2012-11-13 13:46:17 -08:00
Edward Thomson
603bee0791 Remove git_hash_ctx_new - callers now _ctx_init() 2012-11-13 10:23:05 -06:00
Edward Thomson
d6fb092409 Win32 CryptoAPI and CNG support for SHA1 2012-11-13 10:23:05 -06:00
Ben Straub
e45423dd2c Merge pull request #1065 from nulltoken/fix/memory-leak
Fix memory leaks
2012-11-13 05:45:08 -08:00
Michael Schubert
d51e54f1f4 Remove unused variables 2012-11-13 14:28:44 +01:00
nulltoken
4e547eee31 test: fix memory leak 2012-11-13 07:12:53 +01:00
Vicent Marti
9a50026b19 clar-helpers: Oops, grab pointer 2012-11-12 15:38:28 -08:00
Vicent Marti
19c044a17d Merge remote-tracking branch 'ben/local-transport' into development 2012-11-12 14:23:17 -08:00
nulltoken
b1a3a70ed1 repository: Refine repository_head() error report 2012-11-12 00:14:51 +01:00
nulltoken
ef8871515b Fix compilation warning 2012-11-12 00:13:02 +01:00
Edward Thomson
b0f6e45d14 create FETCH_HEAD specially instead of as a ref file 2012-11-11 11:56:33 -06:00
Vicent Martí
d18713fb4a Merge pull request #1056 from nulltoken/duplicate-tree-entries
Duplicate tree entries
2012-11-10 20:24:53 -08:00
nulltoken
33f95a9b32 index: refine add_from_workdir() error report 2012-11-10 21:01:05 +01:00
nulltoken
69c068c79f index: make git_index_new() work with a NULL path 2012-11-10 20:42:45 +01:00
nulltoken
353e991679 tests: Add missing assertions 2012-11-10 16:43:05 +01:00
Ben Straub
2ff1a0d0f0 Helpers for local-filesystem remote URLs 2012-11-09 16:59:46 -08:00
Russell Belfer
757b406504 Fix warnings and valgrind issues
This fixes some various warnings that showed up in Travis and
a couple uses of uninitialized memory and one memory leak.
2012-11-09 14:01:44 -08:00
Russell Belfer
8064ecba23 Update reset hard test
The `git_reset` API with the HARD option is still slightly
broken, but this test now does exercise the ability of the
command to revert modified files.
2012-11-09 13:52:07 -08:00
Russell Belfer
ad9a921b92 Rework checkout with new strategy options
This is a major reworking of checkout strategy options.  The
checkout code is now sensitive to the contents of the HEAD tree
and the new options allow you to update the working tree so that
it will match the index content only when it previously matched
the contents of the HEAD.  This allows you to, for example, to
distinguish between removing files that are in the HEAD but not
in the index, vs just removing all untracked files.

Because of various corner cases that arise, etc., this required
some additional capabilities in rmdir and other utility functions.

This includes the beginnings of an implementation of code to read
a partial tree into the index based on a pathspec, but that is
not enabled because of the possibility of creating conflicting
index entries.
2012-11-09 13:52:07 -08:00
Russell Belfer
18eff2ad70 Clean up a couple things missed in rebase 2012-11-09 13:52:07 -08:00
Russell Belfer
32def5af9a Fix checkout behavior when its hands are tied
So, @nulltoken created a failing test case for checkout that
proved to be particularly daunting.  If checkout is given only
a very limited strategy mask (e.g. just GIT_CHECKOUT_CREATE_MISSING)
then it is possible for typechange/rename modifications to leave it
unable to complete the request.  That's okay, but the existing code
did not have enough information not to generate an error (at least
for tree/blob conflicts).

This led me to a significant reorganization of the code to handle
the failing case, but it has three benefits:

1. The test case is handled correctly (I think)
2. The new code should actually be much faster than the old code
   since I decided to make checkout aware of diff list internals.
3. The progress value accuracy is hugely increased since I added
   a fourth pass which calculates exactly what work needs to be
   done before doing anything.
2012-11-09 13:52:06 -08:00
Russell Belfer
331e7de900 Extensions to rmdir and mkdir utilities
* Rework GIT_DIRREMOVAL values to GIT_RMDIR flags, allowing
  combinations of flags
* Add GIT_RMDIR_EMPTY_PARENTS flag to remove parent dirs that
  are left empty after removal
* Add GIT_MKDIR_VERIFY_DIR to give an error if item is a file,
  not a dir (previously an EEXISTS error was ignored, even for
  files) and enable this flag for git_futils_mkpath2file call
* Improve accuracy of error messages from git_futils_mkdir
2012-11-09 13:52:06 -08:00
nulltoken
55f9837f11 config: make git_config_open_level() work with an empty config 2012-11-09 21:49:50 +01:00
Ben Straub
11fabe73a0 Local fetch: add tests 2012-11-09 10:33:10 -08:00
Ben Straub
505da062b8 Implement local transport's fetch 2012-11-09 10:33:05 -08:00
nulltoken
f92bcaea49 index: prevent tree creation from a non merged state
Fix libgit2/libgit2sharp#243
2012-11-09 16:45:47 +01:00
nulltoken
7cc1bf0fcb index: Introduce git_index_has_conflicts() 2012-11-08 21:16:48 +01:00
nulltoken
29cc374d2e tree: enforce coverage of silent entry replacement 2012-11-08 21:16:45 +01:00
delanne
bcad677ba8 - Update 'tests-clar/resources/config/config11' in order to reproduce the invalidread with the unittest (just added some \n at the end of the file)
- Fix config_file.c
2012-11-08 12:28:21 +01:00
Vicent Martí
8ff2b0c759 Merge pull request #1039 from erikvanzijst/erik/tag_without_message
Correctly parse tags lacking a description
2012-11-07 16:30:55 -08:00
Russell Belfer
a5e85d86b7 Merge pull request #1046 from libgit2/empty-remote-url-crash
Bail out of remote loading if the URL would be NULL
2012-11-05 11:06:50 -08:00
Justin Spahr-Summers
6edefa1491 Revert "Don't expect the 'empty-remote-url' remote to be listed"
Apparently git_remote_list() includes even remotes for which git_remote_load() would fail. Sorry @nulltoken, false alarm.

This reverts commit f358ec143c.
2012-11-05 10:58:13 -08:00
Justin Spahr-Summers
f358ec143c Don't expect the 'empty-remote-url' remote to be listed
CC @nulltoken
2012-11-05 10:45:26 -08:00
Justin Spahr-Summers
1fe99aeea3 Test for GITERR_INVALID 2012-11-05 10:44:48 -08:00
Russell Belfer
065be7a1d9 Merge pull request #1044 from dahlbyk/repo/state
Fix state when HEAD is not detached
2012-11-05 10:44:21 -08:00
Vicent Martí
942a76983b Merge pull request #1034 from carlosmn/packbuilder-foreach
Let the user grab the packfile as it's being written
2012-11-05 06:54:34 -08:00
nulltoken
a2a618948c remote: Add malformed remote load test 2012-11-04 23:08:17 -08:00
Keith Dahlby
35d255fda6 repo: fix state when HEAD is not detached 2012-11-04 12:13:42 -06:00
Erik van Zijst
6bb9fea13e tags: Fixed the tag parser to correctly treat the message field as optional.
This fix makes libgit2 capable of parsing annotated tag objects that lack
the optional message/description field.
Previously, libgit2 treated this field as mandatory and raised a tag_error on
such tags. However, the message field is optional.

An example of such a tag is refs/tags/v2.6.16.31-rc1 in Linux:

$ git cat-file tag refs/tags/v2.6.16.31-rc1
object afaa018cefb6af63befef1df7d8febaae904434f
type commit
tag v2.6.16.31-rc1
tagger Adrian Bunk <bunk@stusta.de> 1162716505 +0100
$
2012-11-02 10:28:17 -07:00
Vicent Martí
1362a98316 Merge pull request #1014 from arrbee/diff-rename-detection
Initial implementation of diff rename detection
2012-11-02 10:00:28 -07:00
Vicent Martí
d13da328e2 Merge pull request #1038 from arrbee/doc-fixes
Improve docs, examples, warnings
2012-11-01 14:18:40 -07:00
Russell Belfer
b90500f03d Improve docs, examples, warnings
This improves docs in some of the public header files, cleans
up and improves some of the example code, and fixes a couple
of pedantic warnings in places.
2012-11-01 14:08:30 -07:00
Vicent Marti
43eeca04a7 index: Fix tests 2012-11-01 20:24:43 +01:00
Vicent Martí
7ae73e94db Merge pull request #1030 from pwkelley/transports
Reorganize transport architecture
2012-11-01 09:15:29 -07:00
Philip Kelley
e068f2bb71 Fix a bug in cl_setenv on Windows XP 2012-11-01 11:50:08 -04:00
Philip Kelley
41fb1ca0ec Reorganize transport architecture (squashed 3) 2012-11-01 09:02:33 -04:00
Carlos Martín Nieto
3dfed9cb86 packbuilder: add git_packbuilder_foreach
Let the user get each object as a buffer+size pair so they can handle
the packfile content as they need to.
2012-11-01 06:21:49 +01:00
Russell Belfer
744cc03e2b Add git_config_refresh() API to reload config
This adds a new API that allows users to reload the config if the
file has changed on disk.  A new config callback function to
refresh the config was added.

The modified time and file size are used to test if the file needs
to be reloaded (and are now stored in the disk backend object).

In writing tests, just using mtime was a problem / race, so I
wanted to check file size as well.  To support that, I extended
`git_futils_readbuffer_updated` to optionally check file size in
addition to mtime, and I added a new function `git_filebuf_stats`
to fetch the mtime and size for an open filebuf (so that the
config could be easily refreshed after a write).

Lastly, I moved some similar file checking code for attributes
into filebuf.  It is still only being used for attrs, but it
seems potentially reusable, so I thought I'd move it over.
2012-10-30 12:11:23 -07:00
Vicent Martí
efde422553 Merge pull request #1017 from arrbee/diff-patch-to-str
Add git_diff_patch_to_str API
2012-10-30 12:04:28 -07:00
Vicent Martí
c4a9ded0f9 Merge pull request #1026 from nulltoken/repo/state
repo: enhance git_repository_state() detection
2012-10-30 12:03:22 -07:00
Vicent Martí
6c21358a89 Merge pull request #1029 from ethomson/index_refactor
Index changes
2012-10-30 11:51:58 -07:00
Michael Schubert
6cfbbf7e32 Fix a couple of warnings 2012-10-30 18:50:59 +01:00
Russell Belfer
db106d01f0 Move rename detection into new file
This improves the naming for the rename related functionality
moving it to be called `git_diff_find_similar()` and renaming
all the associated constants, etc. to make more sense.

I also moved the new code (plus the existing `git_diff_merge`)
into a new file `diff_tform.c` where I can put new functions
related to manipulating git diff lists.

This also updates the implementation significantly from the
last revision fixing some ordering issues (where break-rewrite
needs to be handled prior to copy and rename detection) and
improving config option handling.
2012-10-30 09:40:50 -07:00
Edward Thomson
f45ec1a076 index refactoring 2012-10-29 20:04:21 -05:00
Ben Straub
81eecc342b Fetch: don't clobber received count
This memset was being reached after the entire packfile under
WinHttp, so the byte count was being lost for small repos.
2012-10-29 13:34:14 -07:00
nulltoken
31966d20e3 repo: enhance git_repository_state() detection 2012-10-27 16:45:59 +02:00
nulltoken
00e161b977 tests: fix a memory leak 2012-10-27 11:43:48 +02:00
nulltoken
e4c64cf2aa stash: add git_stash_drop() 2012-10-26 22:11:15 +02:00
nulltoken
233884131d stash: add git_stash_foreach() 2012-10-26 22:11:09 +02:00
nulltoken
590fb68be0 stash: add git_stash_save() 2012-10-26 22:10:48 +02:00
nulltoken
1f87fa3595 reflog: fix bogus removal of reflog entries 2012-10-26 21:02:01 +02:00
nulltoken
65d12df525 message: reorganize tests 2012-10-26 21:01:58 +02:00
Russell Belfer
1b9346897b Merge pull request #925 from nulltoken/topic/moving-branch-updates-config
Updates config upon moving and deletion of branches
2012-10-25 10:55:03 -07:00
Ben Straub
1fc375e6ef Fix Windows build
Pedantic ordering of GIT_UNUSED vs. variable declarations.
2012-10-25 09:02:55 -07:00
nulltoken
fcccf3045f remote: introduce git_remote_rename() 2012-10-25 17:42:36 +02:00
nulltoken
3a14d3e2bc buf: introduce git_buf_splice() 2012-10-25 17:42:35 +02:00
nulltoken
e497b16c57 remote: prevent from saving a nameless remote 2012-10-25 17:42:33 +02:00