summaryrefslogtreecommitdiffstats
path: root/EXAMPLES
diff options
context:
space:
mode:
authorscott Chacon <schacon@agadorsparticus.(none)>2007-11-10 12:43:33 -0800
committerscott Chacon <schacon@agadorsparticus.(none)>2007-11-10 12:43:33 -0800
commitfde3263abc5c7866aa7dce7aef28eacaa33d7664 (patch)
treec9911ac92e9770c7bfea3e79269f8e7dcf7f6982 /EXAMPLES
parent9d59d2965184964ab6662282ef5f9ceac2c58552 (diff)
downloadthird_party-ruby-git-fde3263abc5c7866aa7dce7aef28eacaa33d7664.tar.gz
third_party-ruby-git-fde3263abc5c7866aa7dce7aef28eacaa33d7664.tar.xz
third_party-ruby-git-fde3263abc5c7866aa7dce7aef28eacaa33d7664.zip
few hours work - diff is done
Diffstat (limited to 'EXAMPLES')
-rw-r--r--EXAMPLES44
1 files changed, 29 insertions, 15 deletions
diff --git a/EXAMPLES b/EXAMPLES
index bea9be7..6dbfa6c 100644
--- a/EXAMPLES
+++ b/EXAMPLES
@@ -38,43 +38,57 @@ g.grep('hello') # implies HEAD
g.blob('v2.5:Makefile').grep('hello')
g.tag('v2.5').grep('hello', 'docs/')
+g.diff(commit1, commit2).size
+g.diff(commit1, commit2).stats
+g.tree('v2.5').diff('v2.6').insertions
+g.diff('gitsearch1', 'v2.5').path('lib/')
+g.diff('gitsearch1', @git.tree('v2.5'))
+g.diff('gitsearch1', 'v2.5').path('docs/').patch
+g.tree('v2.5').diff('v2.6').patch
+
+g.tree('v2.5').diff('v2.6').each do |file_diff|
+ puts file_diff.path
+ puts file_diff.patch
+ puts file_diff.blob(:src).contents
+end
+
+g.config('user.name') # returns 'Scott Chacon'
+g.config # returns whole config hash
***** IMPLEMENTED *****
-g.diff
-g.diff.shortstat
-g.diff.summary
-g.diff(commit1, commit2)
-g.diff("commit1..commit2")
+g.ls_files
+g.ls_files(:stage => true)
+
+g.tag # returns array of Git::Tag objects
+
-g.diff_tree(Git::Tree, Git::Tree)
-g.status
-g.ls_files
-g.ls_files(:stage => true)
-g.tag # returns array of Git::Tag objects
# needs write permission
-g = Git.clone(URI, 'name', working_dir = GIT_DIR, {options})
- (username, password, ssl_key, git_dir, index_file)
g = Git.init
Git.init('project')
Git.init('/home/schacon/proj',
{ :git_dir => '/opt/git/proj.git',
:index_file => '/tmp/index'} )
+
+
+***** IMPLEMENTED *****
+
+g = Git.clone(URI, :name => 'name', :path => '/tmp/checkout'
+ (username, password, ssl_key, git_dir, index_file)
+
g.config('user.name', 'Scott Chacon')
-g.config('user.email', 'email@email.com')
-g.config('user.name') # returns 'Scott Chacon'
-g.config # returns whole config hash
+g.config('user.email', 'email@email.com')
g.add('.')
g.add([file1, file2])