Skip to content

Commit

Permalink
don't clear the commit cache when creating a commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cfillion committed Jul 28, 2016
1 parent 4470646 commit ea0f3bc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/reapack/index/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def create_commit(message, files)
end
}

c = Rugged::Commit.create @repo, \
hash = Rugged::Commit.create @repo, \
tree: new_index.write_tree(@repo),
message: message,
parents: [target].compact,
Expand All @@ -93,9 +93,10 @@ def create_commit(message, files)

# force-reload the repository
@repo = Rugged::Repository.discover path
@commits = nil

get_commit c
commit = get_commit hash
@commits << commit if @commits
commit
end

private
Expand Down

0 comments on commit ea0f3bc

Please sign in to comment.