Commit Graph

4883 Commits

Author SHA1 Message Date
Russell Belfer
0c01f93e8c Merge pull request #1619 from ethomson/gitignore_slash
allow (ignore) bare slash in gitignore
2013-05-29 14:50:24 -07:00
Edward Thomson
2d160ef782 allow (ignore) bare slash in gitignore 2013-05-29 16:26:25 -05:00
Vicent Martí
17776314c8 Merge pull request #1617 from arrbee/fix-oid-memory-leak
Fix memory leak in oid shortener tests
2013-05-29 09:55:51 -07:00
Russell Belfer
ca9b1702ab Fix memory leak in oid shortener tests 2013-05-29 09:18:21 -07:00
Edward Thomson
504a4fd140 Merge pull request #1615 from arthurschreiber/patch-1
Fix two typos in the merge docs.
2013-05-28 14:12:55 -07:00
Arthur Schreiber
31a6118175 Fix two typos in the merge docs. 2013-05-29 00:02:26 +03:00
Russell Belfer
9007c53fae Fixing unwrapped calloc 2013-05-27 16:45:22 -07:00
Vicent Martí
8baca134cc Merge pull request #1614 from schu/packbuilder-write
packbuilder: also write index in git_packbuilder_write
2013-05-27 06:15:28 -07:00
Michael Schubert
563c19a9ce 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.
2013-05-27 13:41:09 +02:00
Vicent Martí
63908cee27 Merge pull request #1613 from schu/transport-ssh
tests: don't verify SSH unsupported with GIT_SSH
2013-05-27 03:24:52 -07:00
Michael Schubert
0582ae6fde tests: don't verify SSH unsupported with GIT_SSH 2013-05-27 12:12:27 +02:00
Russell Belfer
5aee96329a Merge pull request #1612 from drodriguez/fix-branch-delete-docs
Fix documentation of git_branch_delete.
2013-05-26 08:45:30 -07:00
Daniel Rodríguez Troitiño
f8bd730cd9 Fix documentation of git_branch_delete.
The reference should be freed by the user, not the library.
2013-05-26 17:29:00 +02:00
Vicent Martí
0d77647adc Merge pull request #1609 from ethomson/qsort_r_glibc
qsort_r appeared in glibc 2.8
2013-05-25 09:45:02 -07:00
Edward Thomson
c37fb41ae0 qsort_r appeared in glibc 2.8 2013-05-25 12:35:55 -04:00
Vicent Martí
85281328be Merge pull request #1608 from arrbee/various-cleanups-and-tweaks
Various cleanups and tweaks
2013-05-24 11:39:56 -07:00
Russell Belfer
7a5ee3dc92 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.
2013-05-24 11:09:04 -07:00
Russell Belfer
d20b044961 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.
2013-05-24 10:37:40 -07:00
Russell Belfer
16adc9fade 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.
2013-05-24 10:35:58 -07:00
Russell Belfer
2e62e7c23c 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.
2013-05-24 10:33:41 -07:00
Russell Belfer
0f1f9833cf Add typedefs on some public enums
Apparently this makes things easier to bind in some languages.
2013-05-24 10:32:07 -07:00
Russell Belfer
5e57cfa1b3 Merge pull request #1607 from ethomson/hurd
qsort_r is broken on HURD, avoid
2013-05-24 09:12:17 -07:00
Vicent Martí
4bc67efd74 Merge pull request #1605 from ethomson/replace_reuc_fix
Cherry picking REUC fixes
2013-05-24 05:36:23 -07:00
Russell Belfer
43efc4493d 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.
2013-05-24 07:11:22 -05:00
Edward Thomson
25a899ec84 qsort_r is broken on HURD, avoid 2013-05-24 10:32:26 +00:00
Vicent Martí
26ab6284b2 Merge pull request #1593 from ethomson/conflict_iterator
introduce git_conflict_iterator
2013-05-24 03:30:35 -07:00
Vicent Martí
f7ceef06eb Merge pull request #1592 from ethomson/merge_setup
merge setup
2013-05-24 03:24:27 -07:00
Vicent Martí
4811c1500b Merge pull request #1603 from ben/shallow
Shallow-clone detection
2013-05-24 01:14:52 -07:00
Vicent Martí
30caf0cf29 Merge pull request #1595 from arrbee/even-more-rename-fixes
Even more rename detection fixes
2013-05-24 01:13:48 -07:00
Vicent Martí
87a56fe015 Merge pull request #1604 from arrbee/config-file-checks
Extend checking for config with no files
2013-05-24 00:44:50 -07:00
Ben Straub
6f0b8142e6 Stop leaking memory 2013-05-23 17:28:52 -07:00
Russell Belfer
0700ca1a74 More config code checks and cleanups 2013-05-23 16:11:53 -07:00
Russell Belfer
3b32b6d3cc More tests of config with various absent files
Plus a bit of extra paranoia to ensure config object has valid
contents.
2013-05-23 15:57:52 -07:00
Russell Belfer
49f70f2c37 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.
2013-05-23 15:48:06 -07:00
Ben Straub
93d8f77fed Improve test failure output 2013-05-23 15:35:50 -07:00
Russell Belfer
f38cea97c3 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.
2013-05-23 15:21:43 -07:00
Russell Belfer
67db583dab 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.
2013-05-23 15:06:07 -07:00
Russell Belfer
c68b09dc7a 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.
2013-05-23 11:52:34 -07:00
Ben Straub
9c941ccfaf Merge pull request #1599 from nulltoken/topic/windows_resources
Update windows resources to match the dll name
2013-05-23 08:52:24 -07:00
Ben Straub
c4085fbf1d Merge pull request #1601 from Merovius/bugfix_shorten
Bugfix: Return NULL in push_leaf, when trie is full
2013-05-23 07:31:05 -07:00
Axel Wagner
06c070b5bb Add testcase for #1600 2013-05-23 09:43:56 +02:00
Russell Belfer
a21cbb12db 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.
2013-05-22 10:37:12 -07:00
Axel Wagner
52f537e9c5 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.
2013-05-22 02:04:12 +02:00
nulltoken
095bfd7487 cmake: Update Windows resources to reflect the optional vendor string
Make InternalName and OriginalFilename resources reflect the name of the compiled binary.
2013-05-22 00:15:13 +02:00
nulltoken
ccf1a2ba5f cmake: Fix indentation 2013-05-22 00:15:12 +02:00
Ben Straub
6828bf26e9 Merge pull request #1594 from nulltoken/topic/tag_annotation
tag: Introduce git_tag_annotation_create()
2013-05-21 10:49:36 -07:00
nulltoken
b81cc1d63b tag: Introduce git_tag_annotation_create() 2013-05-21 19:32:59 +02:00
Ben Straub
e167ec1897 Merge pull request #1597 from zodiac/patch-1
define "long name" in git_reference_name_to_id
2013-05-21 08:09:17 -07:00
Carlos Martín Nieto
fc74343ff4 refs: export the glob iterator 2013-05-21 16:51:50 +02:00
Li Xuanji
e069478edc define "long name" in git_reference_name_to_id 2013-05-21 21:35:58 +08:00