Commit Graph

651 Commits

Author SHA1 Message Date
Brian Schroeder
b0b8065880 Update documentation in remote.h 2012-11-08 21:28:15 -08:00
Philip Kelley
9d64128325 Merge pull request #1048 from pwkelley/basic_auth
Basic authentication for http and winhttp
2012-11-08 08:06:23 -08:00
Philip Kelley
091361f569 Basic authentication for http and winhttp 2012-11-06 08:52:03 -05:00
Edward Thomson
09cc0b92dc create callback to handle packs from fetch, move the indexer to odb_pack 2012-11-05 16:00:29 -06:00
Vicent Martí
942a76983b Merge pull request #1034 from carlosmn/packbuilder-foreach
Let the user grab the packfile as it's being written
2012-11-05 06:54:34 -08:00
Vicent Martí
1362a98316 Merge pull request #1014 from arrbee/diff-rename-detection
Initial implementation of diff rename detection
2012-11-02 10:00:28 -07:00
Vicent Martí
d13da328e2 Merge pull request #1038 from arrbee/doc-fixes
Improve docs, examples, warnings
2012-11-01 14:18:40 -07:00
Russell Belfer
b90500f03d Improve docs, examples, warnings
This improves docs in some of the public header files, cleans
up and improves some of the example code, and fixes a couple
of pedantic warnings in places.
2012-11-01 14:08:30 -07:00
Vicent Marti
1e808f9cda index: Add git_index_new 2012-11-01 20:28:28 +01:00
Vicent Marti
276ea401b3 index: Add git_index_write_tree 2012-11-01 20:17:10 +01:00
Vicent Martí
7ae73e94db Merge pull request #1030 from pwkelley/transports
Reorganize transport architecture
2012-11-01 09:15:29 -07:00
Philip Kelley
41fb1ca0ec Reorganize transport architecture (squashed 3) 2012-11-01 09:02:33 -04:00
Carlos Martín Nieto
b4b935d8ab packbuilder: add accessors for the number of total and written objects 2012-11-01 06:21:49 +01:00
Carlos Martín Nieto
3dfed9cb86 packbuilder: add git_packbuilder_foreach
Let the user get each object as a buffer+size pair so they can handle
the packfile content as they need to.
2012-11-01 06:21:49 +01:00
Russell Belfer
744cc03e2b Add git_config_refresh() API to reload config
This adds a new API that allows users to reload the config if the
file has changed on disk.  A new config callback function to
refresh the config was added.

The modified time and file size are used to test if the file needs
to be reloaded (and are now stored in the disk backend object).

In writing tests, just using mtime was a problem / race, so I
wanted to check file size as well.  To support that, I extended
`git_futils_readbuffer_updated` to optionally check file size in
addition to mtime, and I added a new function `git_filebuf_stats`
to fetch the mtime and size for an open filebuf (so that the
config could be easily refreshed after a write).

Lastly, I moved some similar file checking code for attributes
into filebuf.  It is still only being used for attrs, but it
seems potentially reusable, so I thought I'd move it over.
2012-10-30 12:11:23 -07:00
Vicent Martí
efde422553 Merge pull request #1017 from arrbee/diff-patch-to-str
Add git_diff_patch_to_str API
2012-10-30 12:04:28 -07:00
Vicent Martí
c4a9ded0f9 Merge pull request #1026 from nulltoken/repo/state
repo: enhance git_repository_state() detection
2012-10-30 12:03:22 -07:00
Russell Belfer
db106d01f0 Move rename detection into new file
This improves the naming for the rename related functionality
moving it to be called `git_diff_find_similar()` and renaming
all the associated constants, etc. to make more sense.

I also moved the new code (plus the existing `git_diff_merge`)
into a new file `diff_tform.c` where I can put new functions
related to manipulating git diff lists.

This also updates the implementation significantly from the
last revision fixing some ordering issues (where break-rewrite
needs to be handled prior to copy and rename detection) and
improving config option handling.
2012-10-30 09:40:50 -07:00
Edward Thomson
f45ec1a076 index refactoring 2012-10-29 20:04:21 -05:00
nulltoken
31966d20e3 repo: enhance git_repository_state() detection 2012-10-27 16:45:59 +02:00
nulltoken
e4c64cf2aa stash: add git_stash_drop() 2012-10-26 22:11:15 +02:00
nulltoken
233884131d stash: add git_stash_foreach() 2012-10-26 22:11:09 +02:00
nulltoken
590fb68be0 stash: add git_stash_save() 2012-10-26 22:10:48 +02:00
nulltoken
eb44cfe07b error: add GITERR_STASH error type 2012-10-26 21:02:06 +02:00
nulltoken
b1be9dd0e5 index: introduce git_index_owner() 2012-10-26 21:02:04 +02:00
nulltoken
f7ae3f7531 reflog: fix documentation typos 2012-10-26 21:01:59 +02:00
Russell Belfer
cb7180a6e2 Add git_diff_patch_print
This adds a `git_diff_patch_print()` API which is more like the
existing API to "print" a patch from an entire `git_diff_list`
but operates on a single `git_diff_patch` object.

