Commit Graph

4004 Commits

Author SHA1 Message Date
Vicent Martí
f7e4a7c2d5 Merge pull request #1209 from ethomson/update_copyright
update copyrights
2013-01-08 15:34:55 -08:00
Edward Thomson
359fc2d241 update copyrights 2013-01-08 17:31:27 -06:00
Vicent Martí
d63dc61dd7 Merge pull request #1208 from ethomson/ppc_sha1_asm_deadness
remove ppc sha1 asm
2013-01-08 15:04:05 -08:00
Edward Thomson
8f09f46498 remove ppc sha1 asm 2013-01-08 16:55:16 -06:00
Vicent Martí
d4df288ddc Merge pull request #1207 from ethomson/cmake_comment_len_sanity
keep comments at < 80 chars
2013-01-08 14:41:25 -08:00
Edward Thomson
d335e73a6a keep comments at < 80 chars 2013-01-08 16:37:19 -06:00
Vicent Martí
368a2b4e3e Merge pull request #1204 from arrbee/diff-blob-to-buffer
Have diff blob to buffer share code (and add tests)
2013-01-07 18:33:50 -08:00
Russell Belfer
f2b7f7a6cb Share git_diff_blobs/git_diff_blob_to_buffer code
This moves the implementation of these two APIs into common code
that will be shared between the two.  Also, this adds tests for
the `git_diff_blob_to_buffer` API.  Lastly, this adds some extra
`const` to a few places that can use it.
2013-01-07 15:44:22 -08:00
Ignacio Casal Quinteiro
f6234cd994 Introduce git_diff_blob_to_buffer 2013-01-07 14:13:18 -08:00
Vicent Martí
7dfc5c3c6c Merge pull request #1203 from phkelley/reverse_dak
Revert changes from git/git diff-delta.c by dak@gnu.org, proski@gnu.org
2013-01-07 07:34:34 -08:00
Philip Kelley
8e89839d29 Merge pull request #1202 from martinwoodward/add-florian
Add Florian Forster to hall of fame
2013-01-07 07:06:18 -08:00
Philip Kelley
f6ed5e2d05 Revert changes from git/git diff-delta.c by dak@gnu.org, proski@gnu.org 2013-01-07 09:53:43 -05:00
Martin Woodward
32f59bfb18 Add Florian Forster to hall of fame
Permission recieved from Florian Forster on Jan 07 2013 to include
any changes of his from core Git into LibGit2.
2013-01-07 14:52:42 +00:00
Vicent Martí
05e9fc5835 Merge pull request #1200 from ethomson/merge_cleanup
merge cleanup should actually cleanup and the test should actually test
2013-01-06 18:56:40 -08:00
Edward Thomson
c31ae146b4 merge cleanup should actually cleanup and the test should actually test 2013-01-06 18:38:29 -06:00
Kevin Sawicki
7eb222fc7d Correct typos in documentation 2013-01-06 10:39:35 -08:00
Kevin Sawicki
e5562e181c Revert "Tab align value of GIT_FILEMODE_BLOB_EXECUTABLE"
This reverts commit 47fbcbb5a8.
2013-01-06 10:12:05 -08:00
Kevin Sawicki
47fbcbb5a8 Tab align value of GIT_FILEMODE_BLOB_EXECUTABLE 2013-01-06 10:02:37 -08:00
Vicent Martí
8b107c6770 Merge pull request #1198 from nulltoken/travis/run-valgrind-on-success
travis: Only run Valgrind when all tests pass
2013-01-06 09:12:02 -08:00
nulltoken
ced8eff1e5 travis: Only run Valgrind when all tests pass 2013-01-06 17:37:38 +01:00
Vicent Martí
5df7ad3ece Merge pull request #1196 from scunz/allow_clone_without_master_branch
Allow to clone repositories that don't have a `master` branch
2013-01-06 07:56:45 -08:00
Vicent Martí
74f880a639 Merge pull request #1197 from nulltoken/travis/run-online-tests
travis: Include the online suite when running against Travis
2013-01-06 07:56:08 -08:00
nulltoken
d01fe38061 reset: Fix a memory leak 2013-01-06 16:22:28 +01:00
nulltoken
b97fabfad5 tests: Fix some memory leaks 2013-01-06 16:22:24 +01:00
nulltoken
d1aee4775a clone: Fix a memory leak 2013-01-06 15:09:27 +01:00
nulltoken
09556895b7 travis: Include the online suite when running against Travis 2013-01-06 14:40:32 +01:00
Sascha Cunz
2ba6f3c7f1 Allow to clone repositories that don't have a master branch
Before this, we error out from `reference_matches_remote_head` if the
reference we're searching for does not exist.
Since we explicitly check if master is existing in `update_head_to_remote`
and error out if it doesn't, a repository without master branch could
not be cloned.
In fact this was later clobbered by what is fixed in #1194.

However, this patch introduces a `found` member in `head_info` and sets
it accordingly. That also saves us from checking the string length of
`branchname` a few times.
2013-01-06 14:30:52 +01:00
Vicent Martí
f9b4adbe54 Merge pull request #1194 from libgit2/dont-clobber-errors
git_mwindow_file_deregister() shouldn't return errors
2013-01-05 18:52:09 -08:00
Scott J. Goldman
f9b55bcb5f git_mwindow_file_deregister() shouldn't return errors
As a function that appears to only be called on error paths, I don't
think it makes sense for it to return an error, or clobber the global
giterr. Note that no existing callsites actually check the return
code.

