Skip to content

Commit

Permalink
Make the post-receive hook work for the first commit too.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Donovan committed Jun 17, 2008
1 parent ae74be0 commit f860abd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/post-receive
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ end
before, after, ref = STDIN.read.split(/\s+/)
repo = Grit::Repo.new(Dir.pwd)

raw_commits = repo.git.rev_list({:pretty => 'raw'}, "#{before}..#{after}")
range = (before =~ /^0+$/) ? after : "#{before}..#{after}"
raw_commits = repo.git.rev_list({:pretty => 'raw'}, range)
commits = Grit::Commit.list_from_string(repo, raw_commits)

commit_uri_template = repo.config['uris.commit'] || ''
Expand Down

0 comments on commit f860abd

Please sign in to comment.