eac_git 0.7.3 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea0ec8dfe1a1b3cf7fdad28298c2eec04945cfcf3424bf39b1a3c4c9b5f0a9df
4
- data.tar.gz: f1b66e2d4f98f75a8768ae9e9cd773f4630e7d966e2762fbd540a36df28772bc
3
+ metadata.gz: 666b1ea54c39fca3540650e25d754d02b665e9f66668f190b1f7bf187098edb6
4
+ data.tar.gz: 606c1187283de19695be48cf13aadb345b60ac4f0625d3477e97532e763ced4a
5
5
  SHA512:
6
- metadata.gz: 501347637df536d4bf23ad9c724a19eb289ff1efb80570226528f7f246844c66dbf124cdd004a7fe35f0c5c089e054a536a2d56a67134bba207d796953402d40
7
- data.tar.gz: 59c40599027f0c05d7a24a50e161b31e311cf0bd3383c1fe8dd07f0ec821f3a0176c85e38f25de29bd3de3dfd19e72d108a9b6b4608d3976e3cf78e9adce2cc1
6
+ metadata.gz: 477b98b77bdefc6d1622603263eea2b60fde7736b2e44f36d201da1f6d0d37113d10c53a609876dad2338cdf48c18303105dfd3106952acb7154bff8491ca00d
7
+ data.tar.gz: d2cbcd3b0f43cd10bbfc1c17bb7fad3704927aa7585ab061aa04a396002d53cbb94dc07faef5369738c09e2c260a83183cd27f7ae23ba43a0e9acbdb7b46224c
@@ -9,7 +9,7 @@ module EacGit
9
9
  # @return [EacRubyUtils::Envs::Command]
10
10
  def archive_to_dir(path)
11
11
  path = path.to_pathname
12
- repo.command('archive', '--format=tar', hash).pipe(
12
+ repo.command('archive', '--format=tar', id).pipe(
13
13
  ::EacGit::Executables.tar.command('-xC', path)
14
14
  )
15
15
  end
@@ -16,10 +16,10 @@ module EacGit
16
16
  commiter_all: '%cn <%ce>, %ci'
17
17
  }.freeze
18
18
 
19
- common_constructor :repo, :hash
19
+ common_constructor :repo, :id
20
20
 
21
21
  def format(format)
22
- repo.command('--no-pager', 'log', '-1', "--pretty=format:#{format}", hash).execute!.strip
22
+ repo.command('--no-pager', 'log', '-1', "--pretty=format:#{format}", id).execute!.strip
23
23
  end
24
24
 
25
25
  FIELDS.each do |field, format|
@@ -45,7 +45,7 @@ module EacGit
45
45
  def diff_tree_execute
46
46
  args = []
47
47
  args << '--root' if root_child?
48
- args << hash
48
+ args << id
49
49
  repo.command(*::EacGit::Local::Commit::DiffTreeLine::GIT_COMMAND_ARGS, *args).execute!
50
50
  end
51
51
  end
data/lib/eac_git/local.rb CHANGED
@@ -8,6 +8,8 @@ module EacGit
8
8
  class Local
9
9
  require_sub __FILE__, include_modules: true
10
10
 
11
+ HEAD_REFERENCE = 'HEAD'
12
+
11
13
  common_constructor :root_path do
12
14
  self.root_path = root_path.to_pathname
13
15
  end
@@ -24,6 +26,11 @@ module EacGit
24
26
  base == revparse
25
27
  end
26
28
 
29
+ # @return [EacGit::Local::Commit
30
+ def head(required = true)
31
+ commit(HEAD_REFERENCE, required)
32
+ end
33
+
27
34
  def merge_base(*commits)
28
35
  refs = commits.dup
29
36
  while refs.count > 1
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacGit
4
- VERSION = '0.7.3'
4
+ VERSION = '0.8.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_git
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-24 00:00:00.000000000 Z
11
+ date: 2021-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_ruby_utils