|
96c01991
|
2013-05-15T09:24:51
|
|
Remove entry dup/free functions and fix comments
This removes the functions to duplicate and free copies of a
git_index_entry and updates the comments to explain that you
should just use the public definition of the struct as needed.
|
|
797dfb28
|
2013-05-13T16:09:33
|
|
Add APIs to dup and free git_index_entrys
This adds git_index_entry_dup to make a copy of an existing entry
and git_index_entry_free to release the memory of the copy. It
also updates the documentation for git_index_get_bypath and
git_index_get_byindex to make it clear that the returned structure
should *not* be modified.
|
|
71596200
|
2013-05-15T15:47:46
|
|
Merge pull request #1588 from arrbee/fixes-for-checkout-and-diff
Bug fixes for checkout and diff
|
|
72b3dd4a
|
2013-05-15T15:23:33
|
|
Use GIT_IDXENTRY_STAGE macro
Since I added the GIT_IDXENTRY_STAGE macro to extract the stage
from a git_index_entry, we probably don't need an internal inline
function to do the same thing.
|
|
09fae31d
|
2013-05-15T14:58:26
|
|
Improve robustness of diff rename detection
Under some strange circumstances, diffs can end up listing files
that we can't actually open successfully. Instead of aborting
the git_diff_find_similar, this makes it so that those files just
won't be considered as valid rename/copy targets instead.
|
|
dcb0f7c0
|
2013-05-15T14:54:02
|
|
Fix checkout of submodules with no .gitmodules
It is possible for there to be a submodule in a repository with
no .gitmodules file (for example, if the user forgot to commit
the .gitmodules file). In this case, core Git will just create
an empty directory as a placeholder for the submodule but
otherwise ignore it. We were generating an error and stopping
the checkout. This makes our behavior match that of core git.
|
|
55d3a390
|
2013-05-15T14:52:12
|
|
Remove old symlinks before updating
Unlike blob updates, symlink updates cannot be done "in place"
writing over an old symlink. This means that in checkout when we
realize that we can safely update a symlink, we still need to
remove the old one before writing the new.
|
|
79ef3be4
|
2013-05-15T14:50:05
|
|
Fix diff crash when last item is untracked dir
When the last item in a diff was an untracked directory that only
contained ignored items, the loop to scan the contents would run
off the end of the iterator and dereference a NULL pointer. This
includes a test that reproduces the problem and a fix.
|
|
1fed6b07
|
2013-05-13T21:57:37
|
|
Fix trailing whitespaces
|
|
f0ab7372
|
2013-05-15T17:51:57
|
|
signature: Lenient when dupping, strict when creating
|
|
0cb16fe9
|
2013-05-15T20:26:55
|
|
Unify whitespaces to tabs
|
|
fbcab44b
|
2013-05-14T16:03:09
|
|
Create directory for symlink before creating symlink
|
|
99d32707
|
2013-05-11T06:42:25
|
|
Fix refdb iteration early termination bug
There was a problem found in the Rugged test suite where the
refdb_fs_backend__next function could exit too early in some
very specific hashing patterns for packed refs. This ports
the Rugged test to libgit2 and then fixes the bug.
|
|
e583334c
|
2013-05-10T21:42:22
|
|
Fix broken build when MSVC SDL checks is enabled
|
|
b6cc559a
|
2013-05-11T02:42:49
|
|
Merge pull request #1385 from carlosmn/refs-iter
Introduce a refs iterator
|
|
c58cac12
|
2013-05-04T18:06:14
|
|
Introduce a glob-filtering iterator
If the backend doesn't provide support for it, the matching is done in
refdb on top of a normal iterator.
|
|
9bd89d96
|
2013-05-04T16:49:39
|
|
Move a couple more functions to use iterators
|
|
2b562c3a
|
2013-05-04T16:32:58
|
|
refs: remove the OID/SYMBOLIC filtering
Nobody should ever be using anything other than ALL at this level, so
remove the option altogether.
As part of this, git_reference_foreach_glob is now implemented in the
frontend using an iterator. Backends will later regain the ability of
doing the glob filtering in the backend.
|
|
95727245
|
2013-05-04T16:03:17
|
|
refs: implement _foreach with the iterator
|
|
51fc5e89
|
2013-05-04T15:16:55
|
|
Make sure the ref iterator works in an repo without physical presence
|
|
69a3c766
|
2013-05-04T15:03:32
|
|
refdb_fs: don't crash when the repo doesn't have a path
|
|
4def7035
|
2013-03-02T19:31:03
|
|
refs: introduce an iterator
This allows us to get a list of reference names in a loop instead of callbacks.
|
|
4a65aead
|
2013-05-10T10:49:22
|
|
Merge pull request #1571 from arrbee/what-if-ignorecase-lies
Improve ignore handling in git_status_file
|
|
e9ba61f3
|
2013-05-10T09:32:42
|
|
Fix diff output for renames and copies
If you use rename detection, the renamed and copied files would
not show any text diffs because the function that decides if
data should be loaded didn't know which sides of the diff to
load for those cases.
This adds a test that looks at the patch generated for diff
entries that are COPIED or RENAMED.
|
|
1f9e41ee
|
2013-05-10T07:50:53
|
|
Improve ignore handling in git_status_file
The git_status_file API was doing a hack to deal with files that
are inside ignored directories. The status scan was not reporting
any file in this case, so git_status_file would attempt a final
"stat()" call, and return IGNORED if the file actually existed.
On case-insensitive filesystems where core.ignorecase is set
incorrectly, this magic check can "succeed" and report a file
as ignored when it should actually return ENOTFOUND.
Now that we have the GIT_STATUS_OPT_RECURSE_IGNORED_DIRS, we can
use that flag to make sure that git_status_file() will look into
ignored directories and eliminate the hack completely, so we give
the correct error.
|
|
ae59321f
|
2013-05-10T14:31:58
|
|
clone: fix -Wmaybe-uninitialized warning
|
|
617bb175
|
2013-05-09T17:44:44
|
|
calloc refs instead of malloc'ing them
|
|
3d1c9f61
|
2013-05-09T06:45:06
|
|
Fix git_repository_message docs
This clarifies the docs for git_repository_message and also adds
to the tests to explicitly check NUL termination of data when the
output buffer is smaller than the message size. There is a minor
behavior change so that a non-NULL output buffer will always be
NUL terminated (at length zero) if an error occurs.
|
|
503dd0f3
|
2013-05-09T05:43:25
|
|
Merge pull request #1560 from carlosmn/ref-dwim
Expose git_reference_dwim
|
|
ddc5c054
|
2013-05-09T05:42:37
|
|
Merge pull request #1561 from arrbee/fix-windows-diff-eofnl
Fix windows diff eofnl error
|
|
eb05b114
|
2013-05-07T22:45:01
|
|
Fix dumb type in time comparison
|
|
af795759
|
2013-05-07T15:09:11
|
|
Merge pull request #1552 from carlosmn/config-helpers
Config helpers for global/xdg config files
|
|
98d633cc
|
2013-05-07T23:28:21
|
|
Expose git_reference_dwim
Extract this function out of the rev-parse code to be able to DWIM a
reference instead of its target.
|
|
5d831887
|
2013-05-07T00:10:02
|
|
config: convenience function to open global/xdg
The rules for which one to open is a bit silly, so let's make it
easier for our users.
|
|
a4b75dcf
|
2013-05-06T21:51:25
|
|
repo: unconditionally create a global config backend
When a repository is initialised, we need to probe to see if there is
a global config to load. If this is not the case, the user isn't able
to write to the global config without creating the backend and adding
it themselves, which is inconvenient and overly complex.
Unconditionally create and add a backend for the global config file
regardless of whether it exists as a convenience for users.
To enable this, we allow creating backends to files that do not exist
yet, changing the semantics somewhat, and making some tests invalid.
|
|
0f938c6b
|
2013-05-07T09:59:53
|
|
Fix win32 type warnings
|
|
505b5d0c
|
2013-05-07T16:01:22
|
|
remote: correctly interpret tagopt '--tags'
When tagopt is set to '--tags', we should only take the default tags
refspec into account and ignore any configured ones.
Bring the code into compliance.
|
|
33665410
|
2013-05-07T08:00:44
|
|
Merge pull request #1556 from arrbee/diff-patch-fixes
Diff patch bug fixes
|
|
c2f602f8
|
2013-05-07T07:15:39
|
|
Fix line numbering for patches with eofnl
When a patch contained an eofnl change (i.e. the last line either
gained or lost a newline), the oldno and newno line number values
for the lines in the last hunk of the patch were not useful. This
makes them behave in a more expected manner.
|
|
e35e2684
|
2013-05-07T04:32:17
|
|
Add GIT_DIFF_LINE_CONTEXT_EOFNL
This adds a new line origin constant for the special line that
is used when both files end without a newline.
In the course of writing the tests for this, I was having problems
with modifying a file but not having diff notice because it was
the same size and modified less than one second from the start of
the test, so I decided to start working on nanosecond timestamp
support. This commit doesn't contain the nanosecond support, but
it contains the reorganization of maybe_modified and the hooks so
that if the nanosecond data were being read by stat() (or rather
being copied by git_index_entry__init_from_stat), then the nsec
would be taken into account.
This new stuff could probably use some more tests, although there
is some amount of it here.
|
|
1c92f109
|
2013-05-07T01:32:10
|
|
Merge pull request #1551 from nvloff/set_upstream_local_branch
fix git_branch_set_upstream for local branches
|
|
7f8cf6fe
|
2013-05-07T09:15:12
|
|
Fixed qsort_r() problem when targeting AmigaOS.
We fall back to the libgit2-provided insert sort as done for other
platforms.
|
|
3d42e9a3
|
2013-05-06T20:32:20
|
|
git_branch_set_upstream with local branches
Currently git_branch_set_upstream when passed a local branch
creates invalid configuration, for ex. if we setup branch
'tracking_master' to track local 'master' libgit2 generates
the following config
```
[branch "track_master"]
remote = .
merge = .refs/heads/track_master
```
The merge value is invalid and calling git_branch_upstream on
'tracking_master' results in invalid reference error.
It should do:
```
[branch "track_master"]
remote = .
merge = refs/heads/master
```
|
|
3405f787
|
2013-05-06T06:51:21
|
|
Merge pull request #1547 from ethomson/win32_stat
p_stat() should follow symlinks on windows
|
|
03c28d92
|
2013-05-06T06:45:53
|
|
Merge pull request #1526 from arrbee/cleanup-error-return-without-msg
Make sure error messages are set for most error returns
|
|
d5e5bbd7
|
2013-05-06T06:45:40
|
|
Merge pull request #1524 from jamill/clone_tagopts
By default do not set tagopt when cloning
|
|
450a78bf
|
2013-05-06T06:33:02
|
|
Merge pull request #1545 from ethomson/checkout_dirs_in_use
allow checkout to proceed when a dir to be removed is in use (win32)
|
|
467cbec7
|
2013-05-05T16:48:34
|
|
commit: make create_from_oids() accept plain oid
|
|
ce72e399
|
2013-05-05T16:45:38
|
|
commit: guard create() against not owned trees
|
|
00a4c479
|
2013-05-04T12:04:39
|
|
p_stat() should follow symlinks on windows
|
|
6f748f38
|
2013-05-04T12:14:40
|
|
Do not write tagopt configuration option on clone by default
|
|
e09d18ee
|
2013-05-03T18:39:44
|
|
allow checkout to proceed when a dir to be removed is in use (win32)
|
|
dfec726b
|
2013-05-03T23:30:54
|
|
odb: Do not error out if an alternate ODB is missing
|
|
d8041638
|
2013-05-02T17:22:13
|
|
fix some leaks
|
|
4e7c1560
|
2013-05-02T14:58:40
|
|
puns are not funny; type punning especially so
|
|
0cce210a
|
2013-05-02T10:36:58
|
|
Use assert for peel target type check
|
|
af7689ea
|
2013-05-02T09:50:34
|
|
Merge pull request #1535 from carlosmn/pack-threading
Switch to index_version as "git_pack_file is ready" flag
|
|
0ddfcb40
|
2013-05-02T18:06:14
|
|
Switch to index_version as "git_pack_file is ready" flag
We use p->index_map.data to check whether the struct has been set up
and all the information about the index is stored there. This variable
gets set up halfway through the setup process, however, and a thread
can come along and use fields that haven't been written to yet.
Crucially, pack_entry_find_offset() needs to read the index version
(which is written after index_map) to know the offset and stride
length to pass to sha1_entry_pos(). If these values are wrong,
assertions in it will fail, as it will be reading bogus data.
Make index_version the last field to be written and switch from using
p->index_map.data to p->index_version as "git_pack_file is ready" flag
as we can use it to know if every field has been written.
|
|
a591ed3e
|
2013-05-02T12:06:46
|
|
refdb_fs: respect PEELING_STANDARD
We only set our negative flag for PEELING_FULL; we can fall
back to the lesser PEELING_STANDARD if our ref is in the
refs/tags/ hierarchy.
|
|
822645f6
|
2013-05-02T17:48:49
|
|
refdb_fs: Only strstr the traits line
|
|
1022db2b
|
2013-05-02T17:42:09
|
|
refdb_fs: Traits are always surrounded by spaces
This makes parsing easier! :p
|
|
f69db390
|
2013-05-02T17:29:58
|
|
refdb_fs: store "cannot be peeled" flag for packed refs
Fixes #1532
|
|
3bb00f33
|
2013-05-02T17:17:46
|
|
refdb_fs: implement the fully-peeled trait
|
|
34bd5999
|
2013-05-02T17:14:05
|
|
Revert "Protect sha1_entry_pos call with mutex"
This reverts commit 8c535f3f6879c6796d8107d7eb80dd8b2105621b.
|
|
7edb9071
|
2013-05-02T11:07:20
|
|
refdb_fs: do not require peeled packed refs to be tags
Older versions of git would only write peeled entries for
items under refs/tags/. Newer versions will write them for
all refs, and we should be prepared to handle that.
|
|
8c535f3f
|
2013-05-02T03:34:56
|
|
Protect sha1_entry_pos call with mutex
There is an occasional assertion failure in sha1_entry_pos from
pack_entry_find_index when running threaded. Holding the mutex
around the code that grabs the index_map data and processes it
makes this assertion failure go away.
|
|
81b7dec4
|
2013-05-02T03:06:34
|
|
Fix some compile warnings and trailing whitespace
|
|
9d2f841a
|
2013-05-02T03:03:54
|
|
Add extra locking around packfile open
We were still seeing a few issues in threaded access to packs.
This adds extra locks around the opening of the mwindow to
avoid a different race.
|
|
b60d95c7
|
2013-05-01T15:55:54
|
|
clarify error propogation
|
|
2f28219c
|
2013-05-01T15:53:12
|
|
clarify where error message is set
|
|
52c52737
|
2013-05-01T15:51:30
|
|
Clear error msg when we eat error silently
|
|
f470b00b
|
2013-05-01T15:48:40
|
|
Fix one error not reported in revparse
There are many paths through revparse that may return an error
code without reporting an error, I believe. This fixes one of
them. Because of the backtracking in revparse, it is pretty
complicated to fix the others.
|
|
1a9e406c
|
2013-05-01T15:47:37
|
|
minor missing error message
|
|
bf6bebe2
|
2013-05-01T15:23:40
|
|
Factor out some code that needed to clear errors
A number of places were looking up option config values and then
not clearing the error codes if the values were not found. This
moves the repeated pattern into a shared routine and adds the
extra call to giterr_clear() when needed.
|
|
41e93563
|
2013-05-01T15:08:12
|
|
Error messages for a couple other boundary conditions
|
|
62caf3f3
|
2013-05-01T15:01:47
|
|
Report some errors returnable by push
|
|
f063f578
|
2013-05-01T14:48:35
|
|
Catch some odd odb backend corner case errors
There are some cases, particularly where no loaded ODB backends
support a particular operation, where we would return an error
code without having set an error. This catches those cases and
reports that no ODB backends support the operation in question.
|
|
8915a140
|
2013-05-01T14:23:01
|
|
Report a couple object error conditions
|
|
734c6fc1
|
2013-05-01T14:15:55
|
|
Report errors finding notes
|
|
de19c4a9
|
2013-05-01T14:00:20
|
|
Set error when no merge base is found
|
|
e830c020
|
2013-05-01T13:50:39
|
|
Report stat error when checking if file modified
|
|
69c50f4c
|
2013-05-01T13:47:00
|
|
Merge pull request #1527 from ethomson/checkout_allow_empty_dirs
allow empty dirs to exist when doing checkout
|
|
52c102b7
|
2013-05-01T13:43:48
|
|
More care reporting diff patch iteration errors
|
|
3f663178
|
2013-05-01T13:38:56
|
|
More care catching and setting config errors
|
|
8cddf9b8
|
2013-05-01T18:21:10
|
|
refdb: Properly load namespaces
|
|
0cc7d8df
|
2013-05-01T09:50:40
|
|
allow empty dirs to exist when doing checkout
|
|
e1807113
|
2013-05-01T15:31:23
|
|
merge: Warning noise
|
|
2ba55c1f
|
2013-05-01T15:20:08
|
|
refdb: Proper namespace root
|
|
758e50c5
|
2013-05-01T06:18:09
|
|
Merge pull request #1389 from ethomson/merge_trees
Merge trees
|
|
155ee751
|
2013-05-01T05:34:01
|
|
Add error messages for failed submodule lookup
|
|
46779411
|
2013-05-01T05:32:10
|
|
fix typo
|
|
ae99f5e2
|
2013-05-01T04:57:24
|
|
Make sure error messages get set
|
|
f6f48f90
|
2013-05-01T04:57:05
|
|
Simplify error reporting
|
|
3e199f42
|
2013-05-01T04:18:46
|
|
Set error message for branch functions
There were a couple of places where an error was being returned
from branch related code but no error message was being set.
|
|
cfcdbc10
|
2013-05-01T03:03:17
|
|
Merge pull request #1523 from libgit2/vmg/namespaces
Namespace support
|
|
75d1c8c6
|
2013-04-30T17:33:11
|
|
move NAME and REUC extensions to sys/
|
|
0462fba5
|
2013-04-30T14:56:41
|
|
renames!
|
|
bec65a5e
|
2013-04-01T22:16:21
|
|
merge!
|
|
bade5194
|
2013-04-30T21:02:13
|
|
lol namespaces
|
|
5fa7e469
|
2013-04-30T04:13:39
|
|
Fix some formatting inconsistency
|