Commit Graph

874 Commits

Author SHA1 Message Date
Vicent Marti
e13a0647a0 Update docs 2013-04-15 23:54:28 +02:00
Vicent Marti
cbda09d00b git_revision -> git_revspec 2013-04-15 23:40:46 +02:00
Vicent Marti
36c2dfed69 Is this crazy? 2013-04-15 23:32:40 +02:00
Vicent Marti
d064c74794 Merge remote-tracking branch 'ben/unified-revparse' into development 2013-04-15 23:18:24 +02:00
Ben Straub
201566539f Clean up minor details 2013-04-15 13:29:40 -07:00
Ben Straub
299a224be1 Change git_revparse to output git_object pointers
This will probably prevent many lookup/free
operations in calling code.
2013-04-15 12:00:04 -07:00
Ben Straub
4291ad0781 Reintroduce git_revparse_single. 2013-04-15 11:42:34 -07:00
Vicent Martí
ea8bac37b0 Merge pull request #1450 from carlosmn/branch-upstream
Branch upstream configuration
2013-04-11 06:34:59 -07:00
Carlos Martín Nieto
d59942c2ab branch: add more upstream configuration management
Add functions to set and unset the upstream configuration to
complement the getter we already have.
2013-04-11 12:27:25 +02:00
Vicent Marti
575a54db85 object: Export git_object_dup 2013-04-10 16:56:32 +02:00
Russell Belfer
ad26434b3b Tests and more fixes for submodule diffs
This adds tests for diffs with submodules in them and (perhaps
unsurprisingly) requires further fixes to be made.  Specifically,
this fixes:

- when considering if a submodule is dirty in the workdir, it was
  being treated as dirty even if only the index was dirty.
- git_diff_patch_to_str (and git_diff_patch_print) were "printing"
  the headers for files (and submodules) that were unmodified or
  had no meaningful content.
- added comment to previous fix and removed unneeded parens.
2013-04-09 14:52:32 -07:00
Ben Straub
1aa21fe3b8 Deprecate git_revparse_single and _rangelike 2013-04-09 05:07:04 +04:00
Ben Straub
8480eef7ee Implement unified git_revparse 2013-04-08 16:36:11 +04:00
Ben Straub
4d13d07ab2 Propose unified rev-parse API 2013-04-08 16:35:09 +04:00
Vicent Marti
d9ecaf8c6f Merge remote-tracking branch 'gnprice/revwalk' into development 2013-04-07 07:22:38 +02:00
Greg Price
af079d8bf6 revwalk: Parse revision ranges
All the hard work is already in revparse.

Signed-off-by: Greg Price <price@mit.edu>
2013-04-06 20:51:16 -07:00
Greg Price
b208d90022 revparse: Parse range-like syntax
Signed-off-by: Greg Price <price@mit.edu>
2013-04-06 20:51:16 -07:00
Edward Thomson
c869e26878 export git_reference__alloc 2013-04-02 18:57:42 -05:00
nulltoken
b08c317346 branch: Fix git_branch_create() documentation 2013-04-01 22:01:13 +02:00
Greg Price
804c5f5627 Fix puzzling doc comment
Signed-off-by: Greg Price <price@mit.edu>
2013-03-31 15:33:22 -07:00
nulltoken
24cb87e2a6 tag: Fix parsing when no tagger nor message 2013-03-31 14:36:51 +02:00
Carlos Martín Nieto
a258d8e357 branch: rename 'tracking' to 'upstream'
The term 'tracking' is overloaded. Help distinguish what we mean by
using 'upstream' for this part of the library.
2013-03-30 15:45:57 +01:00
Carlos Martín Nieto
81b8c9df46 transport: don't try to export nonexistent function 2013-03-30 04:50:53 +01:00
Vicent Martí
0b061b5bfa Merge pull request #1436 from schu/opts-cache-size
opts: allow configuration of odb cache size
2013-03-26 11:05:57 -07:00
Russell Belfer
37ee70fab4 Implement GIT_STATUS_OPT_EXCLUDE_SUBMODULES
This option has been sitting unimplemented for a while, so I
finally went through and implemented it along with some tests.

As part of this, I improved the implementation of
GIT_DIFF_IGNORE_SUBMODULES so it be more diligent about avoiding
extra work and about leaving off delta records for submodules to
the greatest extent possible (though it may include them still
if you are request TYPECHANGE records).
2013-03-25 22:19:39 -07:00
Russell Belfer
0c289dd7c6 Recursing into ignored dirs for diff and status
This implements working versions of GIT_DIFF_RECURSE_IGNORED_DIRS
and GIT_STATUS_OPT_RECURSE_IGNORED_DIRS along with some tests for
the newly available behaviors.  This is not turned on by default
for status, but can be accessed via the options to the extended
version of the command.
2013-03-25 16:40:16 -07:00
Vicent Martí
1f10747854 Merge pull request #1428 from xavier-l/nul-terminated-oid
Nul terminated oid
2013-03-25 13:26:50 -07:00
Michael Schubert
f5e28202cb opts: allow configuration of odb cache size
Currently, the odb cache has a fixed size of 128 slots as defined by
GIT_DEFAULT_CACHE_SIZE. Allow users to set the size of the cache via
git_libgit2_opts().

