git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Josefsson <simon@josefsson.org>
To: Yann Dirson <ydirson@altern.org>
Cc: Sergey Vlasov <vsu@altlinux.ru>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	git@vger.kernel.org
Subject: Re: gitco - replacement for cvsco
Date: Wed, 28 Feb 2007 22:31:27 +0100	[thread overview]
Message-ID: <87y7mirmts.fsf@latte.josefsson.org> (raw)
In-Reply-To: <20070228195536.GB4149@nan92-1-81-57-214-146.fbx.proxad.net> (Yann Dirson's message of "Wed\, 28 Feb 2007 20\:55\:36 +0100")

Yann Dirson <ydirson@altern.org> writes:

> As a big fan of cvsco and friends, I admit I often miss that one in
> git repos.
>
> On Wed, Feb 28, 2007 at 03:08:02PM +0100, Simon Josefsson wrote:
>> However, one problem with that, compared to 'cvsco', is that
>> 'git-reset --hard' does not tell me tell me which files were deleted
>> and which file were restored.  May I suggest a --verbose or similar?
>
> Here is a small change to your script that does just that.  It is far
> from perfect:
>
> - uses cogito and not plain git.  Not sure how to achieve the same
> compact layout with plain git - both cogito and stgit forge this type
> of output themselves.  Would be great to get it directly from git
> itself...
>
> - not very efficient, and not very secure, since we scan the tree once
> for reporting and then once for deleting the files, leaving a window
> where files could be created by another program after the cg-status
> call, and then removed by git-reset.
>
> You've been warned :)
>
> #!/bin/sh
> # gitco - cruel checkout.  Discards everything that has not been
> # committed, and checkout missing files.
> git clean -d -x
> cg status -w
> git reset --hard

jas@mocca:~/src/libtasn1$ gitco
Removing foo
M Makefile.am
! gendocs.sh
jas@mocca:~/src/libtasn1$

Perfect!

Thanks,
Simon

  reply	other threads:[~2007-02-28 21:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-27 11:41 Replacement for cvs2cl, for generating ChangeLog Simon Josefsson
2007-02-27 12:23 ` Junio C Hamano
2007-02-27 12:37 ` Johannes Schindelin
2007-02-27 14:40   ` Sergey Vlasov
2007-02-28 14:08     ` gitco - replacement for cvsco Simon Josefsson
2007-02-28 19:55       ` Yann Dirson
2007-02-28 21:31         ` Simon Josefsson [this message]
2007-02-27 15:19   ` Replacement for cvs2cl, for generating ChangeLog Johannes Schindelin
2007-02-28 14:12     ` Simon Josefsson
2007-02-27 19:27   ` Junio C Hamano
2007-02-27 19:45     ` Johannes Schindelin
2007-02-27 20:54       ` Johannes Schindelin
2007-02-27 12:57 ` Andy Parkins
2007-02-27 15:56   ` Johannes Schindelin
2007-02-27 21:27   ` Robin Rosenberg
2007-02-27 21:50     ` Junio C Hamano
2007-02-27 22:22       ` Johannes Schindelin
2007-02-27 22:12     ` Johannes Schindelin
2007-02-28 14:27       ` Simon Josefsson

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=87y7mirmts.fsf@latte.josefsson.org \
    --to=simon@josefsson.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=vsu@altlinux.ru \
    --cc=ydirson@altern.org \
    /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).