[Swift-devel] [Patch] remove incorrect git-svn options

Allan Espinosa aespinosa at cs.uchicago.edu
Mon Feb 21 14:40:21 CST 2011


patch:
diff --git a/libexec/svn-revision b/libexec/svn-revision
index 6d88fb8..f759d63 100755
--- a/libexec/svn-revision
+++ b/libexec/svn-revision
@@ -6,7 +6,7 @@ hereversion() {
     M=$(svn status | grep --invert-match '^\?' > /dev/null && echo
"($1 modified locally)")
   elif [ -d ".git" ] && [ -x "$(which git)" ]; then
     R=$(git svn info | grep '^Revision' | sed "s/Revision: /$1-r/")
-    if git status -a >/dev/null ; then
+    if git status --porcelain | grep 'M ' >/dev/null ; then
       M="($1 modified locally)"
     fi
   else

Before:
$ ./libexec/svn-revision
error: unknown switch `a'
usage: git status [options] [--] <filepattern>...

    -v, --verbose         be verbose
    -s, --short           show status concisely
    --porcelain           show porcelain output format
    -z, --null            terminate entries with NUL
    -u, --untracked-files[=<mode>]
                          show untracked files, optional modes: all,
normal, no. (Default: all)

error: unknown switch `a'
usage: git status [options] [--] <filepattern>...

    -v, --verbose         be verbose
    -s, --short           show status concisely
    --porcelain           show porcelain output format
    -z, --null            terminate entries with NUL
    -u, --untracked-files[=<mode>]
                          show untracked files, optional modes: all,
normal, no. (Default: all)

swift-r4110 cog-r3032

$ After:
]$ ./libexec/svn-revision
swift-r4110 (swift modified locally) cog-r3032
-- 
Allan M. Espinosa <http://amespinosa.wordpress.com>
PhD student, Computer Science
University of Chicago <http://people.cs.uchicago.edu/~aespinosa>



More information about the Swift-devel mailing list