~ubuntu-branches/ubuntu/hardy/git-core/hardy-updates

« back to all changes in this revision

Viewing changes to git-filter-branch.sh

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2007-11-01 08:35:46 UTC
  • mfrom: (1.1.24)
  • Revision ID: package-import@ubuntu.com-20071101083546-w9tywil7o688gow7
Tags: 1:1.5.3.5-1
* new upstream point release.
  * git-config: handle --file option with relative pathname properly;
    git-config: print error message if the config file cannot be read;
    git-config: don't silently ignore options after --list (closes:
    #445208).

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
 
95
95
. git-sh-setup
96
96
 
 
97
git diff-files --quiet &&
 
98
        git diff-index --cached --quiet HEAD ||
 
99
        die "Cannot rewrite branch(es) with a dirty working directory."
 
100
 
97
101
tempdir=.git-rewrite
98
102
filter_env=
99
103
filter_tree=
196
200
        esac
197
201
done < "$tempdir"/backup-refs
198
202
 
 
203
ORIG_GIT_DIR="$GIT_DIR"
 
204
ORIG_GIT_WORK_TREE="$GIT_WORK_TREE"
 
205
ORIG_GIT_INDEX_FILE="$GIT_INDEX_FILE"
199
206
export GIT_DIR GIT_WORK_TREE=.
200
207
 
201
208
# These refs should be updated if their heads were rewritten
413
420
test $count -gt 0 && echo "These refs were rewritten:"
414
421
git show-ref | grep ^"$orig_namespace"
415
422
 
 
423
unset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE
 
424
test -z "$ORIG_GIT_DIR" || GIT_DIR="$ORIG_GIT_DIR" && export GIT_DIR
 
425
test -z "$ORIG_GIT_WORK_TREE" || GIT_WORK_TREE="$ORIG_GIT_WORK_TREE" &&
 
426
        export GIT_WORK_TREE
 
427
test -z "$ORIG_GIT_INDEX_FILE" || GIT_INDEX_FILE="$ORIG_GIT_INDEX_FILE" &&
 
428
        export GIT_INDEX_FILE
 
429
git read-tree -u -m HEAD
 
430
 
416
431
exit $ret