Re: finding deleted file names
- From
- Mikael Magnusson <mikachu@gmail.com>
- Date
- Jul 3, 2008, 01:12 UTC
- Message-ID
- <237967ef0807021812r3ccbfbacg2cb6b12358d2ee2e@mail.gmail.com>
- In-Reply-To
- <93c3eada0807021701m13b7adddv51537f4cf9d52533@mail.gmail.com>
2008/7/3 Geoff Russell <geoffrey.russell@gmail.com>:
Show 10 quoted lines
> git diff --diff-filter=D --name-only HEAD@{'7 days ago'}
>
> finds files deleted during the last 7 days, but if my repository is
> only 6 days old I get a
> fatal error.
>
> fatal: bad object HEAD@{7 days ago}
>
> Is there something that says "since repository creation", ie., go back as far
> as possible, but no further? Is there a symbolic name for the initial commit?There's no symbolic name for it, since there might not be only one initial commit. git.git for example has at least three root commits. You will probably get what you want with $(git rev-list HEAD|tail -1). If your history is very large, $(git rev-list --reverse HEAD|head -1) is slightly faster, but usually not enough to offset typing --reverse :).
-- Mikael Magnusson