git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Nahas <mike.nahas@gmail.com>
To: git@vger.kernel.org
Subject: RE: File Systems and a Theory of Edits
Date: Sun, 31 Jul 2011 10:15:01 -0400	[thread overview]
Message-ID: <CADo4Y9gECLJ45g_r-uZBRnfEVXBRw2EoF2HkRu=0-eJ2YCuBLA@mail.gmail.com> (raw)
In-Reply-To: <CADo4Y9gU_Z73gCPCESvVZhLOJUJg+mTqHkeqpNv2L8xLJvKxEQ@mail.gmail.com>

Rene,
I don't doubt that there exists current commands in git that can
perform operations like cat, ls, etc.  My point is that git can make
it easier for new users to learn commands and existing users to
remember commands if git copies the name and sematics (as much as
possible) of cat, ls, etc.

Ævar,
The issue is what goes inside the xargs command.  If it is unix's cat
command, the files listed by find will be from the commit's snapshot,
but the files read by cat will be from the working tree.

I believe the solution for xargs may be John D.'s solution - to
"mount" the snapshot as a file system.  And the "mount" command in git
is "git checkout".  (Now, I almost want to rename "git checkout" to
"git remount"!)


Mike Nahas


On Sun, Jul 31, 2011 at 4:15 AM, René Scharfe
<rene.scharfe@lsrfire.ath.cx> wrote:
>
> Am 30.07.2011 21:06, schrieb Ævar Arnfjörð Bjarmason:
> > On Sat, Jul 30, 2011 at 16:29, Michael Nahas <mike.nahas@gmail.com> wrote:
> >>     "git xargs <commit> ..."  (Is this possible?)
> >
> > I don't have comments on the rest of your proposal, but I've often
> > wanted a git-find(1) similar to git-grep(1). Which would give you this
> > functionality.
> >
> > Then you could simply:
> >
> >     git find <commit> <path> -type f | xargs <whatever>
> >
> > Or something like that.
>
> How about this, which should match your example:
>
>        git ls-tree -r --name-only <commit> <path> | xargs <whatever>
>
> René

  parent reply	other threads:[~2011-07-31 14:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-30 14:29 File Systems and a Theory of Edits Michael Nahas
2011-07-30 19:06 ` Ævar Arnfjörð Bjarmason
2011-07-31  8:15   ` René Scharfe
     [not found]     ` <CADo4Y9gU_Z73gCPCESvVZhLOJUJg+mTqHkeqpNv2L8xLJvKxEQ@mail.gmail.com>
2011-07-31 14:15       ` Michael Nahas [this message]
2011-07-31 17:21         ` Michael Witten
2011-07-31 21:13           ` Michael Nahas
2011-07-31 22:20             ` Andreas Schwab
2011-07-31 22:39               ` Michael Nahas
2011-08-01 12:01             ` Michael Nahas
2011-07-31 16:16       ` René Scharfe
2011-08-01  1:04     ` Junio C Hamano
2011-08-01 11:14       ` Michael Nahas
2011-07-30 19:40 ` John M. Dlugosz
2011-07-31 11:56   ` Michael Witten
2011-08-01  1:22   ` Jeff King

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='CADo4Y9gECLJ45g_r-uZBRnfEVXBRw2EoF2HkRu=0-eJ2YCuBLA@mail.gmail.com' \
    --to=mike.nahas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mike@nahas.com \
    /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).