Commit Graph

8634 Commits

Author SHA1 Message Date
Russell Sim
df12d29ae7 Remove TMPDIR override
Remove the overridden TMPDIR since bug #2797 is fixed upstream.
2015-09-06 13:04:24 +10:00
Russell Sim
0c3507f361 Bump package version to 0.23.1 2015-08-11 08:53:26 +10:00
Russell Sim
028efcfb9d Updated to 0.23.1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVyJsAAAoJEKPQMr0n6UoaHEIIAILDoUvGOpVEqKyemeQ+lKAz
 hElVNcQzjSmjb4BbXbvGadtSkknqljjwrpKcRkrBam5SfetF0xkEMqhCVUHPHt+G
 OwOCm1EStToL7iCpDfUHwFp5kZPkmWo8bLBv1SWLHVPbgZpqLxfpYH2nBKX8NeQU
 a0OVEz0pGpV+q5NT9tEEtvAx1MvDmLngkbz70e+1Rjzr4ZM/mQoxJ2KenVmkwnkx
 w3YyDVZv7tKGtN1UAbjhpFMdX8JR3lAtZLccs66mpPAnlZle/DZVnBk5QyijVQC6
 +AjkGWAQUIjD4ZkuQ3jlflhKCK+//rx45LFM8KAlhg1PWALFJfWyKm/xZ1I0GpE=
 =Z7Zv
 -----END PGP SIGNATURE-----

Merge tag 'upstream/0.23.1'

Updated to 0.23.1

* tag 'upstream/0.23.1': (29 commits)
  Bump version to v0.23.1
  Stage an unregistered submodule in _add_bypath()
  filebuf: remove lockfile upon rename errors
  filebuf: failing test for leaving the lockfile when failing to rename
  Increase required version of cmake to 2.8
  Handle ssh:// and git:// urls containing a '~' character.
  Remove extra semicolon outside of a function
  Cherry-pick PR #3332: Resolve documentation warnings
  case-insensitive check for WWW-Authenticate header
  iterator: adjust unreadable-dir test to new behaviour
  iterator: skip over errors in diriter init
  Make libgit2 work on Windows Vista again
  Document git_fetch_options struct and fix typo.
  Fix macro redefinition warning
  submodule: normalize slashes in resolve_url
  submodule: add failing test for backslash in url
  Fix #3094 - improve use of portable size_t/ssize_t format specifiers.
  filter: make sure to close the stream even on error
  index: allow add_bypath to update submodules
  blob: fail to create a blob from a dir with EDIRECTORY
  ...
2015-08-11 08:48:32 +10:00
Russell Sim
a9c98d4807 Bump version to 0.23.0 2015-08-10 07:52:26 +10:00
Carlos Martín Nieto
f6dedf2c2e Bump version to v0.23.1 2015-08-03 20:07:35 +02:00
Carlos Martín Nieto
5915a2a255 Merge pull request #3349 from libgit2/cmn/for-v23
A second round of 0.23 maint updates
2015-08-03 19:25:03 +02:00
Edward Thomson
16cee5d635 Stage an unregistered submodule in _add_bypath() 2015-08-03 18:23:18 +02:00
Carlos Martín Nieto
62a273ccbb filebuf: remove lockfile upon rename errors
When we have an error renaming the lockfile, we need to make sure
that we remove it upon cleanup. For this, we need to keep track of
whether we opened the file and whether the rename succeeded.

