Re: Something like $Id$, $Revision$ or $Date$?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jakub Narebski <jnareb@...>
Cc: Francis Galiegue <fg@...>, Michal Nazarewicz <mina86@...>, <git@...>
Date: Monday, November 10, 2008 - 4:58 pm

On Nov 10, 2008, at 3:32 PM, Jakub Narebski wrote:


Without adding any additional hooks, you could use the post-commit  
hook to look for any added/changed files containing $Id$ lines and  
force a checkout of them.

Perhaps something as simple as the following in your .git/hooks/post- 
commit (untested, caveat emptor, YMMV):

git diff --name-only --diff-filter=AM HEAD^ HEAD | \
while read file; do
   rm "$file" && git checkout -- "$file"
end

~~ Brian--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Something like $Id$, $Revision$ or $Date$?, Michal Nazarewicz, (Mon Nov 10, 1:38 pm)
Re: Something like $Id$, $Revision$ or $Date$?, Jakub Narebski, (Mon Nov 10, 2:03 pm)
Re: Something like $Id$, $Revision$ or $Date$?, Michal Nazarewicz, (Mon Nov 10, 4:00 pm)
Re: Something like $Id$, $Revision$ or $Date$?, Jakub Narebski, (Mon Nov 10, 4:17 pm)
Re: Something like $Id$, $Revision$ or $Date$?, Francis Galiegue, (Mon Nov 10, 4:24 pm)
Re: Something like $Id$, $Revision$ or $Date$?, Jakub Narebski, (Mon Nov 10, 4:32 pm)
Re: Something like $Id$, $Revision$ or $Date$?, Brian Gernhardt, (Mon Nov 10, 4:58 pm)