Skip to content

Commit 50ab11a

Browse files
authored
Make #initial_commit? public (sds#729)
Closes sds#728
1 parent d699c77 commit 50ab11a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/overcommit/hook_context/helpers/stash_unstaged_changes.rb

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ def setup_environment
2323
end
2424
end
2525

26+
# Returns whether the current git branch is empty (has no commits).
27+
def initial_commit?
28+
return @initial_commit unless @initial_commit.nil?
29+
@initial_commit = Overcommit::GitRepo.initial_commit?
30+
end
31+
2632
# Restore unstaged changes and reset file modification times so it appears
2733
# as if nothing ever changed.
2834
#
@@ -61,12 +67,6 @@ def store_modified_times
6167
end
6268
end
6369

64-
# Returns whether the current git branch is empty (has no commits).
65-
def initial_commit?
66-
return @initial_commit unless @initial_commit.nil?
67-
@initial_commit = Overcommit::GitRepo.initial_commit?
68-
end
69-
7070
# Returns whether there are any changes to tracked files which have not yet
7171
# been staged.
7272
def unstaged_changes?

0 commit comments

Comments
 (0)