Thread (9 messages) flat view 9 messages, 4 authors, 2016-06-15

Re: [RFC] undo and redo

From: Carl Baldwin <hidden>
Date: 2016-06-15 22:42:04

On Wed, Aug 24, 2005 at 11:18:42AM -0700, Junio C Hamano wrote:
Carl Baldwin [off-list ref] writes:
quoted
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.
quoted
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
I'll take this.  This is what I was going for but being new to git I
didn't know all that was available.  A good reason to request comments
:-)
Also nice to learn here is "git-diff-files --name-only".
Also good to know, thanks.

Carl

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Carl Baldwin                        Systems VLSI Laboratory
 Hewlett Packard Company
 MS 88                               work: 970 898-1523
 3404 E. Harmony Rd.                 work: Carl.N.Baldwin@hp.com
 Fort Collins, CO 80525              home: Carl@ecBaldwin.net
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help