Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow to amend during a rebase

  • Loading branch information...
commit cd50125e45d7795849664adbe3f6f9ff624b242e 1 parent b34fa79
@jacob-carlborg jacob-carlborg authored
Showing with 6 additions and 2 deletions.
  1. +5 −1 Support/lib/git.rb
  2. +1 −1  Support/lib/partial_commit_worker.rb
View
6 Support/lib/git.rb
@@ -406,7 +406,11 @@ def with_path(path)
return self if path.blank?
@gits[path] = Git.new(:path => path_for(path), :parent => self)
end
-
+
+ def rebase_in_progress?
+ File.exist?(File.join(path, '.git/rebase-merge')) || File.exist?(File.join(path, '.git/rebase-apply'))
+ end
+
protected
def get_range_arg(options = {})
return options[:since] if options[:since]
View
2  Support/lib/partial_commit_worker.rb
@@ -20,7 +20,7 @@ def initialize(git)
end
def ok_to_proceed_with_partial_commit?
- (! git.branch.current_name.nil?) || git.initial_commit_pending?
+ git.rebase_in_progress? || (! git.branch.current_name.nil?) || git.initial_commit_pending?
end
def target_paths
Please sign in to comment.
Something went wrong with that request. Please try again.