Skip to content

Commit

Permalink
use abbreviated hashes for everything
Browse files Browse the repository at this point in the history
  • Loading branch information
dmac committed Jan 14, 2011
1 parent d9556e7 commit af4a3d7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions git-review
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ def ask_for_additional_email_addresses
end

def process_commit(hash)
hash = short_hash(hash) # Use abbreviated hashes for readability

# TODO: open your own editor with convenient filenames?
if @opts[:paged]
system("clear; git show #{hash}")
Expand Down Expand Up @@ -240,6 +242,10 @@ def review_commits
end
end

def short_hash(hash)
`git log --format="%h" -n 1 #{hash}`.strip
end

if __FILE__ == $0
initialize_env
initialize_smtp
Expand Down

0 comments on commit af4a3d7

Please sign in to comment.