Fixes #1035.
2013-03-25 15:45:56 +01:00
Miquel Canes Gonzalez
c2186230f3 Remove GIT_SUCCESS from documentation 2013-03-24 12:34:00 +01:00
Carlos Martín Nieto
33a59401c3 graph: make the ahead-behind docs clearer
Explain it in local-upstream branch terms so it's easier to grasp than
with the `one` and `two` naming from the merge-base code.
2013-03-22 20:27:59 +01:00
Xavier L
0c8efb38f9 Added an oid function that accepts nul-terminated strings 2013-03-21 11:59:01 -04:00
Carlos Martín Nieto
0b0ecbec2b clone: fix param comment 2013-03-19 17:42:10 +01:00
Russell Belfer
324602514f Fixes and cleanups
Get rid of some dead code, tighten things up a bit, and fix a bug
with core::env test.
2013-03-18 15:54:35 -07:00
Russell Belfer
41954a49c1 Switch search paths to classic delimited strings
This switches the APIs for setting and getting the global/system
search paths from using git_strarray to using a simple string with
GIT_PATH_LIST_SEPARATOR delimited paths, just as the environment
PATH variable would contain.  This makes it simpler to get and set
the value.

I also added code to expand "$PATH" when setting a new value to
embed the old value of the path.  This means that I no longer
require separate actions to PREPEND to the value.
2013-03-18 14:19:35 -07:00
Russell Belfer
5540d9477e Implement global/system file search paths
The goal of this work is to expose the search logic for "global",
"system", and "xdg" files through the git_libgit2_opts() interface.

Behind the scenes, I changed the logic for finding files to have a
notion of a git_strarray that represents a search path and to store
a separate search path for each of the three tiers of config file.
For each tier, I implemented a function to initialize it to default
values (generally based on environment variables), and then general
interfaces to get it, set it, reset it, and prepend new directories
to it.

Next, I exposed these interfaces through the git_libgit2_opts
interface, reusing the GIT_CONFIG_LEVEL_SYSTEM, etc., constants
for the user to control which search path they were modifying.
There are alternative designs for the opts interface / argument
ordering, so I'm putting this phase out for discussion.

Additionally, I ended up doing a little bit of clean up regarding
attr.h and attr_file.h, adding a new attrcache.h so the other two
files wouldn't have to be included in so many places.
2013-03-15 16:39:00 -07:00
Carlos Martín Nieto
1aa5318a9e diff: allow asking for diffs with no context
Previously, 0 meant default. This is problematic, as asking for 0
context lines is a valid thing to do.

Change GIT_DIFF_OPTIONS_INIT to default to three and stop treating 0
as a magic value. In case no options are provided, make sure the
options in the diff object default to 3.
2013-03-09 16:04:34 +01:00
Vicent Martí
6f83a78133 Merge pull request #1403 from ethomson/tracing
Optional tracing back to consumers
2013-03-07 11:14:03 -08:00
Edward Thomson
b5ec5430a8 optional tracing 2013-03-07 12:42:33 -06:00
Vicent Marti
33abaad809 refs: Dude, you're OUT. 2013-03-07 18:58:34 +01:00
Edward Thomson
d00d54645d immutable references and a pluggable ref database 2013-03-07 11:01:52 -06:00
Nico von Geyso
f7b1850215 fixed minor issues with new note iterator
* fixed style issues
* use new iterator functions for git_note_foreach()
2013-03-06 22:36:19 +01:00
Nico von Geyso
1a90dcf64e use git_note_iterator type instead of non-public git_iterator one 2013-03-06 19:07:56 +01:00
Nico von Geyso
6edb427b76 basic note iterator implementation
* git_note_iterator_new() - create a new note iterator
* git_note_next() - retrieves the next item of the iterator
2013-03-06 17:01:33 +01:00
Carlos Martín Nieto
3d74702eec Make sure docurium can see git_packbuilder_foreach 2013-03-05 23:50:43 +01:00
Edward Thomson
5bddabcca5 clear REUC on checkout 2013-03-04 18:10:57 -06:00
Carlos Martín Nieto
447ae791e5 indexer: kill git_indexer
This was the first implementation and its goal was simply to have
something that worked. It is slow and now it's just taking up
space. Remove it and switch the one known usage to use the streaming
indexer.
2013-03-03 15:19:21 +01:00
Vicent Martí
e68e33f33d Merge pull request #1233 from arrbee/file-similarity-metric
Add file similarity scoring to diff rename/copy detection
2013-02-27 14:50:32 -08:00
Michael Schubert
fcc265fef8 pack.h: improve docs on how to create a packfile 2013-02-25 22:22:15 +01:00
nulltoken
c1b5e8c42b branch: Make git_branch_remote_name() cope with orphaned heads 2013-02-22 17:04:23 +01:00
Russell Belfer
d4b747c1cb Add diff rename tests with partial similarity
This adds some new tests that actually exercise the similarity
metric between files to detect renames, copies, and split modified
files that are too heavily modified.

There is still more testing to do - these tests are just partially
covering the cases.

There is also one bug fix in this where a change set with only
MODIFY being broken into ADD/DELETE (due to low self-similarity)
without any additional RENAMED entries would end up not processing
the split requests (because the num_rewrites counter got reset).
2013-02-21 16:44:44 -08:00