Carl Baldwin <[EMAIL PROTECTED]> 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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html