git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: Forcing rewrite of files in working tree
Date: Fri, 3 Aug 2007 13:45:46 +0100	[thread overview]
Message-ID: <200708031345.47127.andyparkins@gmail.com> (raw)

Hello,

I want to write a little recipe in a Makefile that ensures the $Id$ field in a 
series of text files is correct.  In case it's relevant, I'm including a load 
of asciidoc files as subsections into one master file; each file has a $Id$ 
field in the header, which very nicely prints out at the start of each 
section.  However, the $Id$ field is only written on checkout (not on checkin 
for fairly obvious reasons).  That means that for any files I've changed, the 
$Id$ is wrong.  Before I generate output using ASCIIdoc I'd like to ensure 
the $Id$ is correct.

How do I do it?

The only method I've found is to delete the file in the work tree then do 
git-checkout again.  Even with -f, if the file is not changed git doesn't 
perform a checkout again, so git-checkout -f is not sufficient.  I assume I 
can do what I want with some clever plumbing, but I don't know any 
plumbing. :-)



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

             reply	other threads:[~2007-08-03 12:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 12:45 Andy Parkins [this message]
2007-08-03 12:58 ` Forcing rewrite of files in working tree Rogan Dawes
2007-08-03 13:39   ` Andy Parkins
2007-08-03 19:55 ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200708031345.47127.andyparkins@gmail.com \
    --to=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).