Also, it rewrites the `git_diff_patch_to_str()` API to use that
function (making it very small).
2012-10-25 11:48:39 -07:00
Russell Belfer
1b9346897b Merge pull request #925 from nulltoken/topic/moving-branch-updates-config
Updates config upon moving and deletion of branches
2012-10-25 10:55:03 -07:00
nulltoken
fcccf3045f remote: introduce git_remote_rename() 2012-10-25 17:42:36 +02:00
Vicent Martí
1eb8cd7f87 Merge pull request #990 from ben/clone-callbacks
Progress callbacks
2012-10-25 08:16:13 -07:00
Russell Belfer
93cf7bb8e2 Add git_diff_patch_to_str API
This adds an API to generate a complete single-file patch text
from a git_diff_patch object.
2012-10-24 20:56:32 -07:00
Edward Thomson
03bdb2addd GIT_EUNMERGED 2012-10-24 20:24:37 -05:00
Edward Thomson
632d8b230b reset changes for merge 2012-10-24 20:24:37 -05:00
Ben Straub
1e3b8ed5cf Remove 'bytes' param from git_remote_download 2012-10-24 14:07:07 -07:00
Ben Straub
7d222e1312 Network progress: rename things
git_indexer_stats and friends -> git_transfer_progress*

Also made git_transfer_progress members more sanely
named.
2012-10-24 13:29:14 -07:00
Ben Straub
c4958e6818 Fix documentation comment 2012-10-24 12:38:05 -07:00
Ignacio Casal Quinteiro
4bc252e4ec Fix example in comment 2012-10-24 15:00:56 +02:00
Russell Belfer
b4f5bb0747 Initial implementation of diff rename detection
This implements the basis for diff rename and copy detection,
although it is based on simple SHA comparison right now instead
of using a matching algortihm.  Just as `git_diff_merge` can be
used as a post-pass on diffs to emulate certain command line
behaviors, there is a new API `git_diff_detect` which will
update a diff list in-place, adjusting some deltas to RENAMED
or COPIED state (and also, eventually, splitting MODIFIED deltas
where the change is too large into DELETED/ADDED pairs).

This also adds a new test repo that will hold rename/copy/split
scenarios.  Right now, it just has exact-match rename and copy,
but the tests are written to use tree diffs, so we should be able
to add new test scenarios easily without breaking tests.
2012-10-23 16:40:51 -07:00
Ben Straub
c70ad945cd Update doc strings, warn about callback perf 2012-10-23 09:23:44 -07:00
yorah
a1abe66aca Add config level support in the config API
Added `struct git_config_entry`: a git_config_entry contains the key, the value, and the config file level from which a config element was found.
Added `git_config_open_level`: build a single-level focused config object from a multi-level one.

We are now storing `git_config_entry`s in the khash of the config_file
2012-10-23 12:48:38 +02:00
Ben Straub
9c05c17b7a Checkout progress now reports completed/total steps 2012-10-19 20:05:18 -07:00
Ben Straub
7bcd9e23e8 gitno_buffer: callback on each packet
The fetch code takes advantage of this to implement a
progress callback every 100kb of transfer.
2012-10-19 19:36:23 -07:00
Ben Straub
aa1e86741d Clone: in-line callbacks for progress
Also implemented in the git2 example.
2012-10-19 19:36:22 -07:00
Ben Straub
216863c48f Fetch/indexer: progress callbacks 2012-10-19 19:36:22 -07:00
nulltoken
0ae81fc479 index: remove read_tree() progress indicator
git_index_read_tree() was exposing a parameter to provide the user with
a progress indicator. Unfortunately, due to the recursive nature of the
tree walk, the maximum number of items to process was unknown. Thus,
the indicator was only counting processed entries, without providing
any information how the number of remaining items.
2012-10-19 19:36:22 -07:00
Ben Straub
183d8bddeb Remove checkout_stats from git_clone 2012-10-19 19:36:22 -07:00
Ben Straub
806426565f Convert checkout_* to use progress callback 2012-10-19 19:36:21 -07:00
Ben Straub
2c8bbb27d9 Convert checkout_index to use progress callback 2012-10-19 19:34:15 -07:00
Ben Straub
d57c47dc07 Add accessor for git_remote's stats field
Also converted the network example to use it.
2012-10-19 19:34:15 -07:00
Ben Straub
3028be0723 Add git_indexer_stats field to git_remote
Also removing all the *stats parameters from external
APIs that don't need them anymore.
2012-10-19 19:34:14 -07:00