Commit Graph

6644 Commits

Author SHA1 Message Date
Russell Belfer
240f4af321 Add build option for diff internal statistics 2014-05-02 09:21:32 -07:00
Vicent Marti
6a1ca96e41 Temporary fix for Travis CI builds
See https://github.com/libgit2/libgit2/pull/2321#issuecomment-42039673
We may rollback once we found something more reliable
2014-05-02 17:14:33 +02:00
Vicent Marti
89e9c1674c Merge pull request #2318 from linquize/sleep
Make examples/status.c compile on Windows
2014-05-02 03:37:40 -07:00
Vicent Marti
644592bc73 Merge pull request #2320 from libgit2/rb/fix-starstar-again
Make ** pattern eat trailing slash
2014-05-02 03:36:22 -07:00
Russell Belfer
d19b2f9f9f Make ** pattern eat trailing slash
This allows "foo/**/*.html" to match "foo/file.html"
2014-05-01 12:46:46 -07:00
Linquize
d0420fc681 Make examples/status.c compile on Windows 2014-05-01 22:39:35 +08:00
Vicent Marti
9d878fc420 Merge pull request #2304 from jacquesg/solaris
Solaris!
2014-05-01 01:23:10 -07:00
Jacques Germishuys
183aa4f831 Check for NULL before passing it to vsnprintf 2014-04-30 22:58:40 +02:00
Jacques Germishuys
6b05240cea strcasecmp is in <strings.h> 2014-04-30 17:05:13 +02:00
Jacques Germishuys
98b8fcff4f Build regex.c for Solaris. Added required defines for Solaris 2014-04-30 17:05:13 +02:00
Vicent Marti
c522bed0af Merge pull request #2314 from libgit2/cmn/known-libs
Assorted CMake fixups
2014-04-30 05:45:31 -07:00
Vicent Marti
739040e667 Merge pull request #2315 from jacquesg/qsort-cygwin
cygwin also doesn't have qsort_r
2014-04-30 05:34:33 -07:00
Jacques Germishuys
90a4340aaa cygwin also doesn't have qsort_r 2014-04-30 13:17:15 +02:00
Carlos Martín Nieto
039e354b7d ciscript: don't use an empty string as a number
An empty string is not a valid number, and some shells complain.

Check instead if $COVERITY is non-empty, which is a common convention
and what we're doing anyway.
2014-04-30 12:02:10 +02:00
Carlos Martín Nieto
891b0277af refs: document _next_name()
If it's not documented, it doesn't show up in the docs (and we really
should document, anyway).
2014-04-30 11:20:51 +02:00
Carlos Martín Nieto
f5fc63bc0c Don't exclude libssh2 from MinGW
It reportedly works. It does not however work when cross-compiling on
Travis, so let's disable it there.

This fixes #2311.
2014-04-30 11:15:41 +02:00
Ting-Wei Lan
096ac799a3 Workaround missing .pc files on FreeBSD
This fixes #2118
2014-04-30 10:51:44 +02:00
Carlos Martín Nieto
04739e9f4a Unquiet CMake output
The point of this phase is to know what we have and not. Show the user a
clear indication of what we have.
2014-04-30 10:15:44 +02:00
Vicent Marti
892778ee84 Merge pull request #2309 from jacquesg/midnightbsd
MidnightBSD may also not have strnlen
2014-04-29 05:02:38 -07:00
Jacques Germishuys
36a6151833 MidnightBSD may also not have strnlen 2014-04-29 13:28:16 +02:00
Vicent Marti
041336e6bd Merge pull request #2306 from odcinek/development_cmake
Make the build CMake 2.6 compatible
2014-04-28 07:36:27 -07:00
Marcin Sawicki
7f0de93a0d Make the build CMake 2.6 compatible 2014-04-28 15:24:36 +01:00
Vicent Marti
ec77105889 Merge pull request #2301 from libgit2/cmn/pack-objects-memory
Keep the deflate buffer from ballooning up
2014-04-27 03:57:53 -07:00
Carlos Martín Nieto
38d338b2b8 pack-objects: always write out the status in write_one()
Make sure we set the output parameter to a value.
2014-04-26 18:15:39 +02:00
Carlos Martín Nieto
c7f86efb13 zstream: grow based on used memory rather than allocated
When deflating data, we might need to grow the buffer. Currently we
add a guess on top of the currently-allocated buffer size.

