Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Exit code 1 when git commands fail.

This is because errexit (-e) always exits with an exit code of 0 so you can't test the error code in another calling script (cat-if-error).
  • Loading branch information...
commit 169f05de5df820af1462e1fab620eba479c8d44e 1 parent 66b2d02
authored November 16, 2009

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  update-svn-git
4  update-svn-git
@@ -9,14 +9,14 @@ then
9 9
    find . -mindepth 1 -maxdepth 2 -type d -name \*.git-svn | while read dir
10 10
    do
11 11
 	   pushd $dir 
12  
-	   git svn fetch -q 
  12
+	   git svn fetch -q || exit 1
13 13
 	   popd 
14 14
    done
15 15
 
16 16
    find . -mindepth 1 -maxdepth 2 -type d -name \*?.git| while read dir
17 17
    do
18 18
 	   pushd $dir 
19  
-	   git fetch -q 
  19
+	   git fetch -q || exit 1
20 20
 	   git --bare update-server-info
21 21
 	   popd 
22 22
    done

0 notes on commit 169f05d

Please sign in to comment.
Something went wrong with that request. Please try again.