git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Matthias Urlichs <smurf@smurf.noris.de>
Cc: git@vger.kernel.org
Subject: Re: What to expect after GIT 0.99.7
Date: Mon, 19 Sep 2005 01:25:21 -0700	[thread overview]
Message-ID: <7vwtldsbv2.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <pan.2005.09.19.07.35.56.960375@smurf.noris.de> (Matthias Urlichs's message of "Mon, 19 Sep 2005 09:35:59 +0200")

Matthias Urlichs <smurf@smurf.noris.de> writes:

> Hi, Junio C Hamano wrote:
>
>> * Perhaps a tool to revert a single file to pre-modification
>>   state?  git-cat-file blob `git-ls-files | grep foo` >foo or
>>   git-cat-file blob `git-ls-tree HEAD foo` >foo?  What should
>>   the command be called?  git-revert is taken so is
>>   git-checkout.
>
> git-checkout can be extended to accept filenames, which would have the
> additional benefit of enabling me to get any revision, not just HEAD.
>
> So can git-reset.
>
> I agree with Anton's "git clean"; with an optional -r <commit>
> argument, that would be a better solution.

It probably is because I am BK untainted, but 'git clean' sounds
as if it would do 'git-ls-files --others | xargs rm -f'.

I used to do 'cvs update -p foo.c >foo.c', and extending
git-checkout may be familiar to cvs migrants.  The most
roundabout way (albeit with perhaps least typing) is:

    git-tar-tree HEAD | tar xf - foo.c

I originally talked about reverting file(s) in the working tree,
but I wonder if reverting a cache (eh, index) entry to the state
in a committed tree is useful.  read-tree with a pathspec to
overwrite index entries for specified paths while leaving others
intact.  We could think of it as undoing git-update-index.

  reply	other threads:[~2005-09-19  8:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-08  0:08 GIT 0.99.6 Junio C Hamano
2005-09-08 22:14 ` Tool renames and 'ls-files -t' output Junio C Hamano
2005-09-09  9:20   ` Post 0.99.7 preperation patches Junio C Hamano
2005-09-12  1:26     ` Petr Baudis
2005-09-11  7:02   ` RFC: s/git-merge-base/git-find-common-ancestor/g Yasushi SHOJI
2005-09-11  7:38     ` Junio C Hamano
2005-09-11  8:40       ` [PATCH] Rename git-merge-base to git-find-merge-base Yasushi SHOJI
2005-09-09  0:58 ` [RFC/Patch] Tool rename fallout fix Junio C Hamano
2005-09-17 16:43 ` No GIT 0.99.7 today Junio C Hamano
2005-09-18 23:37 ` [ANNOUNCE] GIT 0.99.7 Junio C Hamano
2005-09-18 23:40   ` What to expect after " Junio C Hamano
2005-09-19  1:30     ` Linus Torvalds
2005-09-19  2:02       ` Linus Torvalds
2005-09-19  9:56       ` Johannes Schindelin
2005-09-19 14:15       ` Joachim B Haga
2005-09-19 15:06         ` Linus Torvalds
2005-09-19  6:02     ` Anton Altaparmakov
2005-09-19  7:35     ` Matthias Urlichs
2005-09-19  8:25       ` Junio C Hamano [this message]
2005-09-19  8:36         ` Petr Baudis
2005-09-19 14:34         ` Linus Torvalds
2005-09-19  1:14   ` [ANNOUNCE] Cogito-0.15 Petr Baudis
2005-09-19 23:15     ` Pavel Machek
2005-09-20  0:35       ` Petr Baudis
2005-09-20  0:51       ` Linus Torvalds
2005-09-19  2:24   ` [ANNOUNCE] GIT 0.99.7 Nigel Cunningham
2005-09-19 12:01     ` Chris White
2005-09-19  6:21       ` Alan Chandler

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=7vwtldsbv2.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=smurf@smurf.noris.de \
    /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).