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
67dad09bdb
Remove inline hint
2012-10-25 09:59:49 -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
fb39b3a54c
refspec: introduce git_refspec__serialize()
2012-10-25 17:42:34 +02:00
nulltoken
4fe5520a10
remote: remove some code duplication
2012-10-25 17:42:33 +02:00
nulltoken
e497b16c57
remote: prevent from saving a nameless remote
2012-10-25 17:42:33 +02:00
Vicent Martí
1eb8cd7f87
Merge pull request #990 from ben/clone-callbacks
...
Progress callbacks
2012-10-25 08:16:13 -07: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
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
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
Ben Straub
216863c48f
Fetch/indexer: progress callbacks
2012-10-19 19:36:22 -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
Carlos Martín Nieto
f0d2ddbbf8
remote: support fetch cancelation
...
Introduce git_remote_stop() which sets a variable that is checked by
the fetch process in a few key places. If this is variable is set, the
fetch is aborted.
2012-10-18 04:31:03 +02:00
Carlos Martín Nieto
acd1700630
remote: only keep a weak pointer in update_tips
...
The reference is only needed inside the function. We mistakenly
increased the reference counter causing the ODB not to get freed and
leaking descriptors.
2012-10-07 11:19:19 +02:00
Carlos Martín Nieto
c648d4a8aa
remote: don't auto-follow tags on an unamed remote
...
An unnamed remote is used for commands like
git fetch git://host/repo
where no tags should be downloaded. Make this the default.
2012-10-02 13:09:18 +02:00
Carlos Martín Nieto
218c88a968
remote: set/unset the autotag setting on save
...
Make the configuration option match the configured behavior when
saving a remote.
2012-10-02 13:09:18 +02:00
Vicent Marti
9063be1f45
remote: Fix mid-block declaration
2012-10-01 17:33:05 +02:00
Carlos Martín Nieto
3230a44f4c
remote: support downloading all tags
...
Also honor remote.$name.tagopt = --tags.
2012-09-30 12:05:28 +02:00
Carlos Martín Nieto
eb0bd77a88
remote: use the refspec functions to parse, instead of rolling our own
...
The local function works for simple cases, but we shouldn't reinvent
the wheel just for us.
2012-09-30 12:04:49 +02:00
Carlos Martín Nieto
f70e466f68
remote: add accessors for the autotag setting
2012-09-30 12:04:49 +02:00
Carlos Martín Nieto
a37ddf7ef8
remote: create tags if we have them
...
Together with include-tag, this make us behave more like git. After a
fetch, try to create any tags the remote told us about for which we
have objects locally.
2012-09-30 12:04:39 +02:00
Carlos Martín Nieto
24f2f94e7d
fetch: use the include-tag capability
...
This tells the remote to send us any tags that point to objects that
we are downloading.
2012-09-30 11:56:38 +02:00
Carlos Martín Nieto
3665ba8eeb
refspec: add git_refspec__free, remove git_refspec_parse
...
The latter shouldn't be exposed and isn't used, git_refspec__parse
supersedes it.
Fix a leak in the refspec tests while we're at it.
2012-09-30 11:56:37 +02:00
Carlos Martín Nieto
e03e71da56
network: add sideband support
...
This lets us notify the user of what the remote end is doing while we
wait for it to start sending us the packfile.
2012-08-24 20:29:39 +02:00
Vicent Marti
c07d9c95f2
oid: Explicitly include oid.h
for the inlined CMP
2012-08-09 15:33:04 -07:00
Russell Belfer
e4607392b5
Fix iterator check and return value
...
There is a little cleanup necessary from PR #843 . Since the
new callbacks return `GIT_EUSER` we have to be a little careful
about return values when they are used internally to the library.
Also, callbacks should be checked for non-zero return values,
not just less than zero.
2012-08-06 11:06:05 -07:00
Vicent Marti
d8d28e2ef6
remotes: Proper return for git_remote_ls
2012-08-06 12:44:23 +02:00
Michael Schubert
7e9f78b5fe
remote: add missing include git2/remote.h
...
Otherwise we get an incomplete type error, since git_remote_callbacks
isn't declared yet.
2012-08-04 15:30:28 +02:00
Carlos Martín Nieto
ad4b5beb50
transport: store the refs in a common area
...
Instad of each transport having its own function and logic to get to
its refs, store them directly in transport.
Leverage the new gitno_buffer to make the parsing and storing of the
refs use common code and get rid of the git_protocol struct.
2012-07-30 20:28:16 +02:00
Vicent Martí
60d5cc5747
Merge pull request #834 from carlosmn/network-callbacks
...
Add a struct for network callbacks
2012-07-27 09:52:44 -07:00
Carlos Martín Nieto
c0c390255a
remote: fix C99-ism
2012-07-27 02:37:15 +02:00
Sascha Cunz
eff5b49927
Remotes: Use correct url in git_remote_connect
2012-07-27 00:08:56 +02:00
Sascha Cunz
413d556384
Remotes: Save a cleaned pushurl (by deleting it from the config)
2012-07-27 00:08:54 +02:00
Sascha Cunz
765015902a
Remotes: Setter for url+pushurl; Getter for pushurl
2012-07-26 23:08:22 +02:00
Sascha Cunz
3ed4b5012b
Remotes: Load/Save for fetch.foo.pushurl
2012-07-26 22:36:43 +02:00
Sascha Cunz
cb020f0d99
Remove unneccessary string transformation
2012-07-26 22:36:43 +02:00
Carlos Martín Nieto
944d250f96
update_tips: report error if it fails to create a ref
2012-07-24 10:34:28 +02:00
Carlos Martín Nieto
b3aaa7a7c8
Add a struct for network callbacks
...
Currently only update_tips is used, but it prepares the way for
progress output during download.
2012-07-21 18:44:01 +02:00
Vicent Martí
3f0358604e
misc: Fix warnings from PVS Studio trial
2012-06-07 22:43:48 +02:00
Vicent Martí
966fbdcb8e
Merge pull request #697 from carlosmn/ssl
...
Add HTTPS support
2012-06-05 13:53:33 -07:00
nulltoken
d27bf66561
remote: Make git_remote_add() generate a default refspec with a force update specifier
2012-06-04 23:47:09 +02:00
nulltoken
d05e2c64dd
refspec: expose the force update specifier through git_refspec_force() accessor
2012-05-30 01:05:17 +02:00
Carlos Martín Nieto
250b95b24b
ssl: allow skipping the server certificate check
...
Sometimes it's useful not to perform the check. Allow it to be
configurable.
2012-05-26 21:17:08 +02:00
Vicent Martí
904b67e69f
errors: Rename error codes
2012-05-18 01:48:50 +02:00
Vicent Martí
e172cf082e
errors: Rename the generic return codes
2012-05-18 01:26:26 +02:00
Vicent Martí
29e948debe
global: Change parameter ordering in API
...
Consistency is good.
2012-05-18 01:25:57 +02:00
Carlos Martín Nieto
11678b3718
fetch: filter tag annotation pseudo-refs while generating wants
...
These objects aren't considered as being advertised, so asking for
them will cause the remote end to close the connection. This makes the
checking in update_tips() unnecessary, because they don't get inserted
in the list.
2012-05-09 16:18:13 +02:00