#!/bin/sh usage () { echo "usage:" $@ exit 127 } die () { echo $@ exit 128 } if test $# -lt 2 || test $# -gt 3 then usage "$0 []" fi orig_git=$1 new_workdir=$2 branch=$3 # want to make sure that what is pointed to has a .git directory ... git_dir=$(cd "$orig_git" 2>/dev/null && git rev-parse --git-dir 2>/dev/null) || die "Not a git repository: \"$orig_git\"" case "$git_dir" in .git) git_dir="$orig_git/.git" ;; .) git_dir=$orig_git ;; esac # don't link to a configured bare repository isbare=$(git --git-dir="$git_dir" config --bool --get core.bare) if test ztrue = z$isbare then die "\"$git_dir\" has core.bare set to true," \ " remove from \"$git_dir/config\" to use $0" fi # don't link to a workdir if test -L "$git_dir/config" then die "\"$orig_git\" is a working directory only, please specify" \ "a complete repository." fi # don't recreate a workdir over an existing repository if test -e "$new_workdir" then die "destination directory '$new_workdir' already exists." fi # make sure the links use full paths git_dir=$(cd "$git_dir"; pwd) # create the workdir mkdir -p "$new_workdir/.git" || die "unable to create \"$new_workdir\"!" # create the links to the original repo. explicitly exclude index, HEAD and # logs/HEAD from the list since they are purely related to the current working # directory, and should not be shared. for x in config refs logs/refs objects info hooks packed-refs remotes rr-cache svn do case $x in */*) mkdir -p "$(dirname "$new_workdir/.git/$x")" ;; esac ln -s "$git_dir/$x" "$new_workdir/.git/$x" done # now setup the workdir cd "$new_workdir" # copy the HEAD from the original repository as a default branch cp "$git_dir/HEAD" .git/HEAD # checkout the branch (either the same as HEAD from the original repository, or # the one that was asked for) git checkout -f $branch if test -n "$branch" then git merge --ff-only '@{upstream}' fi ption> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/rsc
AgeCommit message (Expand)Author
2015-03-02V805: Decreased performanceCaolán McNamara
2015-03-02remove executable bit from c / h / cxx / hxx / l filesMichael Stahl
2015-03-01wrong length value for string lengthMarkus Mohrhard
2015-02-23remove unnecessary parenthesis in return statementsNoel Grandin
2015-02-09Werror: data lost during conversion from size_t to intDavid Ostrovsky
2015-01-26coverity#1266502 Useless callCaolán McNamara
2015-01-26followup code removal after changing virtual methods to non-virtualNoel Grandin
2015-01-26new loplugin: change virtual methods to non-virtualNoel Grandin
2015-01-20Some more loplugin:cstylecast: rscStephan Bergmann
2015-01-08brute-force find-and-remove of unused #define constants.Noel Grandin
2015-01-07fdo#84938: convert STREAM_ #defines to 'enum class'Noel Grandin
2015-01-06fdo#84938: replace BUTTONTYPE_ constants with 'enum class'Noel Grandin
2015-01-02boost::unordered_map->std::unordered_mapCaolán McNamara
2015-01-02Remove unnecessary comphelper::string::getTokenStephan Bergmann
2014-12-31various other apparently unnecessary rsc stuffCaolán McNamara
2014-12-31drop dateformatter resource loadingCaolán McNamara
2014-12-31drop timeformatter resource loadingCaolán McNamara
2014-12-31TimeFields not loaded from resource files anymoreCaolán McNamara
2014-12-28splitters no longer loaded from resource filesCaolán McNamara
2014-12-22HelpButtons no longer loaded from .rsc filesCaolán McNamara
2014-12-19fdo#39440 rsc: reduce scope of local variablesMichael Weghorn
2014-11-21document coverity#983096 Resource leakCaolán McNamara
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava
2014-11-05fdo#84938: replace TOOLBOXITEM_ constants with enumNoel Grandin
2014-11-03coverity#982297 EBCDIC-related cleanupCaolán McNamara
2014-11-01fdo#84938: replace MIB_ constants with enumNoel Grandin
2014-10-28sal_Int16 as the underlying type of WindowBorderStyleTakeshi Abe
2014-10-28fdo#84938: replace TIMEF_ constants with enumNoel Grandin
2014-10-27fdo#84938: replace KEYTYPE_ constants with enumNoel Grandin
2014-10-23fdo#84938: replace MENUITEM constants with enumNoel Grandin