Commit Graph

6779 Commits

Author SHA1 Message Date
Sven Strickroth
fa13ee2d7c Add GIT_BRANCH_ALL to git_branch_t enum
git_branch_t is an enum so requesting GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE is not possible as it is not a member of the enum (at least VS2013 C++ complains about it).

This fixes a regression introduced in commit a667ca8298 (PR #1946).

Signed-off-by: Sven Strickroth <email@cs-ware.de>
2014-04-16 18:51:16 +02:00
Vicent Marti
37ab5ecc10 Merge pull request #2269 from libgit2/rb/fix-leading-slash-ignores
Fix core.excludesfile named .gitignore
2014-04-16 10:51:25 +02:00
Vicent Marti
0f7aa47dbd Merge pull request #2235 from jacquesg/cherry-pick
Add cherry pick support
2014-04-15 20:26:23 +02:00
Jacques Germishuys
39206ca256 Added a test case for formatting a binary patch e-mail 2014-04-15 17:22:17 +02:00
Jacques Germishuys
a56b418d85 Sanitize git_diff_format_email_options' summary parameter
It will form part of the subject line and should thus be one line.
2014-04-15 17:22:17 +02:00
Jacques Germishuys
d8cc1fb653 Introduce git_diff_format_email and git_diff_commit_as_email 2014-04-15 17:22:17 +02:00
Jacques Germishuys
360314c9db Introduce git_diff_get_stats, git_diff_stats_files_changed, git_diff_stats_insertions, git_diff_stats_deletions and git_diff_stats_to_buf 2014-04-15 17:22:12 +02:00
Jacques Germishuys
cab39378dc Added git_diff_stats test files 2014-04-15 17:22:03 +02:00
Russell Belfer
a9528b8fdd Fix core.excludesfile named .gitignore
Ignore rules with slashes in them are matched using FNM_PATHNAME
and use the path to the .gitignore file from the root of the
repository along with the path fragment (including slashes) in
the ignore file itself.  Unfortunately, the relative path to the
.gitignore file was being applied to the global core.excludesfile
if that was also named ".gitignore".

This fixes that with more precise matching and includes test for
ignore rules with leading slashes (which were the primary example
of this being broken in the real world).

This also backports an improvement to the file context logic from
the threadsafe-iterators branch where we don't rely on mutating
the key of the attribute file name to generate the context path.
2014-04-14 15:59:48 -07:00
Vicent Marti
289e31cd24 Merge pull request #2264 from jacquesg/fix-warnings
Correct C90 warnings
2014-04-14 23:11:06 +02:00
Jacques Germishuys
6fefb7af84 Capture conflict information in MERGE_MSG for revert and merge 2014-04-14 16:16:22 +02:00
Jacques Germishuys
103b7d2122 Added cherry pick tests 2014-04-14 16:16:22 +02:00
Jacques Germishuys
4d7b993904 Added cherry-pick support 2014-04-14 16:16:21 +02:00
Jacques Germishuys
399f2b6294 Introduce git_merge__extract_conflict_paths 2014-04-14 16:16:21 +02:00
Vicent Marti
06d772d8d4 Merge pull request #2262 from libgit2/rb/fix-ignore-pop
Fix bug popping ignore files during wd iteration
2014-04-14 14:49:01 +02:00
Jacques Germishuys
efaa342cbb Correct C90 warnings 2014-04-11 22:48:42 +02:00
Jacques Germishuys
7a28f268ad Fix const-correctness of git_patch_get_delta, git_patch_num_hunks, git_patch_num_lines_in_hunk 2014-04-11 21:55:36 +02:00
Jacques Germishuys
51297cadb3 Added RFC2822 date format test cases 2014-04-11 21:55:36 +02:00
Jacques Germishuys
8e14b47fd7 Introduce git__date_rfc2822_fmt. Allows for RFC2822 date headers 2014-04-11 21:55:35 +02:00
Russell Belfer
8f7bc6461b Fix bug popping ignore files during wd iteration
There were a couple bugs in popping ignore files during iteration
that could result in incorrect decisions be made and thus ignore
files below the root either not being loaded correctly or not
being popped at the right time.

One bug was an off-by-one in comparing the path of the gitignore
file with the path being exited during iteration.

The second bug was not correctly truncating the path being tracked
during traversal if there were no ignores on the list (i.e. when
you have no .gitignore at the root, but do have some in contained
directories).
2014-04-10 16:33:39 -07:00
Jacques Germishuys
b3b36a68d1 Introduce git_buf_putcn
Allows for inserting the same character n amount of times
2014-04-10 18:24:16 +02:00
Vicent Marti
bcc622934a Merge pull request #2259 from libgit2/vmg/state-cleanup
Rewrite `state-cleanup`
2014-04-09 12:45:49 +02:00
Vicent Marti
c3dcbe8488 Rewrite git_repository__cleanup_files 2014-04-09 12:43:27 +02:00
Vicent Marti
361e919280 Merge pull request #2257 from libgit2/rb/fix-submodules-with-tracked-content
Update treatment of submodule-like directories with tracked content in the parent
2014-04-09 12:09:30 +02:00
Vicent Marti
3ed8d00cc8 Merge pull request #2258 from libgit2/jk/userdiff-cc
pull userdiff pattern updates from git.git
2014-04-09 12:08:30 +02:00
Jeff King
9ce60fadda userdiff: update ada patterns
This is the moral equivalent of

  git/git@39a87a29ce

from Adrian Johnson <ajohnson@redneon.com>.
2014-04-08 18:46:56 -04:00
Jeff King
76b4e3d4de userdiff: update C/C++ patterns
This pulls upstream changes from:

  git/git@8a2e8da367

  git/git@abf8f98602

  git/git@407e07f2a6

all by Johannes Sixt <j6t@kdbg.org>.
2014-04-08 18:46:56 -04:00
Russell Belfer
eb7e17cc90 Update submodules with parent-tracked content
This updates how libgit2 treats submodule-like directories that
actually have tracked content inside of them.  This is a strange
corner case, but it seems that many people have abortive submodule
setups and then just went ahead and added the files into the
parent repository.  In this case, we should just treat the
submodule as if it was a normal directory.

Libgit2 will still try to skip over real submodules and contained
repositories that do not have tracked files inside them, but this
adds some new handling for cases where the apparently submodule
data is in conflict with the actual list of tracked files.
2014-04-08 14:47:20 -07:00
Carlos Martín Nieto
ce2e82694a graph: handle not finding a merge base gracefully
git_merge_base() returns GIT_ENOTFOUND when it cannot find a merge
base. graph_desdendant_of() returns a boolean value (barring any
errors), so it needs to catch the NOTFOUND return value and convert it
into false, as not merge base means it cannot be a descendant.
2014-04-08 16:52:20 +02:00
Vicent Marti
2795fb4ddd Merge pull request #2256 from jacquesg/graph-descendant
Correct grouping of parentheses
2014-04-08 16:37:39 +02:00
Jacques Germishuys
8a8e312792 Added a no path test for git_graph_descendant_of 2014-04-08 16:32:06 +02:00
Jacques Germishuys
56f8e06e49 Correct grouping of parentheses
git_graph_descendant_of was returning the result of an assignment
2014-04-08 16:30:26 +02:00
Edward Thomson
7be1caf7f5 Determine crlf safety by statistics, not literal reversibility 2014-04-07 21:41:36 -07:00
Edward Thomson
855c66de66 Introduce core.safecrlf handling 2014-04-07 21:09:09 -07:00
Vicent Marti
5f74c47693 Merge pull request #2255 from libgit2/rb/fix-multiple-nfd-iconv-bug
Fix bug with multiple iconv conversions in one dir
2014-04-07 20:51:39 +02:00
Russell Belfer
7167fd7ef8 vmg is always right 2014-04-07 11:51:12 -07:00
Russell Belfer
c813b34550 Fix bug with multiple iconv conversions in one dir
The internal buffer in the `git_path_iconv_t` structure was not
being reset before the calls to `iconv` were made to convert data,
so if there were multiple decomposed Unicode paths in a single
directory, paths after the first one were being appended to the
first instead of treated as independent data.
2014-04-07 11:45:32 -07:00
Jacques Germishuys
553184a762 Update AUTHORS 2014-04-07 20:18:17 +02:00
Jacques Germishuys
c031129510 git_repository_state_cleanup() should remove rebase-merge/, rebase-apply/ and BISECT_LOG 2014-04-07 17:35:28 +02:00
Vicent Marti
6720eef938 Merge pull request #2249 from libgit2/rb/starstar-fnmatch
Add support for ** matches in ignores
2014-04-07 11:22:23 +02:00
Russell Belfer
c7d9606066 Fix fnmatch comment to be clearer 2014-04-06 11:20:22 -07:00
Russell Belfer
c8c91433a8 More ** tests for pattern rules 2014-04-06 10:42:26 -07:00
Vicent Marti
52056db9c1 Merge pull request #2250 from jacquesg/vector-leak
Don't lose our elements when calling git_vector_set()
2014-04-06 16:22:29 +02:00
Jacques Germishuys
4998009a28 Don't lose our elements when calling git_vector_set() 2014-04-06 15:16:44 +02:00
Russell Belfer
2b6b85f116 Add support for ** matches in ignores
This is an experimental addition to add ** support to fnmatch
pattern matching in libgit2.  It needs more testing.
2014-04-04 17:02:12 -07:00
Vicent Marti
923c84008d Merge pull request #2215 from libgit2/rb/submodule-cache-fixes
Improve submodule cache management
2014-04-04 14:24:08 +02:00
Vicent Marti
f34408a7b4 Merge pull request #2211 from Yogu/retry-renaming-config
Retry committing locked files on error
2014-04-04 14:23:07 +02:00
Russell Belfer
eedeeb9e8f Test (and fix) the git_submodule_sync changes
I wrote this stuff a while ago and forgot to write tests.  Wanted
to do so now to wrap up the PR and immediately found problems.
2014-04-03 11:58:51 -07:00
Russell Belfer
18cc7d28c4 Minor code cleanup 2014-04-03 11:29:08 -07:00
Jan Melcher
f2fb4bac68 git_submodule_resolve_url supports relative urls
The base for the relative urls is determined as follows, with descending
priority:

- remote url of HEAD's remote tracking branch
- remote "origin"
- workdir

This follows git.git behaviour
2014-04-03 10:44:08 -07:00