If we did create the lockfile but the rename did not succeed, we
remove the lockfile. This won't protect against all errors, but
the most common ones (target file is open) does get handled.
2015-08-03 18:14:22 +02:00
Carlos Martín Nieto
adb8f8d0bc filebuf: failing test for leaving the lockfile when failing to rename
When we fail to rename, we currently leave the lockfile laying
around. This shows that behaviour.
2015-08-03 18:14:22 +02:00
Tony Kelman
e874f3c1c0 Increase required version of cmake to 2.8 2015-08-03 10:34:58 +02:00
Simon
7483e08f1a Handle ssh:// and git:// urls containing a '~' character.
For such a path '/~/...' the leading '/' is stripped so the server will
get a path starting with '~' and correctly handle it.
2015-08-03 10:34:36 +02:00
Stefan Widgren
a299d0af1b Remove extra semicolon outside of a function
Without this change, compiling with gcc and pedantic generates warning:
ISO C does not allow extra ‘;’ outside of a function.
2015-08-03 10:34:26 +02:00
Carlos Martín Nieto
e5a7724969 Cherry-pick PR #3332: Resolve documentation warnings 2015-08-03 10:33:50 +02:00
Anders Borum
a91dff8931 case-insensitive check for WWW-Authenticate header
Fixes issue #3338
2015-08-03 10:33:16 +02:00
Carlos Martín Nieto
c5d4317887 iterator: adjust unreadable-dir test to new behaviour
We don't want the iterator to make us stop whenever we hit an unreadable
dir. We should instead move over to the next item.
2015-08-03 10:32:57 +02:00
Carlos Martín Nieto
a4ded362b4 iterator: skip over errors in diriter init
An error here will typically mean that the directory was removed between
the time we iterated the parent and the time we wanted to visit it in
which case we should ignore it.

