control: reassign -1 devscripts control: retitle -1 New script: smash-working-tree-timestamps control: severity -1 wishlist
Hello, On Mon 09 Jul 2018 at 04:20PM +0100, Ian Jackson wrote: > 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). This reasoning all seems fine to me. I guess that experience using the script to avoid FTBFS will reveal whether this behaviour needs to be tweaked; we probably shouldn't overthink it. > 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. Those seem likely to be build products that were accidentally committed (because, e.g., accidentally included in the source package). So that seems right, too. -- Sean Whitton
signature.asc
Description: PGP signature