In my own application, there are errors where the real error ends
up being hidden, as git_mwindow_file_deregister() clobbers the
global giterr. I'm not sure this error is even relevant?
2013-01-05 18:27:24 -08:00
Vicent Martí
d74b1bc529 Merge pull request #1131 from libgit2/correct-ahead-behind
Fix an issue with ahead-behind for lopsided traversal
2013-01-05 15:44:19 -08:00
Vicent Martí
2b7b3e1fae Merge pull request #1193 from libgit2/no-newline-packed-refs
Handle packed refs with no trailing newline
2013-01-05 04:30:24 -08:00
Scott J. Goldman
ef82ff30f6 Handle packed refs with no trailing newline
I saw a repo in the wild today which had a master branch ref which was packed, but had no trailing newline. Git handled it fine, but libgit2 choked on it. Fix seems simple enough. If we don't see a newline, assume the end of the buffer is the end of the ref line.
2013-01-05 00:46:39 -08:00
Vicent Martí
7511d8b42d Merge pull request #1192 from arrbee/fix-win32-checkout-test
Fix win32 checkout test
2013-01-04 17:28:09 -08:00
Russell Belfer
2f0895393d Actually fix win32 checkout test
It turns out that using REMOVE_UNTRACKED with checkout for this
particular test was causing the .gitattributes file to be removed
and so we do have to allow for the CRs in the created file...
2013-01-04 17:17:37 -08:00
Russell Belfer
bebdbcd442 Fix crlf issue with checkout tests
Move some checkout utility functions into a shared file and fix
some crlf filtering issues when verifying file contents.
2013-01-04 16:56:21 -08:00
Vicent Martí
7a68142e22 Merge pull request #1191 from maxpow4h/fix-format-string
Fixed size_t format string warning
2013-01-04 16:49:46 -08:00
Maxwell Swadling
79ff264e2f Fixed size_t format string warning 2013-01-05 11:34:19 +11:00
Vicent Martí
cfc7b835d6 Merge pull request #1118 from arrbee/fix-reset-hard
Fix checkout corner cases, index handling, and reset hard behavior
2013-01-04 16:14:49 -08:00
Russell Belfer
817d625161 Fix checkout of index-only dirs and prefixed paths
There are a couple of checkout bugs fixed here.  One is with
untracked working directory entries that are prefixes of tree
entries but not in a meaningful way (i.e. "read" is a prefix of
"readme.txt" but doesn't interfere in any way).  The second bug
is actually a redo of 07edfa0fc640f85f95507c3101e77accd7d2bf0d
where directory entries in the index that are not in the diff
were not being removed correctly.  That fix remedied one case
but broke another.
2013-01-04 15:47:44 -08:00
Russell Belfer
7fc0043582 Add index API to remove all files in a directory
This adds the git_index_remove_directory API plus tests.
2013-01-04 15:47:44 -08:00
Russell Belfer
1b88faf7ae Fix oid tostr issue with NULL oid
I made a small change to the behavior of this code and apparently
got it wrong. Sigh.
2013-01-04 15:47:44 -08:00
Russell Belfer
d8889d2b64 Fix checkout bug rmv untracked trees from index
When checking out with the GIT_CHECKOUT_REMOVE_UNTRACKED option
and there was an entire tree in the working directory and in the
index that is not in the baseline nor target commit, the tree was
correctly(?) removed from the working directory but was not
successfully removed from the index.  This fixes that and adds a
test of the functionality.
2013-01-04 15:47:44 -08:00
Russell Belfer
dde7602ae6 Fix memory leak with checkout tree iterator 2013-01-04 15:47:44 -08:00
Russell Belfer
0d70f65051 Fixing checkout UPDATE_ONLY and adding tests
This adds a bunch of new checkout tests and in the process I found
a bug in the GIT_CHECKOUT_UPDATE_ONLY flag which I fixed.
2013-01-04 15:47:44 -08:00
Russell Belfer
2850252af7 Oh yeah, bugs from my rebase 2013-01-04 15:47:44 -08:00
Russell Belfer
77cffa31db Simplify checkout documentation
This moves a lot of the detailed checkout documentation into a new
file (docs/checkout-internals.md) and simplifies the public docs
for the checkout API.
2013-01-04 15:47:43 -08:00
Russell Belfer
b3fb9237c2 Clone should use GIT_CHECKOUT_SAFE_CREATE
For clone to work as expected, it should be using a SAFE_CREATE
checkout (i.e. create files that are missing, even if the target
tree matches the current HEAD).
2013-01-04 15:47:43 -08:00
Russell Belfer
c50c58decd Extend tests for checkout with typechanges
Test a number of other cases, including intentionally forced
conflicts and deeper inspection that trees get created properly.

There is a still a bug in checkout because the first test here
(i.e. test_checkout_typechange__checkout_typechanges_safe) should
be able to pass with GIT_CHECKOUT_SAFE as a strategy, but it will
not because of some lingering submodule checkout issues.
2013-01-04 15:47:43 -08:00
Russell Belfer
e0548c0ea4 Fix some submodule and typechange checkout cases
There were a bunch of small bugs in the checkout code where I was
assuming that a typechange was always from a tree to a blob or
vice versa.  This fixes up most of those cases.  Also, there were
circumstances where the submodule definitions were changed by the
checkout and the submodule data was not getting reloaded properly
before the new submodules were checked out.
2013-01-04 15:47:43 -08:00
Russell Belfer
16a666d3d4 Fix workdir notifications and removals
The notifications were broken from the various iterations over
this code and were not returning working dir item data correctly.
Also, workdir items that were alphabetically after the last item
in diff were not being processed.
2013-01-04 15:47:43 -08:00