braid 1.0.14 → 1.0.15
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/.travis.yml +0 -1
- data/lib/braid/commands/update.rb +2 -1
- data/lib/braid/operations.rb +12 -0
- data/lib/braid/version.rb +1 -1
- data/spec/integration_helper.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afbdb15969e052393b88693a8b6079066d180052
|
4
|
+
data.tar.gz: a5198d79c0cff3d4ba868d3e644d4233d2838e99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75ffd2beb47c5cb36320e1a326ffb48d6bc6d2e8aaaf83e809b5e22cbbf763cbe63e31261f577fff8d6cad4102247fb98315362d095dbcc3e5da2471e09910a0
|
7
|
+
data.tar.gz: 0c53d7fda15233809526ef8b45318ce9175a8d2ea4030d786e46a9601fc397a822674842a9a9975e67a22716846c8a6a97e77d025de362a4974d6292d1197225
|
data/.travis.yml
CHANGED
@@ -86,7 +86,8 @@ module Braid
|
|
86
86
|
|
87
87
|
commit_message = "Update mirror '#{mirror.path}' to #{display_revision(mirror)}"
|
88
88
|
if in_error
|
89
|
-
|
89
|
+
merge_msg_path = git.repo_file_path('MERGE_MSG')
|
90
|
+
File.open(merge_msg_path, 'w') { |f| f.puts(commit_message) }
|
90
91
|
return
|
91
92
|
end
|
92
93
|
|
data/lib/braid/operations.rb
CHANGED
@@ -161,6 +161,18 @@ module Braid
|
|
161
161
|
end
|
162
162
|
|
163
163
|
class Git < Proxy
|
164
|
+
# Get the physical path to a file in the git repository (e.g.,
|
165
|
+
# 'MERGE_MSG'), taking into account worktree configuration. The returned
|
166
|
+
# path may be absolute or relative to the current working directory.
|
167
|
+
def repo_file_path(path)
|
168
|
+
if require_version('2.5') # support for --git-path
|
169
|
+
invoke(:rev_parse, '--git-path', path)
|
170
|
+
else
|
171
|
+
# Git < 2.5 doesn't support linked worktrees anyway.
|
172
|
+
File.join(invoke(:rev_parse, '--git-dir'), path)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
164
176
|
def commit(message, *args)
|
165
177
|
cmd = 'git commit --no-verify'
|
166
178
|
if message # allow nil
|
data/lib/braid/version.rb
CHANGED
data/spec/integration_helper.rb
CHANGED
@@ -8,7 +8,7 @@ require 'pathname'
|
|
8
8
|
|
9
9
|
TMP_PATH = File.join(Dir.tmpdir, 'braid_integration')
|
10
10
|
EDITOR_CMD = "#{TMP_PATH}/editor"
|
11
|
-
EDITOR_CMD_PREFIX = "GIT_EDITOR=#{EDITOR_CMD}"
|
11
|
+
EDITOR_CMD_PREFIX = "export GIT_EDITOR=#{EDITOR_CMD};"
|
12
12
|
BRAID_PATH = Pathname.new(File.dirname(__FILE__)).parent.realpath
|
13
13
|
FIXTURE_PATH = File.join(BRAID_PATH, 'spec', 'fixtures')
|
14
14
|
FileUtils.rm_rf(TMP_PATH)
|
@@ -19,7 +19,7 @@ BRAID_BIN = ((defined?(JRUBY_VERSION) || Gem.win_platform?) ? 'ruby ' : '') + Fi
|
|
19
19
|
def set_editor_message(message = 'Make some changes')
|
20
20
|
File.write(EDITOR_CMD, <<CMD)
|
21
21
|
#!/usr/bin/env ruby
|
22
|
-
File.
|
22
|
+
File.open(ARGV[0], 'w') { |file| file.write(#{message.inspect}) }
|
23
23
|
CMD
|
24
24
|
FileUtils.chmod 0755, EDITOR_CMD
|
25
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: braid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cristi Balan
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-03-
|
13
|
+
date: 2017-03-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: main
|