rugged 0.25.0b10 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/rugged/extconf.rb +5 -0
- data/ext/rugged/rugged.c +3 -20
- data/ext/rugged/rugged.h +3 -20
- data/ext/rugged/rugged_backend.c +3 -20
- data/ext/rugged/rugged_blame.c +7 -24
- data/ext/rugged/rugged_blob.c +5 -22
- data/ext/rugged/rugged_branch.c +3 -20
- data/ext/rugged/rugged_branch_collection.c +3 -20
- data/ext/rugged/rugged_commit.c +37 -24
- data/ext/rugged/rugged_config.c +3 -20
- data/ext/rugged/rugged_cred.c +3 -20
- data/ext/rugged/rugged_diff.c +3 -20
- data/ext/rugged/rugged_diff_delta.c +3 -20
- data/ext/rugged/rugged_diff_hunk.c +3 -20
- data/ext/rugged/rugged_diff_line.c +3 -20
- data/ext/rugged/rugged_index.c +38 -149
- data/ext/rugged/rugged_note.c +3 -20
- data/ext/rugged/rugged_object.c +3 -20
- data/ext/rugged/rugged_patch.c +4 -22
- data/ext/rugged/rugged_rebase.c +3 -20
- data/ext/rugged/rugged_reference.c +4 -21
- data/ext/rugged/rugged_reference_collection.c +3 -20
- data/ext/rugged/rugged_remote.c +4 -21
- data/ext/rugged/rugged_remote_collection.c +3 -20
- data/ext/rugged/rugged_repo.c +5 -22
- data/ext/rugged/rugged_revwalk.c +4 -21
- data/ext/rugged/rugged_settings.c +3 -20
- data/ext/rugged/rugged_signature.c +3 -20
- data/ext/rugged/rugged_submodule.c +4 -21
- data/ext/rugged/rugged_submodule_collection.c +3 -20
- data/ext/rugged/rugged_tag.c +3 -20
- data/ext/rugged/rugged_tag_collection.c +3 -20
- data/ext/rugged/rugged_tree.c +56 -183
- data/lib/rugged.rb +5 -0
- data/lib/rugged/attributes.rb +5 -0
- data/lib/rugged/blob.rb +5 -0
- data/lib/rugged/branch.rb +6 -1
- data/lib/rugged/commit.rb +5 -0
- data/lib/rugged/console.rb +5 -0
- data/lib/rugged/credentials.rb +5 -0
- data/lib/rugged/diff.rb +5 -0
- data/lib/rugged/diff/delta.rb +5 -0
- data/lib/rugged/diff/hunk.rb +5 -0
- data/lib/rugged/diff/line.rb +5 -0
- data/lib/rugged/index.rb +120 -0
- data/lib/rugged/object.rb +5 -0
- data/lib/rugged/patch.rb +5 -0
- data/lib/rugged/reference.rb +5 -0
- data/lib/rugged/remote.rb +5 -0
- data/lib/rugged/repository.rb +6 -1
- data/lib/rugged/submodule_collection.rb +5 -0
- data/lib/rugged/tag.rb +5 -0
- data/lib/rugged/tree.rb +156 -1
- data/lib/rugged/version.rb +6 -1
- data/lib/rugged/walker.rb +5 -0
- data/vendor/libgit2/include/git2/common.h +20 -1
- data/vendor/libgit2/include/git2/describe.h +5 -2
- data/vendor/libgit2/include/git2/patch.h +1 -1
- data/vendor/libgit2/include/git2/proxy.h +1 -1
- data/vendor/libgit2/include/git2/remote.h +4 -4
- data/vendor/libgit2/include/git2/transaction.h +9 -0
- data/vendor/libgit2/include/git2/version.h +3 -3
- data/vendor/libgit2/src/apply.c +1 -1
- data/vendor/libgit2/src/branch.c +5 -4
- data/vendor/libgit2/src/checkout.c +2 -2
- data/vendor/libgit2/src/commit.c +4 -3
- data/vendor/libgit2/src/common.h +2 -1
- data/vendor/libgit2/src/curl_stream.c +19 -2
- data/vendor/libgit2/src/diff_stats.c +18 -10
- data/vendor/libgit2/src/fetchhead.c +8 -8
- data/vendor/libgit2/src/fileops.c +9 -1
- data/vendor/libgit2/src/fileops.h +2 -2
- data/vendor/libgit2/src/global.c +19 -4
- data/vendor/libgit2/src/global.h +6 -0
- data/vendor/libgit2/src/graph.c +1 -1
- data/vendor/libgit2/src/index.c +1 -1
- data/vendor/libgit2/src/iterator.c +1 -1
- data/vendor/libgit2/src/merge.c +1 -1
- data/vendor/libgit2/src/odb.c +1 -1
- data/vendor/libgit2/src/odb_mempack.c +1 -1
- data/vendor/libgit2/src/openssl_stream.c +45 -26
- data/vendor/libgit2/src/openssl_stream.h +106 -0
- data/vendor/libgit2/src/pack.c +12 -7
- data/vendor/libgit2/src/patch_generate.c +1 -1
- data/vendor/libgit2/src/patch_parse.c +28 -26
- data/vendor/libgit2/src/path.c +5 -2
- data/vendor/libgit2/src/pqueue.c +3 -2
- data/vendor/libgit2/src/rebase.c +1 -1
- data/vendor/libgit2/src/refdb.c +4 -2
- data/vendor/libgit2/src/refdb_fs.c +82 -54
- data/vendor/libgit2/src/repository.c +9 -6
- data/vendor/libgit2/src/revwalk.c +1 -1
- data/vendor/libgit2/src/settings.c +2 -0
- data/vendor/libgit2/src/signature.c +1 -1
- data/vendor/libgit2/src/sortedcache.c +14 -5
- data/vendor/libgit2/src/sysdir.c +1 -1
- data/vendor/libgit2/src/transports/http.c +1 -1
- data/vendor/libgit2/src/transports/smart_protocol.c +11 -7
- data/vendor/libgit2/src/tree.c +13 -5
- data/vendor/libgit2/src/unix/pthread.h +2 -0
- data/vendor/libgit2/src/win32/thread.c +18 -0
- data/vendor/libgit2/src/win32/thread.h +2 -0
- data/vendor/libgit2/src/win32/w32_util.h +1 -1
- data/vendor/libgit2/src/zstream.c +1 -1
- metadata +76 -76
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e7c6702ff8d1ff0c9c82ed452dc97b5f070f0bfa
|
|
4
|
+
data.tar.gz: a8e2f585ba932121e5e26ea29bfe7fe0b60a8d9a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8f5079be650d4c3af4f7cf786e531a114f272bf777bc7f3c71dec98955bbcadb85676d4b96384eef2ded67666f80dc0957f628e5565f4657ca5d288ba0d5c8dd
|
|
7
|
+
data.tar.gz: b88543357bc283cd08a8214e56e4bd6f3172293e46e2ddcab93aca4bf2197e7187c08e0ed6a3e7924b82504605622563f6de3c2a71a6ee7d7ff832a5f7f9165c
|
data/ext/rugged/extconf.rb
CHANGED
data/ext/rugged/rugged.c
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
2
|
+
* Copyright (C) the Rugged contributors. All rights reserved.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
* THE SOFTWARE.
|
|
4
|
+
* This file is part of Rugged, distributed under the MIT license.
|
|
5
|
+
* For full terms see the included LICENSE file.
|
|
23
6
|
*/
|
|
24
7
|
|
|
25
8
|
#include "rugged.h"
|
data/ext/rugged/rugged.h
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
2
|
+
* Copyright (C) the Rugged contributors. All rights reserved.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
* THE SOFTWARE.
|
|
4
|
+
* This file is part of Rugged, distributed under the MIT license.
|
|
5
|
+
* For full terms see the included LICENSE file.
|
|
23
6
|
*/
|
|
24
7
|
|
|
25
8
|
#ifndef __H_RUGGED_BINDINGS__
|
data/ext/rugged/rugged_backend.c
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
2
|
+
* Copyright (C) the Rugged contributors. All rights reserved.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
* THE SOFTWARE.
|
|
4
|
+
* This file is part of Rugged, distributed under the MIT license.
|
|
5
|
+
* For full terms see the included LICENSE file.
|
|
23
6
|
*/
|
|
24
7
|
|
|
25
8
|
#include "rugged.h"
|
data/ext/rugged/rugged_blame.c
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
2
|
+
* Copyright (C) the Rugged contributors. All rights reserved.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
* THE SOFTWARE.
|
|
4
|
+
* This file is part of Rugged, distributed under the MIT license.
|
|
5
|
+
* For full terms see the included LICENSE file.
|
|
23
6
|
*/
|
|
24
7
|
|
|
25
8
|
#include "rugged.h"
|
|
@@ -125,19 +108,19 @@ static void rugged_parse_blame_options(git_blame_options *opts, git_repository *
|
|
|
125
108
|
* The last line in the file to blame. Defaults to the last line in
|
|
126
109
|
* the file.
|
|
127
110
|
*
|
|
128
|
-
* :track_copies_same_file
|
|
111
|
+
* :track_copies_same_file ::
|
|
129
112
|
* If this value is +true+, lines that have moved within a file will be
|
|
130
113
|
* tracked (like `git blame -M`).
|
|
131
114
|
*
|
|
132
|
-
* :track_copies_same_commit_moves
|
|
115
|
+
* :track_copies_same_commit_moves ::
|
|
133
116
|
* If this value is +true+, lines that have moved across files in the same
|
|
134
117
|
* commit will be tracked (like `git blame -C`).
|
|
135
118
|
*
|
|
136
|
-
* :track_copies_same_commit_copies
|
|
119
|
+
* :track_copies_same_commit_copies ::
|
|
137
120
|
* If this value is +true+, lines that have been copied from another file
|
|
138
121
|
* that exists in the same commit will be tracked (like `git blame -CC`).
|
|
139
122
|
*
|
|
140
|
-
* :track_copies_any_commit_copies
|
|
123
|
+
* :track_copies_any_commit_copies ::
|
|
141
124
|
* If this value is +true+, lines that have been copied from another file
|
|
142
125
|
* that exists in *any* commit will be tracked (like `git blame -CCC`).
|
|
143
126
|
*
|
data/ext/rugged/rugged_blob.c
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
* THE SOFTWARE.
|
|
2
|
+
* Copyright (C) the Rugged contributors. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of Rugged, distributed under the MIT license.
|
|
5
|
+
* For full terms see the included LICENSE file.
|
|
23
6
|
*/
|
|
24
7
|
|
|
25
8
|
#include "rugged.h"
|
|
@@ -607,7 +590,7 @@ static int rugged_load_merge_file_input(git_blob **out, git_repository *repo, ru
|
|
|
607
590
|
|
|
608
591
|
static VALUE rb_git_blob_merge_files(int argc, VALUE *argv, VALUE klass)
|
|
609
592
|
{
|
|
610
|
-
VALUE rb_repo, rb_ancestor, rb_ours, rb_theirs, rb_options, rb_result;
|
|
593
|
+
VALUE rb_repo, rb_ancestor, rb_ours, rb_theirs, rb_options, rb_result = Qnil;
|
|
611
594
|
|
|
612
595
|
git_repository *repo = NULL;
|
|
613
596
|
rugged_merge_file_input ancestor = RUGGED_MERGE_FILE_INPUT_INIT,
|
data/ext/rugged/rugged_branch.c
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
2
|
+
* Copyright (C) the Rugged contributors. All rights reserved.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
* THE SOFTWARE.
|
|
4
|
+
* This file is part of Rugged, distributed under the MIT license.
|
|
5
|
+
* For full terms see the included LICENSE file.
|
|
23
6
|
*/
|
|
24
7
|
|
|
25
8
|
#include "rugged.h"
|
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
2
|
+
* Copyright (C) the Rugged contributors. All rights reserved.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
* THE SOFTWARE.
|
|
4
|
+
* This file is part of Rugged, distributed under the MIT license.
|
|
5
|
+
* For full terms see the included LICENSE file.
|
|
23
6
|
*/
|
|
24
7
|
|
|
25
8
|
#include "rugged.h"
|
data/ext/rugged/rugged_commit.c
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
* THE SOFTWARE.
|
|
2
|
+
* Copyright (C) the Rugged contributors. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of Rugged, distributed under the MIT license.
|
|
5
|
+
* For full terms see the included LICENSE file.
|
|
23
6
|
*/
|
|
24
7
|
|
|
25
8
|
#include "rugged.h"
|
|
@@ -36,7 +19,7 @@ VALUE rb_cRuggedCommit;
|
|
|
36
19
|
* commit.message -> msg
|
|
37
20
|
*
|
|
38
21
|
* Return the message of this commit. This includes the full body of the
|
|
39
|
-
* message, with the short description, detailed
|
|
22
|
+
* message, with the short description, detailed description, and any
|
|
40
23
|
* optional footers or signatures after it.
|
|
41
24
|
*
|
|
42
25
|
* In Ruby 1.9+, the returned string will be encoded with the encoding
|
|
@@ -61,6 +44,35 @@ static VALUE rb_git_commit_message_GET(VALUE self)
|
|
|
61
44
|
return rb_enc_str_new(message, strlen(message), encoding);
|
|
62
45
|
}
|
|
63
46
|
|
|
47
|
+
/*
|
|
48
|
+
* call-seq:
|
|
49
|
+
* commit.summary -> summary
|
|
50
|
+
*
|
|
51
|
+
* Return the short summary message of this commit.
|
|
52
|
+
*
|
|
53
|
+
* In Ruby 1.9+, the returned string will be encoded with the encoding
|
|
54
|
+
* specified in the +Encoding+ header of the commit, if available.
|
|
55
|
+
*
|
|
56
|
+
* commit.message #=> "add a lot of RDoc docs\n\nthis includes docs for commit and blob"
|
|
57
|
+
* commit.summary #=> "add a lot of RDoc docs"
|
|
58
|
+
*/
|
|
59
|
+
static VALUE rb_git_commit_summary_GET(VALUE self)
|
|
60
|
+
{
|
|
61
|
+
git_commit *commit;
|
|
62
|
+
rb_encoding *encoding = rb_utf8_encoding();
|
|
63
|
+
const char *encoding_name;
|
|
64
|
+
const char *summary;
|
|
65
|
+
|
|
66
|
+
Data_Get_Struct(self, git_commit, commit);
|
|
67
|
+
|
|
68
|
+
summary = git_commit_summary(commit);
|
|
69
|
+
encoding_name = git_commit_message_encoding(commit);
|
|
70
|
+
if (encoding_name != NULL)
|
|
71
|
+
encoding = rb_enc_find(encoding_name);
|
|
72
|
+
|
|
73
|
+
return rb_enc_str_new(summary, strlen(summary), encoding);
|
|
74
|
+
}
|
|
75
|
+
|
|
64
76
|
/*
|
|
65
77
|
* call-seq:
|
|
66
78
|
* commit.committer -> signature
|
|
@@ -645,7 +657,7 @@ static VALUE rb_git_commit_header(VALUE self)
|
|
|
645
657
|
|
|
646
658
|
/*
|
|
647
659
|
* call-seq:
|
|
648
|
-
*
|
|
660
|
+
* Commit.extract_signature(repo, commit, field_name) -> [str, str]
|
|
649
661
|
*
|
|
650
662
|
* Returns +commit+'s signature in 'field' and the signed data
|
|
651
663
|
*
|
|
@@ -761,7 +773,7 @@ cleanup:
|
|
|
761
773
|
|
|
762
774
|
/*
|
|
763
775
|
* call-seq:
|
|
764
|
-
*
|
|
776
|
+
* Commit.create_with_signature(repo, content, signature, field_name = "gpgsig") -> oid
|
|
765
777
|
*
|
|
766
778
|
* Create a commit from the +content+ string and the +signature+,
|
|
767
779
|
* adding this data to the +field_name+ header field in the resulting
|
|
@@ -807,6 +819,7 @@ void Init_rugged_commit(void)
|
|
|
807
819
|
rb_define_singleton_method(rb_cRuggedCommit, "extract_signature", rb_git_commit_extract_signature, -1);
|
|
808
820
|
|
|
809
821
|
rb_define_method(rb_cRuggedCommit, "message", rb_git_commit_message_GET, 0);
|
|
822
|
+
rb_define_method(rb_cRuggedCommit, "summary", rb_git_commit_summary_GET, 0);
|
|
810
823
|
rb_define_method(rb_cRuggedCommit, "epoch_time", rb_git_commit_epoch_time_GET, 0);
|
|
811
824
|
rb_define_method(rb_cRuggedCommit, "committer", rb_git_commit_committer_GET, 0);
|
|
812
825
|
rb_define_method(rb_cRuggedCommit, "author", rb_git_commit_author_GET, 0);
|
data/ext/rugged/rugged_config.c
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
2
|
+
* Copyright (C) the Rugged contributors. All rights reserved.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
* THE SOFTWARE.
|
|
4
|
+
* This file is part of Rugged, distributed under the MIT license.
|
|
5
|
+
* For full terms see the included LICENSE file.
|
|
23
6
|
*/
|
|
24
7
|
|
|
25
8
|
#include "rugged.h"
|
data/ext/rugged/rugged_cred.c
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
2
|
+
* Copyright (C) the Rugged contributors. All rights reserved.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
* THE SOFTWARE.
|
|
4
|
+
* This file is part of Rugged, distributed under the MIT license.
|
|
5
|
+
* For full terms see the included LICENSE file.
|
|
23
6
|
*/
|
|
24
7
|
|
|
25
8
|
#include "rugged.h"
|
data/ext/rugged/rugged_diff.c
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
2
|
+
* Copyright (C) the Rugged contributors. All rights reserved.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
* THE SOFTWARE.
|
|
4
|
+
* This file is part of Rugged, distributed under the MIT license.
|
|
5
|
+
* For full terms see the included LICENSE file.
|
|
23
6
|
*/
|
|
24
7
|
|
|
25
8
|
#include "rugged.h"
|