Re: finding deleted file names

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: finding deleted file names

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:53

Jeff King [off-list ref] writes:
On Thu, Jul 03, 2008 at 09:31:55AM +0930, Geoff Russell wrote:
quoted
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}
This should issue a warning, but use the oldest reflog entry. However,
there is a slight problem with that. See below for details.
I think your patch is a sane thing to do.

Once reflog entries begin expiring, we won't have the null_sha1 on the
previous side of them, and after that we will keep returning the
oldest-known one, so nobody should be expecting to find out when a ref was
first created in this repository by checking with what timestamp that
syntax breaks in the existing interface.

Sorry for not being Shawn ;-)

Re: finding deleted file names

From: Jeff King <hidden>
Date: 2016-06-15 22:44:53

On Thu, Jul 03, 2008 at 12:41:43PM -0700, Junio C Hamano wrote:
Once reflog entries begin expiring, we won't have the null_sha1 on the
previous side of them, and after that we will keep returning the
oldest-known one, so nobody should be expecting to find out when a ref was
first created in this repository by checking with what timestamp that
syntax breaks in the existing interface.
Right, that was my thought: though perhaps not technically as precise,
it is much more DWIM.

My other concern, which I failed to voice in the original mail was:
should we do this magic for other reflog entries besides the first one?
It is possible to end up with a null sha1 in any other entry? Branch
creation shouldn't do it, because we will have deleted any previous
reflog when killing off the branch before, so we always end up putting
in the "oldest" reflog entry. Cloning shouldn't do it for obvious
reasons.
Sorry for not being Shawn ;-)
Heh.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help