When we re-use the buffer, it already has some memory allocated; adding
to that means that we always grow the buffer regardless of how much we
need to use.

Instead, increase on top of the currently-used size. This still leaves
us with the allocated size of the largest object we compress, but it's a
minor pain compared to unbounded growth.

This fixes #2285.
2014-04-26 18:04:43 +02:00
Carlos Martín Nieto
4f9d54146d refdb: fix typo and wording 2014-04-26 14:29:18 +02:00
Vicent Marti
e79a2998cb Merge pull request #2299 from mekishizufu/fix_leaks
Plug some leaks
2014-04-25 07:08:41 -07:00
Jiri Pospisil
7b8d564d5d Reset tests: Use sandboxed index 2014-04-25 15:49:58 +02:00
Jiri Pospisil
424222f415 Filter: Make sure to release local on error 2014-04-25 15:49:26 +02:00
Vicent Marti
8443ed6c1d Merge pull request #2284 from jacquesg/push-progress-callback
Fire progress and update tips callbacks also for pushes.
2014-04-25 02:10:19 -07:00
Vicent Marti
332e4f2027 Merge pull request #2297 from libgit2/rb/status-with-precomposed-changes
Improve test coverage of status with different core.precomposeunicode settings
2014-04-25 02:07:42 -07:00
Vicent Marti
2ad51b81d2 Merge pull request #2241 from libgit2/rb/stash-skip-submodules
Improve stash and checkout for ignored + untracked items
2014-04-25 02:04:12 -07:00
Russell Belfer
af9eeac939 Merge pull request #2294 from ethomson/merge_checkout_strategy
Merge checkout strategy
2014-04-24 16:20:08 -07:00
Russell Belfer
6b833e3a4a Improve docs for status rename detection limits
and make tests empty on platforms without iconv support.
2014-04-24 15:40:50 -07:00
Russell Belfer
f608f3bb27 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.
2014-04-24 15:25:01 -07:00
Russell Belfer
2334e3d8c3 Test decomposed unicode renames work as expected 2014-04-24 14:46:59 -07:00
Russell Belfer
a409acefbb Handle explicitly ignored dir slightly differently
When considering status of untracked directories, if we find an
explicitly ignored item, even if it is a directory, treat the
parent as an IGNORED item.  It was accidentally being treated as
an EMPTY item because we were not looking into the ignored subdir.
2014-04-24 11:59:50 -07:00
Vicent Marti
87c9b741df Merge pull request #2295 from libgit2/cmn/fetchhead-quote
fetchhead: deal with quotes in branch names
2014-04-24 05:24:46 -07:00
Carlos Martín Nieto
bdc82e1c00 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.
2014-04-24 14:08:29 +02:00
Edward Thomson
a4e2c36a66 merge: checkout default shouldn't clobber given 2014-04-23 19:43:35 -04:00
Edward Thomson
26564d80aa merge: default checkout strategy for should be SAFE 2014-04-23 19:42:50 -04:00
Russell Belfer
219c89d19d Treat ignored, empty, and untracked dirs different
In the iterator, distinguish between ignores and empty directories
so that diff and status can ignore empty directories, but checkout
and stash can treat them as untracked items.
2014-04-23 16:28:45 -07:00
Vicent Marti
212b6205d7 Merge pull request #2291 from ethomson/patch_binary
patch: emit deflated binary patches (optionally)
2014-04-23 09:27:15 -07:00
Vicent Marti
5ca410b9a9 Merge pull request #2283 from phkelley/win32_fs
Win32: UTF-8 <-> WCHAR conversion overhaul
2014-04-23 07:13:49 -07:00
Philip Kelley
7110000dd5 React to feedback for UTF-8 <-> WCHAR and reparse work 2014-04-23 09:23:50 -04:00
Vicent Marti
5b58d6f78c Merge pull request #2289 from libgit2/rb/note-git-diff-index-behavior
Some doc and examples/diff.c changes
2014-04-23 03:21:05 -07:00
Russell Belfer
37da368545 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.
2014-04-22 21:51:54 -07:00
Edward Thomson
e349ed500b patch: emit binary patches (optionally) 2014-04-22 19:08:21 -05:00
Russell Belfer
3c1aa4c110 Failing test for stashing a buried ignored file 2014-04-22 15:23:43 -07:00
Russell Belfer
24d17de255 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.
2014-04-22 15:23:43 -07:00