New ruby program to use as a smudge filter for Git.

See:
  http://git-scm.com/book/ch7-2.html#Keyword-Expansion
This commit is contained in:
Laurent Rineau 2012-11-26 15:11:13 +01:00
parent 14221e947f
commit a95e15585a
1 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1,4 @@
#! /usr/bin/env ruby
data = STDIN.read
last_date = `git log --pretty=format:"%ad" -1`
puts data.gsub('$Date$', '$Date: ' + last_date.to_s + '$')