Commit Graph

5789 Commits

Author SHA1 Message Date
Vicent Martí
1c74686e05 Merge pull request #1897 from libgit2/split-patch-from-diff
RFC: Proposed reworking of diff APIs
2013-10-22 11:55:54 -07:00
Russell Belfer
7ce60099ee Fix typo 2013-10-22 11:12:44 -07:00
Vicent Marti
98fec8a937 Implement git_odb_object_dup 2013-10-22 16:06:12 +02:00
Russell Belfer
5de4ec8104 Implement patience and minimal diff flags
It seems that to implement these options, we just have to pass
the appropriate flags through to the libxdiff code taken from
core git.  So let's do it (and add a test).
2013-10-21 15:36:38 -07:00
Russell Belfer
623460ab13 Fix warnings for win64 2013-10-21 14:16:53 -07:00
Russell Belfer
3b5f795446 Create git_diff_line and extend git_diff_hunk
Instead of having functions with so very many parameters to pass
hunk and line data, this takes the existing git_diff_hunk struct
and extends it with more hunk data, plus adds a git_diff_line.
Those structs are used to pass back hunk and line data instead of
the old APIs that took tons of parameters.

Some work that was previously only being done for git_diff_patch
creation (scanning the diff content for exact line counts) is now
done for all callbacks, but the performance difference should not
be noticable.
2013-10-21 13:42:42 -07:00
Vicent Martí
86774742a9 Merge pull request #1903 from ethomson/ssh
Allowed credential types should be a bitfield
2013-10-21 13:06:27 -07:00
Edward Thomson
2648dc1a06 Allowed credential types should be a bitfield 2013-10-21 14:02:36 -05:00
Russell Belfer
74a627f045 Tweak to git_diff_delta structure for nfiles
While the base git_diff_delta structure always contains two files,
when we introduce conflict data, it will be helpful to have an
indicator when an additional file is involved.
2013-10-21 09:07:19 -07:00
Vicent Martí
901c34f233 Merge pull request #1900 from haneefmubarak/patch-1
license clarification + formatting all over
2013-10-18 10:00:26 -07:00
Haneef Mubarak
caf9334115 slightly clarified the "license" portion of `README.md" + formatting all over
fixed typo `can can` -> `can`
2013-10-17 16:01:43 -07:00
Haneef Mubarak
e5e2710b78 slightly clarified the "license" portion of `README.md" + formatting all over
added the second change suggested by @nulltoken (with two extra words :) )
2013-10-17 01:52:20 -07:00
Haneef Mubarak
20b5d300dc slightly clarified the "license" portion of `README.md" + formatting all over
There are commercial open source applications, hence proprietary seems to be a better term.

Also:
 - Trimmed header `=`'s to match text length
 - made libgit2 stand out everywhere
 - pretty printing links
 - irc link for those with the correct setup
2013-10-17 00:28:08 -07:00
Vicent Martí
b2c9e41ae4 Merge pull request #1702 from ethomson/checkout_merge
Checkout merge
2013-10-16 13:51:24 -07:00
Edward Thomson
c929d6b727 Move path prefixed help to path.h 2013-10-16 16:20:24 -04:00
Edward Thomson
7fa73de163 Move functions in checkout_conflicts to checkout.c
It seemed exceptionally silly to have a split there
where no split needed to be.
2013-10-16 16:20:21 -04:00
Edward Thomson
216f97e4f6 Two-step conflict checkout (load / perform)
Move conflict handling into two steps: load the conflicts and
then apply the conflicts.  This is more compatible with the
existing checkout implementation and makes progress reporting
more sane.
2013-10-16 16:20:19 -04:00
Edward Thomson
cfae7f85fb Honor UPDATE_ONLY bit when checking out conflicts 2013-10-16 16:20:18 -04:00
Edward Thomson
6f8cc7bb6a Fix warning, fix memory leak 2013-10-16 16:20:16 -04:00
Edward Thomson
e47f859db9 Don't overwrite ~ files checking out conflicts
If a D/F conflict or rename 2->1 conflict occurs,
we write the file sides as filename~branchname.  If
a file with that name already exists in the working
directory, write as filename~branchname_0 instead.
(Incrementing 0 until a unique filename is found.)
2013-10-16 16:20:14 -04:00
Edward Thomson
fc36800ecd Get rid of some quick hacks 2013-10-16 16:20:12 -04:00
Edward Thomson
96d799aa18 checkout rename conflicts
rename conflict tests for checkout conflicts, don't suffix filenames
when checking out with USE_OURS or USE_THEIRS
2013-10-16 16:20:10 -04:00
Edward Thomson
4f7897ab19 Prevent checkout_tree when conflicts exist, clear NAME on checkout tree
Prevent checkout tree when unresolved changes exist (unless FORCE flag
is specified).  Clear NAME table when checking out, to avoid
checkout_conflicts from attempting to manipulate it.  Ensure that NAME
is also cleared at reset.
2013-10-16 16:20:08 -04:00
Edward Thomson
629b661caa checkout (from index) can write conflicts 2013-10-16 16:20:06 -04:00
Edward Thomson
3acf44d6cb tests for checkout index with conflicts 2013-10-16 16:20:04 -04:00
Russell Belfer
10672e3e45 Diff API cleanup
This lays groundwork for separating formatting options from diff
creation options.  This groups the formatting flags separately
from the diff list creation flags and reorders the options.  This
also tweaks some APIs to further separate code that uses patches
from code that just looks at git_diffs.
2013-10-15 15:10:07 -07:00
Russell Belfer
3ff1d12373 Rename diff objects and split patch.h
This makes no functional change to diff but renames a couple of
the objects and splits the new git_patch (formerly git_diff_patch)
into a new header file.
2013-10-11 14:51:54 -07:00
Vicent Martí
2c2b0ebb4a Merge pull request #1562 from libgit2/cmn/refs-namespace-lookup
Provide the user with a more useful error code when a looking up a reference which name points to a namepace
2013-10-11 09:47:05 -07:00
Carlos Martín Nieto
893055f22e indexer: clearer stats for thin packs
Don't increase the number of total objects, as it can produce
suprising progress output. The only addition compared to pre-thin is
the addition of local_objects to allow an output similar to git's
"completed with %d local objects".
2013-10-11 17:26:20 +02:00
Carlos Martín Nieto
7c9f5bec51 futils: return GIT_ENOTFOUND when trying to read a directory
This lets the reference code return not-found when the user asks to
look up a reference when in fact they pass a namespace.
2013-10-11 16:29:59 +02:00
Ben Straub
4d43e6300c Merge pull request #1898 from arthurschreiber/patch-2
Fix a typo in the rpm build instructions.
2013-10-10 15:29:57 -07:00
Arthur Schreiber
84c469814e Fix a typo in the rpm build instructions. 2013-10-11 00:06:08 +02:00
Ben Straub
364d800b01 Move flag dependencies into docs and code. 2013-10-10 14:53:07 -07:00
Ben Straub
4fd847bb94 Fix initializer error 2013-10-10 14:38:15 -07:00
Ben Straub
607fe73370 Fix post-line-range iteration 2013-10-10 14:30:31 -07:00
Ben Straub
c1ca2b67e1 Include signatures in blame hunks 2013-10-10 14:30:05 -07:00
Ben Straub
ebd67243d5 Only show lines that had blame run on them 2013-10-10 13:56:45 -07:00
Ben Straub
d2e7532f62 Be more flexible with argument order and format 2013-10-10 13:56:28 -07:00
Ben Straub
0a23d2058d Ignore more built examples 2013-10-09 16:18:32 -07:00
Ben Straub
43a07b860b Simplify loading blob 2013-10-09 16:16:43 -07:00
Ben Straub
2ccc84d2ef Allow null bytes in blob 2013-10-09 16:07:36 -07:00
Ben Straub
cb45dafaf8 Initialize threading, fix broken strncmp 2013-10-09 16:07:17 -07:00
Ben Straub
370d1d166e Un-remove init example 2013-10-09 14:41:44 -07:00
Russell Belfer
743531372a After iconv init reset ref normalize error
The iconv init was accidentally clearing the default error state
during reference normalization. This resets so that normalization
errors will be detected correctly.
2013-10-09 11:57:03 -07:00
Vicent Martí
95c148b2c7 Merge pull request #1886 from libgit2/precompose-utf8
Add support for core.precomposeunicode on Mac
2013-10-08 17:03:12 -07:00
Russell Belfer
867f7c9b33 Rename new fn to git_repository_reinit_filesystem 2013-10-08 16:59:59 -07:00
Russell Belfer
92dac97586 Make reference lookups apply precomposeunicode
Before these changes, looking up a reference would return the
same precomposed or decomposed form of the reference name that
was used to look it up, so on MacOS which ignores the difference
between the two, a single reference could be looked up either way
and git_reference_name would return the form of the name that was
used to look it up!  This change makes lookup always return the
precomposed name if core.precomposeunicode is set regardless of
which version was used to look it up.  The reference iterator was
already returning the precomposed form from earlier work.

This also updates the CMakeLists.txt rules for enabling iconv
usage because the clar tests for this code were actually not being
activated properly with the old version.

Finally, this moves git_repository_reset_filesystem from include/
git2/repository.h to include/git2/sys/repository.h since it is not
really a function that normal library users should have to think
about very often.
2013-10-08 16:35:57 -07:00
Vicent Martí
062c95c2a9 Merge pull request #1895 from libgit2/winhttp-accept
WinHTTP: set Accept header for POSTs
2013-10-08 16:32:06 -07:00
Ben Straub
3dc3c723da Combine WinHTTP API calls 2013-10-08 15:52:37 -07:00
Russell Belfer
d5e83627e4 Case sensitivity issues on Linux
A couple of tests were actually dealing incorrectly with case
sensitivity issues on Linux because they were relying on having
core.ignorecase set to true.  Now that the fixture initialization
sets the case sensitivity to be accurate for the platform, it
exposed bugs in these tests.
2013-10-08 14:41:32 -07:00