git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Geoff Russell" <geoffrey.russell@gmail.com>
To: "Jeff King" <peff@peff.net>
Cc: "Mikael Magnusson" <mikachu@gmail.com>, git@vger.kernel.org
Subject: Re: finding deleted file names
Date: Fri, 4 Jul 2008 16:15:01 +0930	[thread overview]
Message-ID: <93c3eada0807032345r2ff59d69kca42bc9ea7782f31@mail.gmail.com> (raw)
In-Reply-To: <20080703104233.GA26162@sigill.intra.peff.net>

On 7/3/08, Jeff King <peff@peff.net> wrote:
> On Thu, Jul 03, 2008 at 12:15:37PM +0930, Geoff Russell wrote:
>
>  > >> 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 :).
>  >
>  > Thanks for this, but I'm a little confused.
>  >
>  > If I do a "git init", there must be a first commit after this? Isn't
>  > this the first commit, how
>  > can there be more than one first commit?
>
>
> The confusing part is that you two are talking about two slightly
>  different things. If you define "initial commit" as "the commit which
>  has no parents" then there can be many (you get a new one anytime you
>  merge in a project with unrelated history).
>
>  However, what Geoff originally mentioned was HEAD{'7 days ago'}, which
>  actually looks in the reflog. So if you define "initial commit" as "the
>  first commit value that this ref ever had" then there is only one
>  (though of course, your reflog will eventually expire, so it won't be
>  "the oldest value this ref ever had" but rather "the oldest one the
>  reflog ever remembers it having").

You guys are (quite properly) worried about all the edge cases and I
have probably
confused things by using the reflog when they may be a better way of
doing things.

Perhaps if I describe the problem, there may be a better solution than using the
reflog.  I've made a bunch of changes to a repository, a few weeks
later I figure I've
deleted a file I need but am not really sure of its name. So I want to list the
files that I've deleted during the past few weeks. So the aim is to
find the files that
aren't in the current working directory but that are in some commit done since
day X.

Cheers,
Geoff


>
>  -Peff
>


-- 
6 Fifth Ave,
St Morris, S.A. 5068
Australia
Ph: 041 8805 184 / 08 8332 5069

  reply	other threads:[~2008-07-04  6:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03  0:01 finding deleted file names Geoff Russell
2008-07-03  1:12 ` Mikael Magnusson
2008-07-03  2:45   ` Geoff Russell
2008-07-03  3:18     ` Mikael Magnusson
2008-07-03 10:42     ` Jeff King
2008-07-04  6:45       ` Geoff Russell [this message]
2008-07-04  7:05         ` Junio C Hamano
2008-07-06  4:54           ` Geoff Russell
2008-07-06  5:17             ` Junio C Hamano
2008-07-07  0:41               ` Geoff Russell
2008-07-03  9:20 ` Jakub Narebski
2008-07-03 10:36 ` Jeff King
2008-07-03 19:41   ` Junio C Hamano
2008-07-03 19:47     ` Jeff King
2008-07-03 20:32   ` Shawn O. Pearce
2008-07-03 11:57 ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93c3eada0807032345r2ff59d69kca42bc9ea7782f31@mail.gmail.com \
    --to=geoffrey.russell@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mikachu@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).