Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package system on libgit2 #11196

Merged
merged 90 commits into from
Sep 29, 2015
Merged
Changes from 1 commit
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
865c87c
changing `installed` based to support `libgit2`
wildart May 5, 2015
851c053
merged installed & dependents into `Read`, moved `libgit2` calls into…
wildart May 5, 2015
12a525c
removed `Git` module calls from `Read`
wildart May 5, 2015
b2be2d7
changed string type
wildart May 5, 2015
9c88dbc
renamed to 'libgit2'
wildart May 6, 2015
cdf28d4
fixed to AbstractString
wildart May 7, 2015
c57ec72
added libgit2 error handling
wildart May 8, 2015
7140141
write to repo configuration value with any accepted type
wildart May 8, 2015
f836a71
added `clone` & `fetch`, updated 'Dir' and `Cache`
wildart May 8, 2015
61ba8f0
switching to `Ref` type
wildart May 8, 2015
ba591fe
changed incorrect types & syntax
wildart May 8, 2015
efb5bba
working on `Generate`
wildart May 9, 2015
bb40811
fixed changed api
wildart May 9, 2015
4ca8175
construct type pragmatically
wildart May 9, 2015
25a7d0a
added `with_libgit2` helper function
wildart May 9, 2015
3516046
package generator works!!!
wildart May 10, 2015
3198519
added default value to GitConfig 'get' to prevent exceptions
wildart May 10, 2015
3305ed6
added anyobject type and `checkout` functions
wildart May 10, 2015
071a872
no more `git` in Write
wildart May 10, 2015
87e7fbf
fixed `revparse`, `isdirty` & errors in `Write`
wildart May 10, 2015
409bb27
improved git types description
wildart May 10, 2015
9802b85
transitioned Entry.add
wildart May 11, 2015
e2c1a38
transitioned Entry.clone
wildart May 11, 2015
ff9b5d6
GitError is Exception subclass
wildart May 11, 2015
f55de93
fixed `need_update`, `head_oid`, `revparse`, `CHECKOUT_NONE`, `Checko…
wildart May 11, 2015
6dedbb2
transitioned Entry: `free` & `pin`
wildart May 11, 2015
8fbf905
refactored error handling
wildart May 13, 2015
e4ac8bd
error fix: nonexistent directory case, cannot create empty wrapper
wildart May 13, 2015
8ff8a25
made options structures immutable with convinient constructors
wildart May 13, 2015
273ecfa
rewrote Write module: changed resource management and commit checkout.
wildart May 13, 2015
c1179e7
added proper `checkout` & `branch` functions
wildart May 13, 2015
67435f6
added tests for `libgit2`
wildart May 16, 2015
740194a
removed unnecessary `rethrow` calls
wildart May 16, 2015
30688dc
transitioned `checkout`, `free`, `update`, `register`
wildart May 17, 2015
331f8c2
switched to https
wildart May 17, 2015
dcac546
added `gitdir` (location of repo '.git') and `path` (repo location)
wildart May 17, 2015
52d72cb
import Base for `finalize`s
wildart May 17, 2015
3e957e8
transitioned `tag` & `register`
wildart May 17, 2015
3ff4628
fixed `get` with default for GitConfig
wildart May 18, 2015
c9d04e2
fixed errors, set to run only pkg & libgit2 tests
wildart May 18, 2015
d409e13
added PkgError exception
wildart May 19, 2015
3335bf7
added licence line
wildart May 19, 2015
b5efeef
fixed GitHub saved token retrieval & PkgError visibility
wildart May 19, 2015
efde7ed
added `push`, transitioned `pull_request`
wildart May 19, 2015
f1b5694
fixed import error
wildart May 20, 2015
c1298e8
added `revcount` for counting differences
wildart May 20, 2015
6943209
fixed exceptions in tests
wildart May 20, 2015
8612798
speedup `prefetch` call
wildart May 21, 2015
9016b11
refactored GitConfig methods
wildart May 21, 2015
21fcc2c
removed prefix from `finalize` calls
wildart May 21, 2015
2d456ab
newline at end of file
wildart May 21, 2015
327e989
No more `Git`!
wildart May 23, 2015
307aa8b
partial fix for #11580
wildart Jun 6, 2015
70963a9
adopting CString & refactoring
wildart Jun 27, 2015
f8b0dec
added prototype of git repl
wildart Jun 28, 2015
c0d59a0
added `clone` & `init` command
wildart Jul 2, 2015
09406ad
refactoring commit message call
wildart Jul 8, 2015
50b81f6
rebased, moved `libgit2` to `base`, updated to 0.23 & tests
testurser Jul 9, 2015
c9fcd0b
fixed repl tests
wildart Jul 9, 2015
39aa02b
tuple-based Oid
testurser Jul 9, 2015
8b5dd78
added `Oid` tests, modified `free` with tuple parameters,
testurser Jul 10, 2015
5a4aad0
fixed: string value retrieval from config, resource management in tests
wildart Jul 10, 2015
c254abb
fixed 0.23 compatibility errors, added more commands to git-repl
wildart Jul 13, 2015
f58f762
used new enums, changed location of GITHUB_REGEX, exported PkgError
wildart Jul 13, 2015
fad9263
switch to release build for windows
wildart Jul 14, 2015
93af677
diff & rebase update to v0.23, error fixes
wildart Jul 27, 2015
1347d68
added callbacks, updated push & publish
wildart Jul 28, 2015
25778f7
merge overhaul, added credential & fetchhead callbacks, small fixes &…
wildart Aug 2, 2015
9f3bad9
added extended repo open, ported Base.url
wildart Aug 2, 2015
5fa68d5
fixed Pkg.pull_request, suppress backtrace PkgError & code cleanup
wildart Aug 2, 2015
f3301fb
switch GitRepo to GitRevWalker
wildart Aug 2, 2015
9690fa6
added to GitREPL: branch & tag
wildart Aug 2, 2015
c5350e5
added `commit` to Git REPL & fixed commands help info
wildart Aug 2, 2015
243e1a8
fix Git REPL `commit` output
wildart Aug 2, 2015
7aa333b
added `checkout` to Git REPL
wildart Aug 2, 2015
2f8c7b7
fixed remote branch name
wildart Aug 2, 2015
2853db0
reomoved Git module and its tests
wildart Aug 2, 2015
0ccfdfe
fix error message & add all tests
wildart Aug 3, 2015
4beb9af
fixed cache update, remove redundant `chomp` call from Git REPL `comm…
wildart Aug 3, 2015
7e9caae
fixed: `tag` requirements creation, empty callbacks
wildart Aug 8, 2015
78929ad
fixed tests
wildart Sep 14, 2015
29004a4
removed Git REPL
wildart Sep 14, 2015
116bb4c
fixed bad rebase commit of `inbase`
wildart Sep 14, 2015
b0f07a8
added: tree entry type, tree walker, blob lookup, some refinements
wildart Sep 23, 2015
80f0db7
Union() => Union{}
wildart Sep 23, 2015
0663672
fixed comparisons to `nothing`
wildart Sep 25, 2015
509e4b2
renamed module `GitConst` to `Consts`, added support of ssh-agent
wildart Sep 29, 2015
11f08b5
returned `Pkg.Git` module
wildart Sep 29, 2015
d18efae
fix deprecation warning
jakebolewski Sep 29, 2015
35cd85f
add error branch test for package availablity
jakebolewski Sep 29, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added commit to Git REPL & fixed commands help info
  • Loading branch information
