Why do dates in refspecs require the reflog?

2014-12-30 Thread Robert Dailey
I was surprised to find today that the following didn't work as expected: $ git show master@{1 year ago}:Path/To/File.h It gave me the following warning which did not make the problem obvious at all: warning: Log for 'master' only goes back to Mon, 8 Sep 2014 12:08:44 -0500. What it is trying

Re: Why do dates in refspecs require the reflog?

2014-12-30 Thread Stefan Beller
On Tue, Dec 30, 2014 at 12:12 PM, Robert Dailey rcdailey.li...@gmail.com wrote: I was surprised to find today that the following didn't work as expected: $ git show master@{1 year ago}:Path/To/File.h It gave me the following warning which did not make the problem obvious at all: warning:

Re: Why do dates in refspecs require the reflog?

2014-12-30 Thread Junio C Hamano
Robert Dailey rcdailey.li...@gmail.com writes: I was surprised to find today that the following didn't work as expected: $ git show master@{1 year ago}:Path/To/File.h It gave me the following warning which did not make the problem obvious at all: warning: Log for 'master' only goes back

Re: Why do dates in refspecs require the reflog?

2014-12-30 Thread Junio C Hamano
Robert Dailey rcdailey.li...@gmail.com writes: ... how can I view the contents of a file at a specified relative time frame ... git log --until=A --since=B master asks Git to start traversing the history backward from the tip of your current 'master' branch, without showing anything until it

Re: Why do dates in refspecs require the reflog?

2014-12-30 Thread Michael Haggerty
On 12/30/2014 09:12 PM, Robert Dailey wrote: I was surprised to find today that the following didn't work as expected: $ git show master@{1 year ago}:Path/To/File.h It gave me the following warning which did not make the problem obvious at all: warning: Log for 'master' only goes back to

Re: Why do dates in refspecs require the reflog?

2014-12-30 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: There is yet a third similar question: What is the last commit that is currently on the master branch that was *authored* at least one year ago? Please note that this question is even subtler, because author timestamps are often out-of-order even

Re: Why do dates in refspecs require the reflog?

2014-12-30 Thread Robert Dailey
On Tue, Dec 30, 2014 at 2:55 PM, Junio C Hamano gits...@pobox.com wrote: Michael Haggerty mhag...@alum.mit.edu writes: There is yet a third similar question: What is the last commit that is currently on the master branch that was *authored* at least one year ago? Please note that this

Re: Why do dates in refspecs require the reflog?

2014-12-30 Thread Michael Haggerty
On 12/30/2014 09:55 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: There is yet a third similar question: What is the last commit that is currently on the master branch that was *authored* at least one year ago? Please note that this question is even subtler, because

Re: Why do dates in refspecs require the reflog?

2014-12-30 Thread Jeff King
On Tue, Dec 30, 2014 at 03:39:53PM -0600, Robert Dailey wrote: It also feels like there should be a shorthand for the `git log` usage in conjunction with `git show`... I could probably make an alias for it. One thing I didn't see mentioned in this thread is that the question show me the