git-multirepo 1.0.0.beta3 → 1.0.0.beta4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41e47d03eba5e760c151e04bfcb7a3301a19c964
4
- data.tar.gz: 4c851995c6891c658e9f3214aa8ed1e26cedc1e8
3
+ metadata.gz: bc4fcacdeda46d9bd6dbaf5f70cfdfd1e9a42752
4
+ data.tar.gz: de1ffba314e943dcd1357dd7c23c8a0a5f9c4138
5
5
  SHA512:
6
- metadata.gz: 94ce390a9c7dd25481619d3236d3fd18f0a7edc8b40a6210e09a5a531649839adf2b9f0dfd06025d758823464a83d8f11f18cd93b7873542d4b0087553e534f4
7
- data.tar.gz: 95d8231b95904970179a1e7c68f831bcd8fad7fc7281d14e0bf8f05a84f00a72153c09e4a4385ab536f49463354a332077d26a52641619bfffef41a7d3468f4a
6
+ metadata.gz: 4d06277c5724ddd505c7d41219ac947111e6c3184def6b05b7069ffe85378e0c77e4d267fdefdf81df366a2f55190a1ec318ef6b10701e55cd47acfcedaeaf69
7
+ data.tar.gz: e66429331d6bdd52a8c86010685fa803a20ff2cf261acba1679b4fc84f1f979c5ca3f0d1d53eaeae6b28d3b4ab136e7f8a8074e2d1ac95e0f9603f995293319e
data/README.md CHANGED
@@ -98,7 +98,7 @@ If you want to stop using git-multirepo, run `multi uninit`. This will remove al
98
98
 
99
99
  ## Limitations
100
100
 
101
- - git-multirepo should be considered beta at the moment. All of the core features work as described, though. Suggestions and contributions are welcome.
101
+ - git-multirepo should be considered alpha at the moment. All of the core features work as described, though. Suggestions and contributions are welcome.
102
102
  - The project and its dependencies must live beside each other on disk (for now).
103
103
  - There are currently no features to facilitate branch-heavy workflows.
104
104
  - You must (ideally) install the tool on your CI server: `gem install git-multirepo`
@@ -1,5 +1,5 @@
1
1
  module MultiRepo
2
2
  NAME = "git-multirepo"
3
- VERSION = "1.0.0.beta3"
3
+ VERSION = "1.0.0.beta4"
4
4
  DESCRIPTION = "Track multiple Git repositories side-by-side."
5
5
  end
@@ -27,8 +27,8 @@ module MultiRepo
27
27
  Console.log_substep("Added the repository '#{repo.path}' to the .multirepo file")
28
28
  end
29
29
  end
30
- ConfigFile.save(entries)
31
30
 
31
+ ConfigFile.save(entries)
32
32
  ConfigFile.stage
33
33
 
34
34
  uncommitted = Utils.warn_of_uncommitted_changes(entries)
@@ -13,7 +13,11 @@ module MultiRepo
13
13
 
14
14
  Console.log_step("Cloning dependencies and installing hook...")
15
15
 
16
- ConfigFile.load.each { |e| install(e) }
16
+ config_entries = ConfigFile.load
17
+
18
+ Console.log_info("There are #{config_entries.count} dependencies to install");
19
+
20
+ config_entries.each { |e| install(e) }
17
21
 
18
22
  self.install_pre_commit_hook
19
23
 
@@ -9,9 +9,14 @@ module MultiRepo
9
9
  super
10
10
  ensure_multirepo_initialized
11
11
 
12
+ Console.log_step("Updating...")
13
+
12
14
  LockFile.update
15
+ Console.log_substep("Updated lock file")
16
+
17
+ self.install_pre_commit_hook
13
18
 
14
- Console.log_step("Lock file updated")
19
+ Console.log_step("Done!")
15
20
  rescue MultiRepoException => e
16
21
  Console.log_error(e.message)
17
22
  end
@@ -6,5 +6,8 @@ module MultiRepo
6
6
 
7
7
  attr_accessor :verbose
8
8
  @verbose = false
9
+
10
+ attr_accessor :running_git_hook
11
+ @running_git_hook = false
9
12
  end
10
13
  end
@@ -15,11 +15,12 @@ module MultiRepo
15
15
 
16
16
  def self.run_in_working_dir(path, git_command, show_output)
17
17
  full_command = "git -C \"#{path}\" #{git_command}";
18
- run(full_command, show_output)
19
- end
20
-
21
- def self.run_in_working_dir_with_env_unset(path, git_command, show_output)
22
- full_command = "unset $(git rev-parse --local-env-vars); git -C \"#{path}\" #{git_command}";
18
+
19
+ # True fix for the -C flag issue in pre-commit hook where the status command would
20
+ # fail to provide correct results if a pathspec was provided when performing a commit.
21
+ # http://thread.gmane.org/gmane.comp.version-control.git/263319/focus=263323
22
+ full_command = "sh -c 'unset $(git rev-parse --local-env-vars); #{full_command};'" if Config.instance.running_git_hook
23
+
23
24
  run(full_command, show_output)
24
25
  end
25
26
 
@@ -28,7 +28,7 @@ module MultiRepo
28
28
  end
29
29
 
30
30
  def changes
31
- output = Git.run_in_working_dir_with_env_unset(@path, "status --porcelain", false)
31
+ output = Git.run_in_working_dir(@path, "status --porcelain", false)
32
32
  lines = output.split("\n").each{ |f| f.strip }.delete_if{ |f| f == "" }
33
33
  lines.map { |l| Change.new(l) }
34
34
  end
@@ -6,6 +6,8 @@ require "multirepo/utility/console"
6
6
  module MultiRepo
7
7
  class PreCommitHook
8
8
  def self.run
9
+ Config.instance.running_git_hook = true
10
+
9
11
  entries = ConfigFile.load
10
12
  uncommitted = Utils.warn_of_uncommitted_changes(entries)
11
13
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-multirepo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta3
4
+ version: 1.0.0.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michaël Fortin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-03 00:00:00.000000000 Z
11
+ date: 2015-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -109,6 +109,8 @@ extensions: []
109
109
  extra_rdoc_files: []
110
110
  files:
111
111
  - .gitignore
112
+ - .multirepo
113
+ - .multirepo.lock
112
114
  - .rspec
113
115
  - Gemfile
114
116
  - Gemfile.lock