Ben Straub
24393ea6d3
Stop premature remote freeing when cloning
2012-12-13 09:14:56 -08:00
Ben Straub
44f36f6e3b
Convert clone to use dangling remotes
2012-12-12 19:48:44 -08:00
Ben Straub
df705148ec
API updates for remote.h
...
Includes typedef for git_direction, and renames for
GIT_DIR_[FETCH|PUSH] to GIT_DIRECTION_(\1).
2012-11-27 13:19:49 -08:00
Vicent Marti
cfbe4be3fb
More external API cleanup
...
Conflicts:
src/branch.c
tests-clar/refs/branches/create.c
2012-11-27 13:18:27 -08:00
Ben Straub
2508cc66eb
Rename ref and reflog apis for consistency
2012-11-27 13:17:45 -08:00
Vicent Martí
aa1c3b588e
Merge pull request #1016 from arrbee/fix-checkout-dir-removal
...
Update checkout with new strategies & behavior
2012-11-13 14:13:47 -08:00
Edward Thomson
b0f6e45d14
create FETCH_HEAD specially instead of as a ref file
2012-11-11 11:56:33 -06:00
Russell Belfer
331e7de900
Extensions to rmdir and mkdir utilities
...
* Rework GIT_DIRREMOVAL values to GIT_RMDIR flags, allowing
combinations of flags
* Add GIT_RMDIR_EMPTY_PARENTS flag to remove parent dirs that
are left empty after removal
* Add GIT_MKDIR_VERIFY_DIR to give an error if item is a file,
not a dir (previously an EEXISTS error was ignored, even for
files) and enable this flag for git_futils_mkpath2file call
* Improve accuracy of error messages from git_futils_mkdir
2012-11-09 13:52:06 -08:00
Philip Kelley
41fb1ca0ec
Reorganize transport architecture (squashed 3)
2012-11-01 09:02:33 -04: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
aa1e86741d
Clone: in-line callbacks for progress
...
Also implemented in the git2 example.
2012-10-19 19:36:22 -07:00
Ben Straub
9c3a98f1b0
Fix clone.c's indentation
2012-10-19 19:36:22 -07:00
Ben Straub
216863c48f
Fetch/indexer: progress callbacks
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
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
Russell Belfer
4c47a8bcfe
Merge pull request #968 from arrbee/diff-support-typechange
...
Support TYPECHANGE records in status and adjust checkout accordingly
2012-10-17 14:14:51 -07:00
nulltoken
c4f68b3202
clone: fix detection of remote HEAD
2012-10-15 20:40:37 +02:00
nulltoken
4d968f134b
clone: Explicit support of no-checkout option
2012-10-15 20:40:37 +02:00
Russell Belfer
0d64bef941
Add complex checkout test and then fix checkout
...
This started as a complex new test for checkout going through the
"typechanges" test repository, but that revealed numerous issues
with checkout, including:
* complete failure with submodules
* failure to create blobs with exec bits
* problems when replacing a tree with a blob because the tree
"example/" sorts after the blob "example" so the delete was
being processed after the single file blob was created
This fixes most of those problems and includes a number of other
minor changes that made it easier to do that, including improving
the TYPECHANGE support in diff/status, etc.
2012-10-09 11:59:34 -07:00
Michael Schubert
aa4437f637
Fix compiler warnings
...
* tests-clar/status: remove an unused variable
* clone: fix -Wmaybe-uninitialized warning
2012-10-09 17:51:11 +02:00
nulltoken
bf0e62a2b8
clone: fix cloning of empty repository
2012-10-08 00:44:21 +02:00
nulltoken
d280c71b8e
clone: leverage refspec transform
2012-10-08 00:44:16 +02:00
nulltoken
70edc1b0fc
clone: align type casing with convention
2012-10-08 00:44:11 +02:00
nulltoken
7eca3c561d
clone: deploy git_repository_set_head() usage
2012-10-07 21:03:49 +02:00
nulltoken
096d9e94aa
remote: use constants for well-known names
2012-10-07 21:03:37 +02:00
nulltoken
74a2400514
refs: use constants for well-known names
2012-10-07 12:04:19 +02:00
nulltoken
3aa443a951
checkout: introduce git_checkout_tree()
2012-09-17 10:48:26 +02:00
Russell Belfer
f4ea176fa8
Remove unnecessary include
...
I don't think clone.c needs in #include dirent.h and it is not
portable, so let's just get rid of it.
2012-09-14 10:31:40 -07:00
nulltoken
35d2e449bd
checkout: cleanup misplaced declaration
2012-09-06 18:40:07 +02:00
Ben Straub
aa549d323e
Clean up a TODO comment.
2012-08-01 15:09:05 -07:00
Ben Straub
b31667fb69
Checkout: add head- and ref-centric checkouts.
...
Renamed git_checkout_index to what it really was,
and removed duplicate code from clone.c. Added
git_checkout_ref, which updates HEAD and hands off
to git_checkout_head.
Added tests for the options the caller can pass to
git_checkout_*.
2012-07-27 20:31:05 -07:00
Ben Straub
4d83399d35
Adjust for msvc pedantry.
2012-07-27 11:55:58 -07:00
Ben Straub
8a155a044b
Fix mismatched git_branch_create args.
2012-07-27 11:49:34 -07:00
Ben Straub
7affe23db0
Use new git_remote_update_tips signature.
2012-07-27 11:23:44 -07:00
Ben Straub
b401bace1b
Restructure for better checkout options
...
* Removed the #define for defaults
* Promoted progress structure to top-level API call
argument
2012-07-26 13:12:21 -07:00
Ben Straub
ef9905c990
checkout: introduce git_checkout_opts
...
Refactor checkout into several more-sensible
entry points, which consolidates common options
into a single structure that may be passed around.
2012-07-26 12:58:44 -07:00
Ben Straub
d024419f16
Add git_path_is_empty_dir.
2012-07-11 10:40:53 -07:00
Ben Straub
c3b5099fe4
Add git_path_is_dot_or_dotdot.
...
Also, remove some duplication in the clone test
suite.
2012-07-11 10:10:31 -07:00
Ben Straub
1c7eb971ac
Reindent.
2012-07-10 12:04:23 -07:00
Ben Straub
ea8178638c
Tabify.
2012-07-09 20:32:42 -07:00
Ben Straub
2b63db4cbb
Clone: update index to HEAD.
...
git_clone now produces a repo that
`git status` reports as clean!
2012-06-25 16:04:59 -07:00
Ben Straub
830388a728
Clone: non-empty-dir test, now for Win32.
2012-06-21 20:07:32 -07:00
Ben Straub
acdd3d959b
Clone: allow empty dirs.
2012-06-21 19:51:56 -07:00
Ben Straub
cb2dc0b0f8
Clone: replace one hardcoded value with another.
2012-06-21 13:37:08 -07:00
Ben Straub
14741d62d9
Clone: new home for git_checkout_force.
2012-06-21 11:13:19 -07:00
Ben Straub
941611153a
Clone: minor cleanup and whitespace.
2012-06-21 10:34:11 -07:00
Ben Straub
af58ec9e8d
Clone: prefer "master" as default branch.
2012-06-21 09:53:45 -07:00
Ben Straub
4fbc899acf
Clone: local branch for remote HEAD.
...
Now creating a local branch that tracks to the
origin's HEAD branch, and setting HEAD to that.
2012-06-21 09:53:45 -07:00
Ben Straub
8340dd5d5f
Clone: remove fragile path-handling code.
...
Also standardized on 3-space indentation. Sorry
about that.
2012-06-21 09:53:45 -07:00
Ben Straub
f2a855d5fe
Clone: restructure.
2012-06-21 09:53:44 -07:00
Ben Straub
bb1f6087e4
Add progress reporting to clone.
2012-06-21 09:53:44 -07:00
Ben Straub
764df57e82
Add git_clone and git_clone_bare.
...
So far they only create a repo, setup the "origin"
remote, and fetch. The API probably needs work as
well; there's no way to get progress information
at this point.
Also uncovered a shortcoming; git_remote_download
doesn't fetch over local transport.
2012-06-21 09:53:44 -07:00