All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Carl Baldwin <cnb@fc.hp.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC] undo and redo
Date: Wed, 24 Aug 2005 11:18:42 -0700	[thread overview]
Message-ID: <7vu0hfdwql.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 20050824172339.GA7083@hpsvcnb.fc.hp.com

Carl Baldwin <cnb@fc.hp.com> writes:

> Attached are the two scripts.  Comments and criticism are welcome.

An obligatory non-technical comment.  I would have liked to see
this not in a MIME multipart format, which made commenting on it
a bit harder than necessary.

> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: attachment; filename=git-undo-script
>
> #!/bin/sh
>
> . git-sh-setup-script || die "Not a git archive"
>
> if [ -n "$(git-diff-files)" ]; then
>     echo The following files should be updated!
>     echo
>     git-diff-files | awk '{print $6}'
> fi

There is nothing wrong with the above, but I would have written
it like this (I think you forgot to exit after showing the list
of files):

    git-update-cache --refresh || exit

Also nice to learn here is "git-diff-files --name-only".

> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: attachment; filename=git-redo-script
>
> #!/bin/sh
>
> . git-sh-setup-script || die "Not a git archive"
>
> if [ -n "$(git-diff-files)" ]; then
>     echo The following files should be updated!
>     echo
>     git-diff-files | awk '{print $6}'
> fi

Same here.

>     currenttree=$(git-write-tree)
>     git-read-tree -u -m $basetree $currenttree $redotree
>     git-merge-cache git-merge-one-file-script -a

Interesting.  Very interesting.

  parent reply	other threads:[~2005-08-24 18:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-24 17:23 [RFC] undo and redo Carl Baldwin
2005-08-24 18:10 ` Carl Baldwin
2005-08-24 18:51   ` Linus Torvalds
2005-08-24 19:56     ` Carl Baldwin
2005-08-24 20:44       ` Daniel Barkalow
2005-08-24 20:47         ` Carl Baldwin
2005-08-24 21:04           ` Daniel Barkalow
2005-08-24 22:48             ` Junio C Hamano
2005-08-25  2:41               ` Carl Baldwin
2005-08-25  5:06                 ` Junio C Hamano
2005-08-25 16:32                   ` Carl Baldwin
2005-08-25 17:39                     ` Kalle Valo
2005-08-25 19:59                     ` Kirby C. Bohling
2005-08-25 20:19                       ` Junio C Hamano
2005-08-25 20:49                         ` Kirby C. Bohling
2005-08-25 21:28                           ` Carl Baldwin
2005-08-25 20:37                       ` Carl Baldwin
2005-08-25 21:09                         ` Kirby C. Bohling
2005-08-25 21:42                           ` Carl Baldwin
2005-08-24 18:18 ` Junio C Hamano [this message]
2005-08-24 20:01   ` Carl Baldwin

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=7vu0hfdwql.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=cnb@fc.hp.com \
    --cc=git@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.