* "p4 revert -a" equivalent in git?
@ 2005-12-24 0:13 Luben Tuikov
2005-12-24 0:23 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Luben Tuikov @ 2005-12-24 0:13 UTC (permalink / raw)
To: git
Hi,
Is there a "p4 revert -a" equivalent in git or should I
whip up a script using git-diff-index and git-update-index?
That is I want to git-update-index --refresh for all
files whose inode may have changed but the actual file
data has not (i.e. git-diff-index is empty).
Thanks,
Luben
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: "p4 revert -a" equivalent in git?
2005-12-24 0:13 "p4 revert -a" equivalent in git? Luben Tuikov
@ 2005-12-24 0:23 ` Junio C Hamano
2005-12-24 0:36 ` Luben Tuikov
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2005-12-24 0:23 UTC (permalink / raw)
To: ltuikov; +Cc: git
Luben Tuikov <ltuikov@yahoo.com> writes:
> That is I want to git-update-index --refresh for all
> files whose inode may have changed but the actual file
> data has not.
That's what "git-update-index --refresh" does, unless I am
misreading what you say you want.
$ git checkout master
$ touch *.c
$ git diff-index HEAD ;# tons of changes
$ git update-index --refresh
$ git diff-index HEAD ;# no changes
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: "p4 revert -a" equivalent in git?
2005-12-24 0:23 ` Junio C Hamano
@ 2005-12-24 0:36 ` Luben Tuikov
0 siblings, 0 replies; 3+ messages in thread
From: Luben Tuikov @ 2005-12-24 0:36 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
--- Junio C Hamano <junkio@cox.net> wrote:
> That's what "git-update-index --refresh" does, unless I am
> misreading what you say you want.
>
> $ git checkout master
> $ touch *.c
> $ git diff-index HEAD ;# tons of changes
> $ git update-index --refresh
> $ git diff-index HEAD ;# no changes
Ok, thanks. I wasn't sure if I had to specify the file
names on the command line of "git-update-index --refresh".
It looks like I don't have to, so this is a perfect
equivalent.
Thanks,
Luben
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-12-24 0:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-24 0:13 "p4 revert -a" equivalent in git? Luben Tuikov
2005-12-24 0:23 ` Junio C Hamano
2005-12-24 0:36 ` Luben Tuikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox