ace-git-commit 0.26.6 → 0.26.7

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: 47e694b77027588d1a8b4d12754efebcf2cd6aa994abb41110938694aba45e8c
4
- data.tar.gz: 8154e8506beddee72c3fc209eb8af93bdfe31e0640c60df3dcb9b13fa28831f8
3
+ metadata.gz: b923bd1c9c55112988b6d4660cb438272ae14fec40032e2133a1c1f9d756262b
4
+ data.tar.gz: ab305eeca970773a27973b5bef25e57fc45b9c9eea9037967f5e8769b708e4ee
5
5
  SHA512:
6
- metadata.gz: 969cab507472223f8fd543ccb2c6656347b36ed275290847145d6430c0d0f492aeb521b4de1ce805c101987a16d3936e5fad8566cd55f3d6d6d86be8c960f6fe
7
- data.tar.gz: 19b9c0f1355f3c48e222aa5a3a4f5bd828f6aa6b01772719b0c4fbc324f768f7e28262469ccae5972d4fc71dc159998ccf0678a55ca0ca7d0c4f2fa9bbb72e77
6
+ metadata.gz: c627282622edcad7f63fe2d44380fa806069e30d98e781bd3036b1901c3bbbd029a12a473a4a8fea19d5b9fdf0b22f7f46597893759de04a5de0e496e357dd9f
7
+ data.tar.gz: 9e8faa8297cd6cec30a1b21b7f90c11d2ea313eda446386ddd16572959b18eb94c304db5c050905bbb17ef99c0fa3623c61b4df998bd2c14a00ab3386c36b491
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.26.7] - 2026-10-06
11
+
12
+ ### Fixed
13
+
14
+ - Refuse commit preparation during active native Git operations before changing the index, including scoped, staged-only, split and dry-run modes; preserve operation state and report native continuation guidance.
15
+
10
16
 
11
17
  ## [0.26.6] - 2026-09-02
12
18
 
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ace
4
+ module GitCommit
5
+ module Molecules
6
+ # Read-only inspection of the current worktree's native Git operation state.
7
+ class GitOperationDetector
8
+ MARKERS = {
9
+ "rebase-merge" => ["rebase", "git rebase --continue"],
10
+ "rebase-apply" => ["rebase", "git rebase --continue"],
11
+ "MERGE_HEAD" => ["merge", "git commit"],
12
+ "CHERRY_PICK_HEAD" => ["cherry-pick", "git cherry-pick --continue"],
13
+ "REVERT_HEAD" => ["revert", "git revert --continue"],
14
+ "sequencer" => ["sequencer", "git status and follow its native continuation guidance"]
15
+ }.freeze
16
+
17
+ def initialize(git_executor)
18
+ @git = git_executor
19
+ end
20
+
21
+ def detect
22
+ MARKERS.each do |marker, operation|
23
+ path = @git.execute("rev-parse", "--git-path", marker).delete_suffix("\n")
24
+ raise GitError, "Git returned an empty metadata path for #{marker}" if path.empty?
25
+ next unless present?(path)
26
+
27
+ return ["git-am", "git am --continue"] if marker == "rebase-apply" && present?(File.join(path, "applying"))
28
+
29
+ return operation
30
+ rescue GitError, SystemCallError => e
31
+ raise GitError, "Cannot inspect Git operation state (#{marker}): #{e.message}. " \
32
+ "Check metadata access and run git status before retrying."
33
+ end
34
+ nil
35
+ end
36
+
37
+ private
38
+
39
+ def present?(path)
40
+ File.stat(path)
41
+ true
42
+ rescue Errno::ENOENT
43
+ false
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -28,6 +28,10 @@ module Ace
28
28
  # @return [Boolean] True if successful
29
29
  def execute(options)
30
30
  validate_repository!
31
+ operation = Molecules::GitOperationDetector.new(@git).detect
32
+ if operation
33
+ raise GitError, "Cannot commit during active #{operation.first}. Finish with #{operation.last}."
34
+ end
31
35
 
32
36
  if options.debug
33
37
  puts "Debug: Commit options:"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ace
4
4
  module GitCommit
5
- VERSION = "0.26.6"
5
+ VERSION = "0.26.7"
6
6
  end
7
7
  end
@@ -9,6 +9,7 @@ require "ace/llm"
9
9
  # Require all components
10
10
  require_relative "git_commit/atoms/git_executor"
11
11
  require_relative "git_commit/atoms/gitignore_checker"
12
+ require_relative "git_commit/molecules/git_operation_detector"
12
13
  require_relative "git_commit/molecules/diff_analyzer"
13
14
  require_relative "git_commit/molecules/message_generator"
14
15
  require_relative "git_commit/molecules/file_stager"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ace-git-commit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.6
4
+ version: 0.26.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Czyz
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-09-05 00:00:00.000000000 Z
10
+ date: 2026-10-08 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: ace-support-cli
@@ -118,6 +118,7 @@ files:
118
118
  - lib/ace/git_commit/molecules/commit_summarizer.rb
119
119
  - lib/ace/git_commit/molecules/diff_analyzer.rb
120
120
  - lib/ace/git_commit/molecules/file_stager.rb
121
+ - lib/ace/git_commit/molecules/git_operation_detector.rb
121
122
  - lib/ace/git_commit/molecules/message_generator.rb
122
123
  - lib/ace/git_commit/molecules/path_resolver.rb
123
124
  - lib/ace/git_commit/molecules/split_commit_executor.rb