Other kinds of errors such as permissions (or transient errors) also
better dealt with by pretending we didn't see it.
2015-08-03 10:32:48 +02:00
Carlos Martín Nieto
6a0d569669 Merge pull request #3333 from libgit2/cmn/for-v23
Maintenance updates for v0.23
2015-08-01 15:37:04 +02:00
Sven Strickroth
ac1a5e20b8 Make libgit2 work on Windows Vista again
(fixes issue #3316)

Signed-off-by: Sven Strickroth <email@cs-ware.de>
2015-07-28 08:28:04 +02:00
Ryan Roden-Corrent
555b351896 Document git_fetch_options struct and fix typo.
git_fetch_options was missing from the API docs because it lacked a
documentation comment above the struct declaration.
I used the git_checkout_options docstring as a template.

Also fixes a typo in git_remote_prune_refs (remote, not reamote).
2015-07-28 08:27:56 +02:00
Fallso
2563101b4f Fix macro redefinition warning 2015-07-28 08:27:45 +02:00
Carlos Martín Nieto
55bc135130 submodule: normalize slashes in resolve_url
Our path functions expect to work with slashes, so convert a
path with backslashes into one with slashes at the top of
the function.
2015-07-28 08:25:41 +02:00
Carlos Martín Nieto
a89a756d87 submodule: add failing test for backslash in url 2015-07-28 08:25:41 +02:00
Matthew Plough
38dc994031 Fix #3094 - improve use of portable size_t/ssize_t format specifiers.
The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c.  For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
2015-07-28 08:25:23 +02:00
Carlos Martín Nieto
34ff34fd6a filter: make sure to close the stream even on error
When the stream list init or write fail, we must also make sure to close
the stream, as that's the function contract.
2015-07-28 08:25:06 +02:00
Carlos Martín Nieto
678c4aacf5 index: allow add_bypath to update submodules
Similarly to how git itself does it, allow the index update operation to
stage a change in a submodule's HEAD.
2015-07-28 08:24:55 +02:00
Carlos Martín Nieto
aafaa491ba blob: fail to create a blob from a dir with EDIRECTORY
This also affects `git_index_add_bypath()` by providing a better error
message and a specific error code when a directory is passed.
2015-07-28 08:24:55 +02:00
Carlos Martín Nieto
7624b91fd3 errors: add EDIRECTORY
This is to be returned when the operation which the user asked for is
not possible to do on a directory.
2015-07-28 08:24:55 +02:00
Carlos Martín Nieto
e48dd86eca submodule: lookup the submodule by path if available
If we get the path from the gitmodules file, look up the submodule we're
interested in by path, rather then by name. Otherwise we might get
duplicate results.
2015-07-28 08:22:59 +02:00
Carlos Martín Nieto
1207b8f2a7 submdule: reproduce double-reporting of a submodule in foreach
When we rename a submodule, we should be merging two sets of information
based on whether their path is the same. We currently only deduplicate
on equal name, which causes us to double-report.
2015-07-28 08:22:59 +02:00
Edward Thomson
f2dc6b77ee khash: add eol so picky compilers stop warning 2015-07-28 08:22:26 +02:00
Edward Thomson
a4743de873 xdiff: cleanup some warnings 2015-07-28 08:21:47 +02:00
Edward Thomson
75d0b81abf xdiff: upgrade to core git 2.4.5
Upgrade xdiff to version used in core git 2.4.5 (0df0541).

Corrects an issue where an LF is added at EOF while applying
an unrelated change (ba31180), cleans up some unused code (be89977 and
e5b0662), and provides an improved callback to avoid leaking internal
(to xdiff) structures (467d348).

This also adds some additional functionality that we do not yet take
advantage of, namely the ability to ignore changes whose lines are
all blank (36617af).
2015-07-28 08:20:58 +02:00
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
Tony Kelman
f57403919a Fix undefined reference with old versions of openssl
Versions prior to 0.9.8f  did not have this function, rhel/centos5 are still on a
heavily backported version of 0.9.8e and theoretically supported until March 2017

Without this ifdef, I get the following link failure:
```
CMakeFiles/libgit2_clar.dir/src/openssl_stream.c.o: In function `openssl_connect':
openssl_stream.c:(.text+0x45a): undefined reference to `SSL_set_tlsext_host_name'
collect2: error: ld returned 1 exit status
make[6]: *** [libgit2_clar] Error 1
```
2015-07-28 08:17:58 +02:00
Russell Sim
2f72fad2b3 Commited changes from the 0.22 series 2015-07-26 20:55:06 +10:00
Russell Sim
c7d01cbce9 Commited changes from the 0.21 series 2015-07-26 20:52:18 +10:00
Russell Sim
bc62400d7e Merge branch 'upstream'
* upstream: (1173 commits)
  Update CHANGELOG with the release number
  filter: add docs for streaming filters
  iterator_walk: cast away constness for free
  filter::stream: free the filter sanely
  submodule: correctly delimit the keys to use for lookup
  submodule: add failing test for loading the wrong submodule
  submodule: completely remove reload_all
  Fix 8.3 filename tests failure when 8.3 is disabled
  Fix #3093 - remove declaration of unused function git_fetch__download_pack
  http: fixed leak when asking for credentials again
  index tests: add eol to avoid compiler warning
  checkout test: mark unused vars
  winhttp: remove unused var
  posix compat: include sys/stat.h for mingw
  diff: use size_t format
  fix memory leak in refspec.c on errors.
  checkout test: check getcwd return value
  clar: test chdir
  filter test: pass base type
  examples: clean up some warnings
  ...
2015-07-26 20:52:12 +10:00
Carlos Martín Nieto
159061a8ce Update CHANGELOG with the release number 2015-07-06 16:23:44 +02:00
Carlos Martín Nieto
4d6362b168 Merge pull request #3290 from libgit2/cmn/filter-doc
filter: add docs for streaming filters
2015-07-03 16:29:32 +02:00
Carlos Martín Nieto
a94d3e68bf filter: add docs for streaming filters
These functions are available on the public API but don't have any
documentation, so they don't appear on the API reference. Fix that.
2015-07-03 14:36:41 +02:00
Carlos Martín Nieto
99090a8522 Merge pull request #3289 from ethomson/warnings4
iterator_walk: cast away constness for free
2015-07-03 00:38:33 +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
dd6b24b19a iterator_walk: cast away constness for free 2015-07-02 10:36:15 -05: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
eb94199fe4 Merge pull request #3286 from libgit2/cmn/submodule-duplicate
Correctly delimit the keys for submodule lookup
2015-07-02 08:35:05 +02:00
Carlos Martín Nieto
e0af3cb30c submodule: correctly delimit the keys to use for lookup
The regex we use to look at the gitmodules file does not correctly
delimit the name of submodule which we want to look up and puts '.*'
straight after the name, maching on any submodule which has the seeked
submodule as a prefix of its name.

Add the missing '\.' in the regex so we want a full stop to exist both
before and after the submodule name.
2015-07-01 21:15:06 +02: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
Edward Thomson
bf7d2761d4 Merge pull request #3280 from linquize/8.3
Fix 8.3 filename tests failure when 8.3 is disabled
2015-07-01 12:02:27 -05: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