wildart authored and jakebolewski committed Sep 29, 2015
commit c5350e5db68110a66f6fb2a60cdf576e3354ff72
24 changes: 18 additions & 6 deletions base/libgit2/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ function repl_cmd(ex)

if cmd[1] == "init"
if has_params && cmd[2] == "help"
println("usage: init [--bare]")
println("usage: init [bare]")
return
end
try
repo = init(repopath, has_params ? Cuint(cmd[2] == "--bare") : Cuint(0))
repo = init(repopath, has_params ? Cuint(cmd[2] == "bare") : Cuint(0))
finalize(repo)
println("Initialized empty Git repository in $repopath")
catch ex
Expand All @@ -41,11 +41,11 @@ function repl_cmd(ex)
end
try
repourl = cmd[2]
repo = clone(repourl, repopath, isbare=("--bare" in cmd), )
repo = clone(repourl, repopath, isbare=("bare" in cmd), )
finalize(repo)
println("Cloned $repourl into $repopath")
catch ex
println("usage: clone [--bare] <url>")
println("usage: clone [bare] <url>")
warn(ex)
end
else
Expand All @@ -65,7 +65,7 @@ function repl_cmd(ex)
repl_log(repo, msg_count)
elseif cmd[1] == "status"
if has_params && cmd[2] == "help"
println("usage: status [-long]")
println("usage: status [long]")
return
end
repl_status(repo, "long" in cmd)
Expand Down Expand Up @@ -136,6 +136,12 @@ function repl_cmd(ex)
return
end
repl_tag(repo, runcmd, cmd[end])
elseif cmd[1] == "commit"
if !has_params || cmd[2] == "help"
println("usage: commit <message>")
return
end
repl_commit(repo, cmd[2:end])
else
warn("unknown command: $ex. Use \'help\' command.")
end
Expand All @@ -150,6 +156,7 @@ function repl_help()
add\t Add file contents to the index
branch\t List, create, or delete branches
clone\t Clone a repository into a current directory
commit\t Commit record changes to the repository
init\t Create an empty Git repository or reinitialize an existing one in current directory
log\t Show commit logs
reset\t\ Reset current HEAD to the specified state
Expand All @@ -160,7 +167,7 @@ function repl_help()
For particular command parameters use: <command> help
""")
# checkout\t Checkout a branch or paths to the working tree
# commit\t Record changes to the repository

end

function repl_add{T<:AbstractString}(repo::GitRepo, force_add::Bool, files::Vector{T})
Expand Down Expand Up @@ -258,6 +265,11 @@ function repl_tag{T<:AbstractString}(repo::GitRepo, cmd::Symbol, tag::T)
return
end

function repl_commit{T<:AbstractString}(repo::GitRepo, msg::Vector{T})
m = chomp(join(msg, " "))
commit(repo, m)
end

function repl_log(repo::GitRepo, msg_count::Int)
msgs = with(GitRevWalker(repo)) do walker
map((oid,r)->with(get(GitCommit, r, oid)) do cmt
Expand Down