|
690bf41c
|
2013-06-10T15:16:44
|
|
keep source similarity in rename detection
|
|
f7e56150
|
2013-06-05T15:41:42
|
|
Make mkdir early exit cases clearer
There are two places where git_futils_mkdir should exit early or
at least do less. The first is when using GIT_MKDIR_SKIP_LAST
and having that flag leave no directory left to create; it was
being handled previously, but the behavior was subtle. Now I put
in a clear explicit check that exits early in that case.
The second is when there is no directory to create, but there is
a valid path that should be verified. I shifted the logic a bit
so we'll be better about not entering the loop than that happens.
|
|
999d4405
|
2013-06-05T12:02:28
|
|
Simplify git_futils_mkdir
This routine was (is) pretty complicated, but given the recent
changes, it seemed like it could be simplified a bit.
|
|
2e1fa15f
|
2013-06-05T19:00:16
|
|
I'm a dick
|
|
b832ecf7
|
2013-06-05T09:46:51
|
|
Ensure git_futils_mkdir won't mkdir root
This makes sure that git_futils_mkdir always skips over the root
directory at a minimum, even on platforms where the root is not
simply '/'. Also, this removes the GIT_WIN32 ifdef in favor of
making EACCES as a potentially recoverable error on all platforms.
|
|
e236b37f
|
2013-06-05T09:16:19
|
|
Merge pull request #1633 from jamill/directory_create_fix
Allow creation of directories under the volume root in Win32
|
|
daf98cb2
|
2013-06-04T14:49:39
|
|
Allow creation of directories under the volume root in Win32
We ran into an issue where cloning a repository to a folder
directly underneath the root of a volume (e.g. 'd:\libgit2')
would fail with an access denied error. This was traced down
to a call to make a directory that is the root (e.g. 'd:') could
return an error indicated access denied instead of an error
indicating the path already exists. This change now handles
the access denied error on Win32 and checks for the existence
of the folder.
|
|
947fad4f
|
2013-06-03T09:28:58
|
|
Merge pull request #1624 from libgit2/vmg/full-ref-iterator
Breaking RefDB changes
|
|
dc33b3d7
|
2013-06-02T02:13:45
|
|
Don't bail on parsing commits with an invalid timezone
git doesn't do that, and it's not something that's usually
actionable to fix. if you have a git repository with one bad
timezone in the history, it's too late to change it most likely.
|
|
03a89070
|
2013-05-31T21:49:40
|
|
Make git_index_read_tree preserve stat cache
Instead of just blowing away the stat cache data when loading a
new tree into the index, this checks if each loaded item has a
corresponding existing item with the same OID and if so, copies
the stat data from the old item to the new one so it will not be
blown away.
|
|
cee695ae
|
2013-05-31T12:18:43
|
|
Make iterators use GIT_ITEROVER & smart advance
1. internal iterators now return GIT_ITEROVER when you go past the
last item in the iteration.
2. git_iterator_advance will "advance" to the first item in the
iteration if it is called immediately after creating the
iterator, which allows a simpler idiom for basic iteration.
3. if git_iterator_advance encounters an error reading data (e.g.
a missing tree or an unreadable file), it returns the error
but also attempts to advance past the invalid data to prevent
an infinite loop.
Updated all tests and internal usage of iterators to account for
these new behaviors.
|
|
17ef7dbc
|
2013-05-31T09:51:53
|
|
Merge pull request #1626 from ethomson/index_ext_truncation
improve test for index extension truncation
|
|
8c2458be
|
2013-05-31T11:41:33
|
|
improve test for index extension truncation
|
|
8d863aa2
|
2013-05-31T06:01:59
|
|
Merge pull request #1621 from NHDaly/clone_transport_flags
Added support for setting transport flags (No check SSL cert) to git_clo...
|
|
88392914
|
2013-05-30T01:12:27
|
|
Added support for setting transport flags (No check SSL cert) to git_clone call.
|
|
9afc5971
|
2013-05-31T03:09:38
|
|
Merge pull request #1559 from carlosmn/ref-shorthand
Introduce git_reference_shorthand
|
|
af2c72d2
|
2013-05-31T03:08:48
|
|
Merge pull request #1623 from yorah/fix/tag_auto
remote: make default tag retrieving behaviour consistent
|
|
1ed356dc
|
2013-05-30T21:04:28
|
|
Frees
|
|
df50512a
|
2013-05-30T18:06:54
|
|
Proposal to handle default value (auto = 0)
|
|
215af2cc
|
2013-05-30T17:40:56
|
|
remote: make default tag retrieving behaviour consistent
Default for newly created remotes will be auto.
Default when loading existing remotes with no tag retrieving behaviour set, was already auto.
|
|
b2984e8a
|
2013-05-30T08:43:14
|
|
Merge pull request #1622 from yorah/fix/thread-segfault
thread: fix segfault on Windows 64 bits
|
|
979f75d8
|
2013-05-30T17:19:43
|
|
Refcounting
|
|
d17db2fd
|
2013-05-30T11:30:34
|
|
thread: fix segfault on Windows 64 bits
`lpExitCode` is a pointer to a long. A long is 32 bits wide on Windows.
It means that on Windows 64bits, `GetExitCodeThread()` doesn't set/clear the high-order bytes of the 64 bits memory space pointed at by `value_ptr`.
|
|
4e6e2ff2
|
2013-05-30T03:47:10
|
|
...Aaaand this works
|
|
2d160ef7
|
2013-05-29T16:03:30
|
|
allow (ignore) bare slash in gitignore
|
|
ec24e542
|
2013-05-29T22:47:37
|
|
What are the chances, really
|
|
56960b83
|
2013-05-28T20:47:55
|
|
Liike this
|
|
2638a03a
|
2013-05-28T17:50:47
|
|
This refs iterator pleases the gods.
|
|
9007c53f
|
2013-05-27T16:45:22
|
|
Fixing unwrapped calloc
|
|
563c19a9
|
2013-05-11T11:36:29
|
|
packbuilder: also write index in git_packbuilder_write
git_packbuilder_write() used to write a packfile to the passed file
path. Instead, ask for a destination directory and create both the
packfile and an index, as most users probably do expect.
|
|
c37fb41a
|
2013-05-25T12:35:55
|
|
qsort_r appeared in glibc 2.8
|
|
7a5ee3dc
|
2013-05-24T11:09:04
|
|
Add ~ expansion to global attributes and excludes
This adds ~/ prefix expansion for the value of core.attributesfile
and core.excludesfile, plus it fixes the fact that the attributes
cache was holding on to the string data from the config for a long
time (instead of making its own strdup) which could have caused a
problem if the config was refreshed. Adds a test for the new
expansion capability.
|
|
d20b0449
|
2013-05-24T10:37:40
|
|
Clarify GIT_DIFF_INCLUDE_UNTRACKED_CONTENT option
This improves the docs for GIT_DIFF_INCLUDE_UNTRACKED_CONTENT as
well as the other flags related to UNTRACKED items in diff, plus
it makes that flag now automatically turn on
GIT_DIFF_INCLUDE_UNTRACKED which seems like a reasonable dwim type
of change.
|
|
16adc9fa
|
2013-05-24T10:35:58
|
|
Typedef git_config_level_t and use it everywhere
The GIT_CONFIG_LEVEL constants actually work well as an enum
because they are mutually exclusive, so this adds a typedef to
the enum and uses that everywhere that one of these constants are
expected, instead of the old code that typically used an unsigned
int.
|
|
2e62e7c2
|
2013-05-24T10:33:41
|
|
Docs for git_libgit2_opts and cache disable tweak
This adds docs for the cache control options to git_libgit2_opts
and also tweaks the cache code so that if the cache is disabled,
then the next time we attempt to insert something into the cache
in question, we will actually clear any old cached objects.
|
|
43efc449
|
2013-05-16T11:03:55
|
|
Ensure reuc vector is always valid
In theory, if there was a problem reading the REUC data, the
read_reuc() routine could have left uninitialized and invalid
data in the git_index vector. This moves the line that inserts a
new entry into the vector down to the bottom of the routine so we
know all the content is already valid. Also, per @linquize, this
uses calloc to ensure no uninitialized data.
|
|
25a899ec
|
2013-05-24T10:30:32
|
|
qsort_r is broken on HURD, avoid
|
|
26ab6284
|
2013-05-24T03:30:35
|
|
Merge pull request #1593 from ethomson/conflict_iterator
introduce git_conflict_iterator
|
|
f7ceef06
|
2013-05-24T03:24:27
|
|
Merge pull request #1592 from ethomson/merge_setup
merge setup
|
|
4811c150
|
2013-05-24T01:14:52
|
|
Merge pull request #1603 from ben/shallow
Shallow-clone detection
|
|
30caf0cf
|
2013-05-24T01:13:48
|
|
Merge pull request #1595 from arrbee/even-more-rename-fixes
Even more rename detection fixes
|
|
6f0b8142
|
2013-05-23T17:28:52
|
|
Stop leaking memory
|
|
0700ca1a
|
2013-05-23T16:11:53
|
|
More config code checks and cleanups
|
|
3b32b6d3
|
2013-05-23T09:19:42
|
|
More tests of config with various absent files
Plus a bit of extra paranoia to ensure config object has valid
contents.
|
|
49f70f2c
|
2013-05-23T15:48:06
|
|
Fill out diff rename test coverage
This extends the rename tests to make sure that every rename
scenario in the inner loop of git_diff_find_similar is actually
exercised. Also, fixes an incorrect assert that was in one of
the clauses that was not previously being exercised.
|
|
93d8f77f
|
2013-05-23T15:11:53
|
|
Improve test failure output
|
|
f38cea97
|
2013-05-23T15:21:43
|
|
Move core.abbrev lookup out of diff print loop
This moves the GIT_CVAR_ABBREV lookup out of the loop. Also, this
fixes git_diff_print_raw to actually use that constant instead of
hardcoding 7 characters.
|
|
67db583d
|
2013-05-23T15:06:07
|
|
More diff rename tests; better split swap handling
This adds a couple more tests of different rename scenarios.
Also, this fixes a problem with the case where you have two
"split" deltas and the left half of one matches the right half of
the other. That case was already being handled, but in the wrong
order in a way that could result in bad output. Also, if the swap
also happened to put the other two halves into the correct place
(i.e. two files exchanged places with each other), then the second
delta was left with the SPLIT flag set when it really should be
cleared.
|
|
c68b09dc
|
2013-05-23T11:52:34
|
|
Fix dereference of freed delta
I was accidentally using a value that I had just freed. This
moves the clearing of the delta internal flags into a better place.
|
|
9c941ccf
|
2013-05-23T08:52:24
|
|
Merge pull request #1599 from nulltoken/topic/windows_resources
Update windows resources to match the dll name
|
|
a21cbb12
|
2013-05-22T10:37:12
|
|
Significant rename detection rewrite
This flips rename detection around so instead of creating a
forward mapping from deltas to possible rename targets, instead
it creates a reverse mapping, looking at possible targets and
trying to find a source that they could have been renamed or
copied from. This is important because each output can only
have a single source, but a given source could map to multiple
outputs (in the form of COPIED records).
Additionally, this makes a couple of tweaks to the public rename
detection APIs, mostly renaming a couple of options that control
the behavior to make more sense and to be more like core Git.
I walked through the tests looking at the exact results and
updated the expectations based on what I saw. The new code is
different from the old because it cannot give some nonsense
results (like A was renamed to both B and C) which were part of
the outputs previously.
|
|
52f537e9
|
2013-05-22T02:04:12
|
|
Bugfix: Return NULL in push_leaf, when trie is full
os->full was set 1, but the overflowed idx_leaf was still used to index
into os->nodes a little later. Returning NULL fixes that.
|
|
095bfd74
|
2013-05-21T11:38:24
|
|
cmake: Update Windows resources to reflect the optional vendor string
Make InternalName and OriginalFilename resources reflect the name of the compiled binary.
|
|
6828bf26
|
2013-05-21T10:49:36
|
|
Merge pull request #1594 from nulltoken/topic/tag_annotation
tag: Introduce git_tag_annotation_create()
|
|
b81cc1d6
|
2013-05-18T16:52:16
|
|
tag: Introduce git_tag_annotation_create()
|
|
4742148d
|
2013-05-20T13:41:39
|
|
Add more diff rename detection tests
This adds a bunch more rename detection tests including checks
vs the working directory, the new exact match options, some more
whitespace variants, etc.
This also adds a git_futils_writebuffer helper function and uses
it in checkout. This is mainly added because I wanted an easy
way to write out a git_buf to disk inside my test code.
|
|
9be5be47
|
2013-05-20T13:37:21
|
|
More git_diff_find_similar improvements
- Add new GIT_DIFF_FIND_EXACT_MATCH_ONLY flag to do similarity
matching without using the similarity metric (i.e. only compare
the SHA).
- Clean up the similarity measurement code to more rigorously
distinguish between files that are not similar and files that
are not comparable (previously, a 0 could either mean that the
files could not be compared or that they were totally different)
- When splitting a MODIFIED file into a DELETE/ADD pair, actually
make a DELETED/UNTRACKED pair if the right side of the diff is
from the working directory. This prevents an odd mix of ADDED
and UNTRACKED files on workdir diffs.
|
|
038c1654
|
2013-05-19T01:41:00
|
|
Initialize loose_deleted before it is used for a check later on.
|
|
d958e37a
|
2013-05-17T17:21:45
|
|
Fix issues with git_diff_find_similar
There are a number of bugs in the rename code that only were
obvious when I started testing it against large old repos with
more complex patterns. (The code to do that testing is not ready
to merge with libgit2, but I do plan to add more thorough tests.)
This contains a significant number of changes and also tweaks the
public API slightly to make emulating core git easier.
Most notably, this separates the GIT_DIFF_FIND_AND_BREAK_REWRITES
flag into FIND_REWRITES (which adds a self-similarity score to
every modified file) and BREAK_REWRITES (which splits the modified
deltas into add/remove pairs in the diff list). When you do a raw
output of core git, rewrites show up as M090 or such, not at A and
D output, so I wanted to be able to emulate that.
Publicly, this also changes the flags to be uint16_t since we
don't need values out of that range.
Internally, this contains significant changes from a number of
small bug fixes (like using the wrong side of the diff to decide
if the object could be found in the ODB vs the workdir) to larger
issues about which files can and should be compared and how the
various edge cases of similarity scores should be treated.
Honestly, I don't think this is the last update that will have to
be made to this code, but I think this moves us closer to correct
behavior and I tried to document the code so it would be easier
to follow..
|
|
0293450e
|
2013-05-17T16:57:49
|
|
Fix delta compare to use correct pathname
The delta cmp function needs to choose the correct path for
ordering when a delta is ADDED, RENAMED, or COPIED.
|
|
aadfa85b
|
2013-05-17T16:41:15
|
|
Add git_diff_print_raw printing helper
Makes it easier to emulate the --raw option
|
|
660d59ca
|
2013-05-17T16:40:00
|
|
Add git_oid_nfmt - a flexible OID formatter
I frequently want to the the first N digits of an OID formatted
as a string and I'd like it to be efficient. This function makes
that easy and I could rewrite the OID formatters in terms of it.
|
|
0e0108f7
|
2013-05-17T15:59:57
|
|
introduce git_conflict_iterator
|
|
9c06b250
|
2013-05-16T13:04:37
|
|
merge setup
|
|
f672cd2a
|
2013-05-10T20:15:57
|
|
revparse: Make revparse_ext() return git_reference from names as well
|
|
e841c533
|
2013-05-09T16:42:39
|
|
revparse: Introduce git_revparse_ext()
Expose a way to retrieve, along with the target git_object, the reference
pointed at by some revparse expression (`@{<-n>}` or
`<branchname>@{upstream}` syntax).
|
|
dcaa898d
|
2013-05-09T16:52:04
|
|
revparse: Simplify temporary reference freeing
|
|
e3107e0e
|
2013-05-16T11:35:02
|
|
Merge pull request #1558 from bmorganpa/ssh_transport
SSH Transport
|
|
c2d282cf
|
2013-05-16T11:10:42
|
|
Merge pull request #1590 from arrbee/examples-like-git
Add cat-file to examples (with some public API improvements)
|
|
18e37db9
|
2013-05-16T11:10:13
|
|
Merge pull request #1591 from arrbee/reorder-reuc-read-for-safety
Ensure reuc vector is always valid
|
|
57908bb3
|
2013-05-16T11:03:55
|
|
Ensure reuc vector is always valid
In theory, if there was a problem reading the REUC data, the
read_reuc() routine could have left uninitialized and invalid
data in the git_index vector. This moves the line that inserts a
new entry into the vector down to the bottom of the routine so we
know all the content is already valid. Also, per @linquize, this
uses calloc to ensure no uninitialized data.
|
|
58206c9a
|
2013-05-16T10:38:27
|
|
Add cat-file example and increase const use in API
This adds an example implementation that emulates git cat-file.
It is a convenient and relatively simple example of getting data
out of a repository.
Implementing this also revealed that there are a number of APIs
that are still not using const pointers to objects that really
ought to be. The main cause of this is that `git_vector_bsearch`
may need to call `git_vector_sort` before doing the search, so a
const pointer to the vector is not allowed. However, for tree
objects, with a little care, we can ensure that the vector of
tree entries is always sorted and allow lookups to take a const
pointer. Also, the missing const in commit objects just looks
like an oversight.
|
|
7026ad89
|
2013-05-16T21:08:55
|
|
calloc() to initialize memory
|
|
12f831fa
|
2013-05-16T04:41:05
|
|
Merge pull request #1586 from jamill/fetch_fix
Fetch should not fail when remote HEAD reference is not present locally
|
|
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
|
|
6fe02c11
|
2013-05-15T14:44:35
|
|
Fetch should not fail when remote HEAD reference is not present locally
|
|
84ac625d
|
2013-05-15T12:51:40
|
|
Added GITERR_CHECK_ALLOC
|
|
ccaee222
|
2013-05-15T12:46:33
|
|
Added GITERR_CHECK_ALLOC
|
|
e057e411
|
2013-05-15T12:44:51
|
|
Reworked git_cred_ssh_keyfile_passphrase_new method
|
|
b54ed3ef
|
2013-05-15T12:41:16
|
|
Added error check
|
|
22011b33
|
2013-05-15T12:38:40
|
|
Cleanup
|
|
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
|