Commit Graph

642 Commits

Author SHA1 Message Date
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
43eeca04a7 index: Fix tests 2012-11-01 20:24:43 +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
e068f2bb71 Fix a bug in cl_setenv on Windows XP 2012-11-01 11:50:08 -04:00
Philip Kelley
41fb1ca0ec Reorganize transport architecture (squashed 3) 2012-11-01 09:02:33 -04: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
Vicent Martí
6c21358a89 Merge pull request #1029 from ethomson/index_refactor
Index changes
2012-10-30 11:51:58 -07:00
Michael Schubert
6cfbbf7e32 Fix a couple of warnings 2012-10-30 18:50:59 +01:00
Edward Thomson
f45ec1a076 index refactoring 2012-10-29 20:04:21 -05:00
Ben Straub
81eecc342b Fetch: don't clobber received count
This memset was being reached after the entire packfile under
WinHttp, so the byte count was being lost for small repos.
2012-10-29 13:34:14 -07:00
nulltoken
31966d20e3 repo: enhance git_repository_state() detection 2012-10-27 16:45:59 +02:00
nulltoken
00e161b977 tests: fix a memory leak 2012-10-27 11:43:48 +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
1f87fa3595 reflog: fix bogus removal of reflog entries 2012-10-26 21:02:01 +02:00
nulltoken
65d12df525 message: reorganize tests 2012-10-26 21:01:58 +02: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
Ben Straub
1fc375e6ef Fix Windows build
Pedantic ordering of GIT_UNUSED vs. variable declarations.
2012-10-25 09:02:55 -07:00
nulltoken
fcccf3045f remote: introduce git_remote_rename() 2012-10-25 17:42:36 +02:00
nulltoken
3a14d3e2bc buf: introduce git_buf_splice() 2012-10-25 17:42:35 +02:00
nulltoken
e497b16c57 remote: prevent from saving a nameless remote 2012-10-25 17:42:33 +02:00
nulltoken
383f164a09 branch: rename config section upon moving 2012-10-25 17:42:31 +02:00
nulltoken
0b98a8a424 branch: remove config section upon deletion 2012-10-25 17:42:31 +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
Michael Schubert
6f6b0c013c tests-clar/repo: remove unused variable 2012-10-24 15:42:09 +02: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
yorah
f8ede94808 Fix adding variable to config file with no trailing newline
This can occur after a manual modification of a config file.
2012-10-23 11:48:50 +02:00
Vicent Martí
8a89aa1f57 Merge pull request #963 from carlosmn/remote-save-autotag
Save the autotag configuration for remotes
2012-10-22 12:04:48 -07:00
nulltoken
f36fb761dc tests: more git_repository_head_detached() coverage 2012-10-22 19:46:00 +02:00
nulltoken
c436ed26e0 reset: make git_reset() cope with an orphaned HEAD 2012-10-22 19:46:00 +02:00
nulltoken
cd1ef82253 test: extract make_head_orphaned() logic 2012-10-20 12:07:53 +02:00
nulltoken
209e34fa70 tests: leverage git_repository_detach_head() 2012-10-20 12:01:04 +02:00
Ben Straub
9c05c17b7a Checkout progress now reports completed/total steps 2012-10-19 20:05:18 -07:00
Ben Straub
cd001bbbfe Fix from rebase 2012-10-19 19:37:47 -07:00
Ben Straub
25e8b20169 Fix broken tests 2012-10-19 19:36:23 -07:00
Ben Straub
30a46ab1a9 Adjust for rebase 2012-10-19 19:36:22 -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