Sean Whitton writes ("Bug#902809: want git-debrebase(?) 
smash-working-tree-timestamps"):
> /usr/bin/smash-working-tree-timestamps in devscripts?

Good plan.  Now, what should it do ?

We definitely need it to touch files which came from `git checkout',
`git reset' and so on.

If one is trying to use some existing build machinery which has
timestamp-related bugs, then it is likely that totally untracked files
which are actually build products will want to be older than the
source files being touched.

I don't think .gitignore should influence the behaviour, because we
are trying to cope with broken packages, whose .gitignore is likely to
be unhelpful.

There is a question about files the user has created, which are not
build products, and which have not been added to HEAD or to the index.
We can't distinguish these from build products.  I suggest we treat
them as build products, and advise the user to commit before building
(or at least `git add' anything they intend to keep).

Something like
  #!/bin/bash
  set -o pipefail
  git ls-files -z | xargs -0r touch -h -r . --

This does not include files which are in HEAD, not in the index, but
in the working tree.  Ie files which were git rm'd, but not committed,
and then recreated.

Ian.

-- 
Ian Jackson <[email protected]>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.

Reply via email to