|
fe5f7722
|
2014-12-23T11:27:01
|
|
don't treat 0x85 as whitespace
A byte value of 0x85 is not whitespace, we were conflating that with
U+0085 (UTF8: 0xc2 0x85). This caused us to incorrectly treat valid
multibyte characters like U+88C5 (UTF8: 0xe8 0xa3 0x85) as whitespace.
|
|
2fe8157e
|
2014-12-22T18:42:03
|
|
index: reuc and name entrycounts should be size_t
For the REUC and NAME entries, we use size_t internally, and we take
size_t for the get_byindex() functions, but the entrycount() functions
strangely cast to an unsigned int instead.
|
|
d147900e
|
2014-12-20T21:24:45
|
|
Merge pull request #2759 from libgit2/cmn/openssl-sys
Make OpenSSL locking warnings more severe
|
|
c7d9839f
|
2014-12-20T21:22:30
|
|
Merge pull request #2763 from libgit2/cmn/local-proto-progress
Show progress output on fetch for the local transport
|
|
6fd00266
|
2014-12-19T23:54:01
|
|
COM0 is a valid path, although Windows Explorer does not allow to create this
|
|
629417bd
|
2014-12-19T08:08:47
|
|
Fix ming32 compilation
We need to know what wchar_t and MAX_PATH are. Including common.h takes
care of that for us.
|
|
dce7b1a4
|
2014-12-16T19:24:04
|
|
treebuilder: take a repository for path validation
Path validation may be influenced by `core.protectHFS` and
`core.protectNTFS` configuration settings, thus treebuilders
can take a repository to influence their configuration.
|
|
ec74b40c
|
2014-12-16T18:53:55
|
|
Introduce core.protectHFS and core.protectNTFS
Validate HFS ignored char ".git" paths when `core.protectHFS` is
specified. Validate NTFS invalid ".git" paths when `core.protectNTFS`
is specified.
|
|
8e35527d
|
2014-12-16T13:03:02
|
|
path: Use UTF8 iteration for HFS chars
|
|
11d67b75
|
2014-12-10T19:12:16
|
|
checkout: disallow bad paths on HFS
HFS filesystems ignore some characters like U+200C. When these
characters are included in a path, they will be ignored for the
purposes of comparison with other paths. Thus, if you have a ".git"
folder, a folder of ".git<U+200C>" will also match. Protect our
".git" folder by ensuring that ".git<U+200C>" and friends do not match it.
|
|
ee5da720
|
2014-12-02T22:20:42
|
|
reference_create: validate loose names
Validate loose reference names on Win32.
|
|
a64119e3
|
2014-11-25T18:13:00
|
|
checkout: disallow bad paths on win32
Disallow:
1. paths with trailing dot
2. paths with trailing space
3. paths with trailing colon
4. paths that are 8.3 short names of .git folders ("GIT~1")
5. paths that are reserved path names (COM1, LPT1, etc).
6. paths with reserved DOS characters (colons, asterisks, etc)
These paths would (without \\?\ syntax) be elided to other paths - for
example, ".git." would be written as ".git". As a result, writing these
paths literally (using \\?\ syntax) makes them hard to operate with from
the shell, Windows Explorer or other tools. Disallow these.
|
|
0d388adc
|
2014-11-25T00:58:03
|
|
index: Check for valid paths before creating an index entry
|
|
62155257
|
2014-11-25T00:14:52
|
|
tree: Check for `.git` with case insensitivy
|
|
cceae9a2
|
2014-12-01T13:09:58
|
|
win32: use NT-prefixed "\\?\" paths
When turning UTF-8 paths into UCS-2 paths for Windows, always use
the \\?\-prefixed paths. Because this bypasses the system's
path canonicalization, handle the canonicalization functions ourselves.
We must:
1. always use a backslash as a directory separator
2. only use a single backslash between directories
3. not rely on the system to translate "." and ".." in paths
4. remove trailing backslashes, except at the drive root (C:\)
|
|
4fd2bda9
|
2014-12-16T10:25:45
|
|
local: send 'counting objects' output
Pretend we have a git process at the other end by creating a similar
progress output when inserting objects into the packbuilder.
|
|
263b1d6e
|
2014-12-12T08:29:43
|
|
Make the OpenSSL locking function warnings more severe
Our git_openssl_set_locking() would ideally not exist. Make it clearer
that we provide it as a last resort and you should prefer anything else.
|
|
d524b2d3
|
2014-12-10T17:23:33
|
|
push: fold unpack_ok() into finish()
The push cannot be successful if we sent a bad packfile. We should
return an error in that case instead of storing it elsewhere.
|
|
cd305c2f
|
2014-12-10T11:30:28
|
|
Merge pull request #2678 from libgit2/cmn/io-stream
Introduce stackable IO streams
|
|
a2fd56ab
|
2014-12-10T16:22:50
|
|
Fix a couple of compiler warnings
|
|
49ae22ba
|
2014-12-10T01:38:52
|
|
stream: constify the write buffer
|
|
1b75c29e
|
2014-11-02T11:17:01
|
|
gitno: remove code which is no longer needed
Most of the network-facing facilities have been copied to the socket and
openssl streams. No code now uses these functions directly anymore, so
we can now remove them.
|
|
4fd4341f
|
2014-11-02T10:52:03
|
|
ssh: use socket_stream to perform the connection
Having an ssh stream would require extra work for stream capabilities we
don't need anywhere else (oob auth and command execution) so for now
let's move away from the gitno connection to use socket_stream.
We can introduce an ssh stream interface if and as we need it.
|
|
b6f5464e
|
2014-11-01T21:35:06
|
|
Port HTTP(S) to the new stream API
|
|
02b4c1e2
|
2014-11-01T16:58:20
|
|
Port the TCP transport to the new stream API
|
|
468d7b11
|
2014-11-01T15:19:54
|
|
Add an OpenSSL IO stream
This unfortunately isn't as stackable as could be possible, as it
hard-codes the socket stream. This is because the method of using a
custom openssl BIO is not clear, and we do not need this for now. We can
still bring this in if and as we need it.
|
|
dd4ff2c9
|
2014-11-01T12:35:54
|
|
Introduce stackable IO streams
We currently have gitno for talking over TCP, but this needs to know
about both plaintext and OpenSSL connections and the code has gotten
somewhat messy with ifdefs determining which version of the function
should be called.
In order to clean this up and abstract away the details of sending over
the different types of streams, we can instead use an interface and
stack stream implementations.
We may not be able to use the stackability with all streams, but we
are definitely be able to use the abstraction which is currently spread
between different bits of gitno.
|
|
ad2bf40a
|
2014-12-08T17:31:34
|
|
winhttp: plug some leaks
|
|
c251f3bb
|
2014-12-08T16:05:47
|
|
win32: remember to cleanup our hash_ctx
|
|
19ae8439
|
2014-12-06T20:17:16
|
|
Merge pull request #2746 from libgit2/cmn/neg-ignore-dir
Fix negative ignores withing ignored dirs
|
|
013924c1
|
2014-12-05T23:44:34
|
|
Merge pull request #2730 from libgit2/cmn/local-push
Adjust the local transport for the common refspec parser
|
|
21083a71
|
2014-12-06T03:12:04
|
|
notes: move the notes name argument
Make it consistent between git_note_create() and git_note_remote() by
putting it after the repository.
|
|
e05b2ff1
|
2014-12-05T18:25:38
|
|
ignore: match git's rule negation rules
A rule can only negate something which was explicitly mentioned in the
rules before it. Change our parsing to ignore a negative rule which does
not negate something mentioned in the rules above it.
While here, fix a wrong allocator usage. The memory for the match string
comes from pool allocator. We must not free it with the general
allocator. We can instead simply forget the string and it will be
cleaned up.
|
|
30ec0526
|
2014-12-05T07:44:09
|
|
Merge pull request #2744 from epmatsw/spelling
Spelling fixes
|
|
e79fbd9e
|
2014-12-05T07:09:08
|
|
Merge pull request #2743 from ethomson/init_val
init: return the number of initializations
|
|
b874629b
|
2014-12-04T21:06:59
|
|
Spelling fixes
|
|
6d91dc53
|
2014-12-03T15:28:44
|
|
init: return the number of initializations
|
|
8bfbe698
|
2014-12-03T21:54:44
|
|
Merge pull request #2742 from stewid/add_missing_else_directive
Add missing else directive
|
|
2d2cd625
|
2014-12-03T21:01:42
|
|
Add missing else directive
Add missing else directive to fix compiler warning: control reaches
end of non-void function
|
|
70d21742
|
2014-12-03T00:41:46
|
|
win32: clear connection data on close
|
|
32e2b758
|
2014-11-29T15:57:35
|
|
describe: check error codes
|
|
e952bc5a
|
2014-11-23T17:15:18
|
|
Merge pull request #2718 from libgit2/cmn/peeling-errors
peel: reject bad queries with EPEEL
|
|
d5c84f67
|
2014-11-23T21:34:45
|
|
local: adjust to the common refspec parser
We no longer have NULL strings, but empty ones and duplicate the sides
if necessar, so the first check will never do anything.
While in the area, remove unnecessary ifs and early returns.
|
|
52ee0e8e
|
2014-11-23T21:26:53
|
|
remote: verify there is a push foreach callback set
|
|
f7fcb18f
|
2014-11-23T14:12:54
|
|
Plug leaks
Valgrind is now clean except for libssl and libgcrypt.
|
|
753e17b0
|
2014-11-19T18:42:29
|
|
peel: reject bad queries with EINVALIDSPEC
There are some combination of objects and target types which we know
cannot be fulfilled. Return EINVALIDSPEC for those to signify that there
is a mismatch in the user-provided data and what the object model is
capable of satisfying.
If we start at a tag and in the course of peeling find out that we
cannot reach a particular type, we return EPEEL.
|
|
e06b1040
|
2014-11-22T18:39:50
|
|
Merge pull request #2723 from ravindp/ravindp/fix_4_missing_delta_bases
Fix for misleading "missing delta bases" error.
|
|
ec7e680c
|
2014-11-20T12:07:55
|
|
Fix for misleading "missing delta bases" error - Fix #2721.
|
|
24cce239
|
2014-11-21T18:09:57
|
|
text: Null-terminate a string if we've been gouging it
|
|
b7fb71e3
|
2014-11-21T17:38:55
|
|
notes: Use `git__strndup`
|
|
1ba48b7c
|
2014-11-21T17:19:41
|
|
notes: Do not assume blob contents are NULL-terminated
|
|
72d00241
|
2014-11-21T13:32:21
|
|
attr_file: Do not assume ODB data is NULL-terminated
That's a bad assumption to make, even though right now it holds
(because of the way we've implemented decompression of packfiles),
this may change in the future, given that ODB objects can be
binary data.
Furthermore, the ODB object can return a NULL pointer if the object
is empty. Copying the NULL pointer to the strbuf lets us handle it
like an empty string. Again, the NULL pointer is valid behavior because
you're supposed to check the *size* of the object before working
on it.
|
|
92e0b679
|
2014-11-21T13:31:30
|
|
buffer: Do not `put` anything if len is 0
|
|
deadc43e
|
2014-11-21T15:21:00
|
|
Merge pull request #2720 from ravindp/master
Fix for memory leak issue in indexer.c, that surfaces on windows
|
|
e0156651
|
2014-11-21T13:50:46
|
|
odb: `git_odb_object` contents are never NULL
This is a contract that we made in the library and that we need to uphold. The
contents of a blob can never be NULL because several parts of the library (including
the filter and attributes code) expect `git_blob_rawcontent` to always return a
valid pointer.
|
|
fc6ac074
|
2014-11-20T13:13:46
|
|
Merge pull request #2713 from libgit2/jamill/push_fetch_first
Update message for error during push
|
|
fd10b110
|
2014-11-20T13:12:49
|
|
Merge pull request #2717 from libgit2/cmn/remote-ls
Clarify the git_remote_ls() documentation
|
|
1ca61bdc
|
2014-11-19T20:53:25
|
|
fetch: clear the connection data on close
When we fetch twice with the same remote object, we did not properly
clear the connection flags, so we would leak state from the last
connection.
This can cause the second fetch with the same remote object to fail if
using a HTTP URL where the server redirects to HTTPS, as the second
fetch would see `use_ssl` set and think the initial connection wanted to
downgrade the connection.
|
|
7561f98d
|
2014-11-19T14:54:30
|
|
Fix for memory leak issue in indexer.c, that surfaces on windows
|
|
699dfcc3
|
2014-11-19T15:49:02
|
|
remote: clarify which list of references _ls() returns
Make it clear that this is not the ls-remote command but a way to access
the data we have and how long it's kept around.
|
|
45301cca
|
2014-11-18T11:44:59
|
|
Merge pull request #2608 from libgit2/cmn/remote-push
Provide a convenience function `git_remote_push()`
|
|
8b5b814e
|
2014-11-17T20:10:58
|
|
Merge pull request #2671 from swisspol/remote_create_fix
Fixed active_refspecs field not initialized on new git_remote objects
|
|
7f1b73b7
|
2014-11-17T17:03:55
|
|
Merge pull request #2693 from libgit2/cmn/push-refspec-refactor
push: use the common refspec parser
|
|
a4221ccb
|
2014-11-17T16:36:54
|
|
Merge pull request #2699 from swisspol/fix_warnings
Fixed a couple Clang warnings
|
|
a03f6caf
|
2014-11-17T16:30:31
|
|
Update message for error during push
When attempting to update a reference on a remote during push, and the
reference on the remote refers to a commit that does not exist locally,
then we should report a more clear error message.
|
|
d3cd7da5
|
2014-10-28T20:56:18
|
|
Fixed active_refspecs field not initialized on new git_remote objects
When creating a new remote, contrary to loading one from disk,
active_refspecs was not populated. This means that if using the new
remote to push, git_push_update_tips() will be a no-op since it
checks the refspecs passed during the push against the base ones
i.e. active_refspecs. And therefore the local refs won't be created
or updated after the push operation.
|
|
5915d700
|
2014-11-17T14:28:22
|
|
branch: consider an empty upstream remote config as not found
|
|
d6ecc311
|
2014-11-15T14:35:58
|
|
Plug possible leak in the openssl locks
|
|
692c0408
|
2014-11-09T08:09:25
|
|
Fixed a couple Clang warnings
|
|
aad638f3
|
2014-11-07T15:00:11
|
|
push: use the common refspec parser
There is one well-known and well-tested parser which we should use,
instead of implementing parsing a second time.
The common parser is also augmented to copy the LHS into the RHS if the
latter is empty.
The expressions test had to change a bit, as we now catch a bad RHS of a
refspec locally.
|
|
64e3e6d4
|
2014-10-11T12:25:50
|
|
remote: use configured push refspecs if none are given
If the user does not pass any refspecs to push, try to use those
configured via the configuration or via add_push().
|
|
3149547b
|
2014-10-10T12:39:53
|
|
remote: introduce git_remote_push()
This function, similar in style to git_remote_fetch(), performs all the
steps required for a push, with a similar interface.
The remote callbacks struct has learnt about the push callbacks, letting
us set the callbacks a single time instead of setting some in the remote
and some in the push operation.
|
|
799e22ea
|
2014-10-23T17:34:41
|
|
Rename git_threads_ to git_libgit2_
This describes their purpose better, as we now initialize ssl and some
other global stuff in there. Calling the init function is not something
which has been optional for a while now.
|
|
e284c451
|
2014-10-28T22:18:38
|
|
Changed GIT_REMOTE_DOWNLOAD_TAGS_ALL to behave like git 1.9.0
|
|
02bc5233
|
2014-11-08T17:05:13
|
|
Merge pull request #2698 from libgit2/cmn/fetchhead-refactor
Refactor fetchhead
|
|
bc8c4a8a
|
2014-11-08T16:55:23
|
|
Merge pull request #2695 from libgit2/cmn/remote-lookup
remote: rename _load() to _lookup()
|
|
e3bd48a7
|
2014-11-08T16:52:43
|
|
Merge pull request #2696 from libgit2/cmn/empty-objects
odb: hardcode the empty blob and tree
|
|
2c9b9c8b
|
2014-11-08T20:40:02
|
|
remote: refactor the reference-update decision
This is an ugly chunk of code, so let's put it into its own function.
|
|
e1ac0101
|
2014-11-08T14:40:53
|
|
odb: hardcode the empty blob and tree
git hardocodes these as objects which exist regardless of whether they
are in the odb and uses them in the shell interface as a way of
expressing the lack of a blob or tree for one side of e.g. a diff.
In the library we use each language's natural way of declaring a lack of
value which makes a workaround like this unnecessary. Since git uses it,
it does however mean each shell application would need to perform this
check themselves.
This makes it common work across a range of applications and an issue
with compatibility with git, which fits right into what the library aims
to provide.
Thus we introduce the hard-coded empty blob and tree in the odb
frontend. These hard-coded objects are checked for before going to the
backends, but after the cache check, which means the second time they're
used, they will be treated as normal cached objects instead of creating
new ones.
|
|
64fdd86d
|
2014-11-08T20:21:14
|
|
remote: don't check for upstream on an anonymous remote
If the remote is anonymous, then we cannot check for any configuration,
as there is no name. Check for this before we try to use the name, which
may be a NULL pointer.
This fixes #2697.
|
|
e235db02
|
2014-11-08T20:09:11
|
|
remote: use git_branch_upstream_remote()
This reduces the clutter somewhat and lets us see what we're asking
about the reference.
|
|
82374d98
|
2014-11-08T20:00:17
|
|
branch: add getter for the upstream remote name
This gets the value from branch.<foo>.remote.
|
|
209425ce
|
2014-11-08T13:25:51
|
|
remote: rename _load() to _lookup()
This brings it in line with the rest of the lookup functions.
|
|
68182085
|
2014-11-07T20:32:50
|
|
git_status_file now takes an exact path
This function has one output but can match multiple files, which can be
unexpected for the user, which would usually path the exact path of the
file he wants the status of.
|
|
62a617dc
|
2014-11-06T16:16:46
|
|
iterator: submodules are determined by an index or tree
We cannot know from looking at .gitmodules whether a directory is a
submodule or not. We need the index or tree we are comparing against to
tell us. Otherwise we have to assume the entry in .gitmodules is stale
or otherwise invalid.
Thus we pass the index of the repository into the workdir iterator, even
if we do not want to compare against it. This follows what git does,
which even for `git diff <tree>`, it will consider staged submodules as
such.
|
|
2d24816b
|
2014-11-06T18:49:37
|
|
checkout_index: Remove stage 0 when checking out conflicts
|
|
9f664347
|
2014-11-06T14:40:21
|
|
checkout_index: remove conflicts when checking out new files
|
|
64dc2485
|
2014-11-06T10:38:25
|
|
Merge pull request #2598 from libgit2/cmn/stacked-ignore
ignore: don't leak rules into higher directores
|
|
7bb63991
|
2014-11-06T10:25:23
|
|
Merge pull request #2676 from libgit2/cmn/threading
Threading and crypto libraries
|
|
f890a84f
|
2014-11-06T10:19:22
|
|
Merge pull request #2682 from libgit2/cmn/fetch-tags-refspec
remote: check for the validity of the refspec when updating FETCH_HEAD
|
|
6069042f
|
2014-11-05T16:51:39
|
|
ignore: don't leak rules into higher directories
A rule "src" in src/.gitignore must only match subdirectories of
src/. The current code does not include this context in the match rule
and would thus consider this rule to match the top-level src/ directory
instead of the intended src/src/.
Keep track fo the context in which the rule was defined so we can
perform a prefix match.
|
|
b4e5432f
|
2014-11-05T10:47:19
|
|
Merge pull request #2688 from libgit2/cmn/ignore-file-trailing-cr
ignore: consider files with a CR in their names
|
|
5c54e216
|
2014-11-05T16:07:07
|
|
ignore: consider files with a CR in their names
We currently consider CR to start the end of the line, but that means
that we miss cases with CR CR LF which can be used with git to match
files whose names have CR at the end of their names.
The fix from the patch comes from Russell's comment in the issue.
This fixes #2536.
|
|
cce27d82
|
2014-11-03T14:07:20
|
|
git_remote_rename: propogate GIT_ENOTFOUND
|
|
de0c4555
|
2014-11-03T11:32:47
|
|
Merge pull request #2679 from jfultz/missing-include
Make config reading continue after hitting a missing include file.
|
|
6d20006f
|
2014-11-02T20:11:54
|
|
remote: check the relevance of the refspec when updating FETCH_HEAD
Before trying to rtransform using the given refspec to figure out what
the name of the upstream branch is on the remote, we must make sure that
the target of the refspec applies to the current branch's upstream.
|
|
0a629181
|
2014-11-03T15:10:14
|
|
Merge pull request #2661 from swisspol/2656
Changed context_lines and interhunk_lines to uint32_t to match struct s_xdemitconf
|
|
4bb87087
|
2014-11-03T15:01:41
|
|
Merge pull request #2683 from libgit2/cmn/remote-unify
remote: unify the creation code
|
|
873eb899
|
2014-11-03T14:57:39
|
|
Merge pull request #2680 from libgit2/cmn/invalid-cert-return
netops: return GIT_ECERTIFICATE when it fails the basic tests
|
|
0fab748e
|
2014-11-03T14:52:34
|
|
Merge pull request #2685 from libgit2/cmn/mmap-readable
Fix segmentation fault observed on OpenBSD/sparc64
|