code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/usr/bin/env bash # Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. # For licensing, see LICENSE.html or http://ckeditor.com/license # Use this file to quickly run the sample under Linux. adl application.xml ../../
Shell
#!/bin/sh # Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Shell
#!/bin/sh # Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Shell
#!/bin/bash # download all wiki pages to the `doc` directory. need network access. # multiple1902 <multiple1902@gmail.com> # Licensed under GPL v3 echo "cleaning destination ..." rm ../doc/*.html 2>/dev/null echo "fetching the list ..." for pagename in `curl "http://code.google.com/p/xjtuthesis/w/list" 2>/dev/null|gr...
Shell
#!/bin/sh # make a release zip archive # multiple1902 <multiple1902@gmail.com> # Licensed under GPL v3 # Derivation of mk-chrome-app.sh from Hotot. Thanks! DESTROOT=release/ RELEASE=xjtuthesis echo "Checking Version ..." VER=$(sed -n -e 's/\\def\\meta@version{\([0-9.]*\)}/\1/p' base/xjtuthesis.cls) DEST=$RELEASE-$V...
Shell
#!/bin/sh # Detects OS we're compiling on and generates build_config.mk, # which in turn gets read while processing Makefile. # build_config.mk will set the following variables: # - PORT_CFLAGS will either set: # -DLEVELDB_PLATFORM_POSIX if cstatomic is present # -DLEVELDB_PLATFORM_NOATOMI...
Shell
#!/bin/bash # Android Screenshot Library # ############################## # Startup script # echo "Android Screenshot Library -- initializing..." # if [ -z $ANDROID ]; then echo "*** Android SDK not found ***" echo "Make sure the ANDROID variable is pointing to Android SDK root directory" else adb="$AN...
Shell
ant clean; ant release; adb install -r bin/MetaTracker-release.apk
Shell
#!/bin/sh freq=(392 392 440 392 523 494 392 392 440 392 587 523 392 392 784 659 523 494 440 698 698 659 523 587 523) delay=(375 125 500 500 500 1000 375 125 500 500 500 1000 375 125 500 500 500 500 1000 375 125 500 500 500 1000) i=0 len=${#freq[*]} while [ $i -lt $len ] do beep -f ${freq[$i]} -l ${delay[$i]} let ++...
Shell
#!/bin/sh # Stand-alone release builder for Linux # Go to root directory of the git repository ROOT_PATH=$(git rev-parse --show-cdup) if [ $ROOT_PATH ]; then cd $ROOT_PATH fi # Get project name from directory PROJECT_NAME=$(basename $(pwd)) # Extract version number from latest tag (v0.1 => 0.1) VERSION=$(git descri...
Shell
#!/bin/sh # Launcher in case dependencies are not avaible on the user system # If dependencies are already installed, no need to use this script RES_DIR=./resources LIBS_DIR=./lib BIN=./cosmoscroll LD_LIBRARY_PATH="$LIBS_DIR":"$LD_LIBRARY_PATH" "$BIN" -d "$RES_DIR"
Shell
#!/bin/bash # # Copyright (C) 2007 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
Shell
#!/bin/bash # # Copyright (C) 2007 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
Shell
#!/usr/bin/env sh ./gradlew build fatJar proguard
Shell
#!/bin/bash # podencoder - the flexible video encoder for iPods and other devices # Copyright (C) 2006-7, Mark Pilgrim # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the ...
Shell
#!/bin/bash tempdir=`dirname $1` nice mencoder -ofps 25 -of lavf -lavfopts format=mp4 \ -af lavcresample=44100 \ -alang de \ -vf-add harddup \ -vf-add scale=320:-10 \ -vf-add crop=720:480:0:0 \ -oac lavc -ovc lavc \ -lavcopts aglobal=1:vglobal=1:acodec=aac:abitrate=128:vcodec=mpeg4:vbitrate=576:keyint=25 ...
Shell
#!/bin/bash # podencoder - the flexible video encoder for iPods and other devices # Copyright (C) 2006-7, Mark Pilgrim # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the ...
Shell
#!/bin/bash tempdir=`dirname $1` nice mencoder -ofps 25 -of lavf -lavfopts format=mp4 \ -af lavcresample=44100 \ -alang de \ -vf-add harddup \ -vf-add scale=320:-10 \ -vf-add crop=720:480:0:0 \ -oac lavc -ovc lavc \ -lavcopts aglobal=1:vglobal=1:acodec=aac:abitrate=128:vcodec=mpeg4:vbitrate=576:keyint=25 ...
Shell
#!/bin/bash echo "@ <ipodcast></ipodcast>" >> "$1/info.vdr"
Shell
#!/bin/bash echo "@ <ipodcast></ipodcast>" >> "$1/info.vdr"
Shell
#!/bin/sh USAGE='[help|start|bad|good|skip|next|reset|visualize|replay|log|run]' LONG_USAGE='git bisect help print this long help message. git bisect start [--no-checkout] [<bad> [<good>...]] [--] [<pathspec>...] reset bisect state and start bisection. git bisect bad [<rev>] mark <rev> a known-bad revision. git bis...
Shell
#!/bin/sh # # This program resolves merge conflicts in git # # Copyright (c) 2006 Theodore Y. Ts'o # # This file is licensed under the GPL v2, or a later version # at the discretion of Junio C Hamano. # USAGE='[--tool=tool] [--tool-help] [-y|--no-prompt|--prompt] [file to merge] ...' SUBDIRECTORY_OK=Yes OPTIONS_SPEC= ...
Shell
#!/bin/sh # # Copyright (c) 2010 Ævar Arnfjörð Bjarmason # # This is Git's interface to gettext.sh. See po/README for usage # instructions. # Export the TEXTDOMAIN* data that we need for Git TEXTDOMAIN=git export TEXTDOMAIN if test -z "$GIT_TEXTDOMAINDIR" then TEXTDOMAINDIR="@@LOCALEDIR@@" else TEXTDOMAINDIR="$GIT_T...
Shell
#!/bin/sh # # Copyright (c) 2005 Linus Torvalds # OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git repack [options] -- a pack everything in a single pack A same as -a, and turn unreachable objects loose d remove redundant packs, and run git-prune-packed f pass --no-reus...
Shell
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano. # SUBDIRECTORY_OK=Yes OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>] git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>] git-rebase --continue | --abort | --skip | --edi...
Shell
#!/bin/sh USAGE='' SUBDIRECTORY_OK='Yes' OPTIONS_SPEC= . git-sh-setup echo "WARNING: '$0' is deprecated in favor of 'git fsck --lost-found'" >&2 if [ "$#" != "0" ] then usage fi laf="$GIT_DIR/lost-found" rm -fr "$laf" && mkdir -p "$laf/commit" "$laf/other" || exit git fsck --full --no-reflogs | while read dang...
Shell
#!/bin/sh # # Copyright (c) Linus Torvalds, 2005 # # This is the git per-file merge script, called with # # $1 - original file SHA1 (or empty) # $2 - file in branch1 SHA1 (or empty) # $3 - file in branch2 SHA1 (or empty) # $4 - pathname in repository # $5 - original file mode (or empty) # $6 - file in branc...
Shell
#!/bin/sh # # This is included in commands that either have to be run from the toplevel # of the repository, or with GIT_DIR environment variable properly. # If the GIT_DIR does not look like the right correct git-repository, # it dies. # Having this variable in your environment would break scripts because # you would...
Shell
#!/bin/sh echo >&2 "fatal: git was built without support for `basename $0` (@@REASON@@)." exit 128
Shell
#!/bin/sh # # Rewrite revision history # Copyright (c) Petr Baudis, 2006 # Minimal changes to "port" it to core-git (c) Johannes Schindelin, 2007 # # Lets you rewrite the revision history of the current branch, creating # a new branch. You can specify a number of filters to modify the commits, # files and trees. # The...
Shell
#!/bin/sh # # Copyright (c) 2005 Linus Torvalds # Copyright (c) 2005 Junio C Hamano # # Resolve two trees, using enhanced multi-base read-tree. # The first parameters up to -- are merge bases; the rest are heads. bases= head= remotes= sep_seen= for arg do case ",$sep_seen,$head,$arg," in *,--,) sep_seen=yes ;; ...
Shell
#!/bin/sh { cat <<\EOF sayIt: $(foreach b,$(BUILT_INS),echo XXX $b YYY;) EOF cat Makefile } | make -f - sayIt 2>/dev/null | sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p' | sort | { bad=0 while read builtin do base=`expr "$builtin" : 'git-\(.*\)'` x=`sed -ne 's/.*{ "'$base'", \(cmd_[^, ]*\).*/'$base' \1/p' git...
Shell
#!/bin/sh # Copyright (c) 2007, Nanako Shiraishi dashless=$(basename "$0" | sed -e 's/-/ /') USAGE="list [<options>] or: $dashless show [<stash>] or: $dashless drop [-q|--quiet] [<stash>] or: $dashless ( pop | apply ) [--index] [-q|--quiet] [<stash>] or: $dashless branch <branchname> [<stash>] or: $dash...
Shell
#!/bin/sh T="$1" for h in \ *.txt *.html \ howto/*.txt howto/*.html \ technical/*.txt technical/*.html \ RelNotes/*.txt *.css do if test ! -f "$h" then : did not match elif test -f "$T/$h" && $DIFF -u -I'^Last updated ' "$T/$h" "$h" then :; # up to date else echo >&2 "# install $h $T/$h" rm -f "$T/...
Shell
#!/bin/sh # This requires git-manpages and/or git-htmldocs repositories repository=${1?repository} destdir=${2?destination} head=master GIT_DIR= for d in "$repository/.git" "$repository" do if GIT_DIR="$d" git rev-parse refs/heads/master >/dev/null 2>&1 then GIT_DIR="$d" export GIT_DIR break fi done if test...
Shell
#!/bin/sh ( c=//////////////////////////////////////////////////////////////// skel=api-index-skel.txt sed -e '/^\/\/ table of contents begin/q' "$skel" echo "$c" ls api-*.txt | while read filename do case "$filename" in api-index-skel.txt | api-index.txt) continue ;; esac title=$(sed -e 1q "$filename"...
Shell
#!/bin/sh cat <<\EOF Git Howto Index =============== Here is a collection of mailing list postings made by various people describing how they use Git in their workflow. EOF for txt do title=`expr "$txt" : '.*/\(.*\)\.txt$'` from=`sed -ne ' /^$/q /^From:[ ]/{ s/// s/^[ ]*// s/[ ]*$// s/^/by / p } ...
Shell
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano # # Resolve two or more trees. # LF=' ' die () { echo >&2 "$*" exit 1 } # The first parameters up to -- are merge bases; the rest are heads. bases= head= remotes= sep_seen= for arg do case ",$sep_seen,$head,$arg," in *,--,) sep_seen=yes ;; ,yes,,*) hea...
Shell
#!/bin/sh dd if=/dev/zero bs=1048576 count=100 2>/dev/null | /usr/bin/time ./test-sha1 >/dev/null while read expect cnt pfx do case "$expect" in '#'*) continue ;; esac actual=` { test -z "$pfx" || echo "$pfx" dd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null | perl -pe 'y/\000/g/' } | ./test-sha1 $cnt ...
Shell
#!/bin/sh # # Copyright (c) 2005, 2006 Junio C Hamano SUBDIRECTORY_OK=Yes OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git am [options] [(<mbox>|<Maildir>)...] git am [options] (--resolved | --skip | --abort) -- i,interactive run interactively b,binary* (historical option -- no-op) 3,3way allow fall back on ...
Shell
#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of t...
Shell
#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $...
Shell
#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commi...
Shell
#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info
Shell
#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # t...
Shell
#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup test -x...
Shell
#!/bin/sh # # An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". # # Config # ------ # hooks.allowunannotated # This boolean sets whether unannotated tags will be allowed into ...
Shell
#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --ver...
Shell
#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename ...
Shell
#!/bin/sh # Copyright 2005, Ryan Anderson <ryan@michonline.com> # # This file is licensed under the GPL v2, or a later version # at the discretion of Linus Torvalds. USAGE='<start> <url> [<end>]' LONG_USAGE='Summarizes the changes between two commits to the standard output, and includes the given URL in the generated ...
Shell
#!/bin/sh # # Copyright (c) 2010 Junio C Hamano. # prec=4 read_state () { onto_name=$(cat "$state_dir"/onto_name) && end=$(cat "$state_dir"/end) && msgnum=$(cat "$state_dir"/msgnum) } continue_merge () { test -d "$state_dir" || die "$state_dir directory does not exist" unmerged=$(git ls-files -u) if test -n "...
Shell
#!/usr/bin/env bash # Copyright (c) 2012 Felipe Contreras alias=$1 url=$2 dir="$GIT_DIR/testgit/$alias" prefix="refs/testgit/$alias" default_refspec="refs/heads/*:${prefix}/heads/*" refspec="${GIT_REMOTE_TESTGIT_REFSPEC-$default_refspec}" test -z "$refspec" && prefix="refs" export GIT_DIR="$url/.git" mkdir -p "$...
Shell
#!/bin/sh GVF=GIT-VERSION-FILE DEF_VER=v1.8.3-rc3 LF=' ' # First see if there is a version file (included in release tarballs), # then try git-describe, then default. if test -f version then VN=$(cat version) || VN="$DEF_VER" elif test -d .git -o -f .git && VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/de...
Shell
#!/bin/sh # git-ls-remote could be called from outside a git managed repository; # this would fail in that case and would issue an error message. GIT_DIR=$(git rev-parse -q --git-dir) || :; get_default_remote () { curr_branch=$(git symbolic-ref -q HEAD) curr_branch="${curr_branch#refs/heads/}" origin=$(git config ...
Shell
#compdef git gitk # zsh completion wrapper for git # # Copyright (c) 2012-2013 Felipe Contreras <felipe.contreras@gmail.com> # # You need git's bash completion script installed somewhere, by default on the # same directory as this script. # # If your script is on ~/.git-completion.sh instead, you can configure it on #...
Shell
#!bash # # bash/zsh completion support for core Git. # # Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). # Distributed under the GNU General Public License, version 2.0. # # The contained completion routines provide support for completi...
Shell
# bash/zsh git prompt support # # Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> # Distributed under the GNU General Public License, version 2.0. # # This script allows you to see the current branch in your prompt. # # To enable: # # 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh). # 2) Add ...
Shell
#!/bin/sh print_if_bare_repo=' if "$(git --git-dir="$1" rev-parse --is-bare-repository)" = true then printf "%s\n" "${1#./}" fi ' find -type d -name "*.git" -exec sh -c "$print_if_bare_repo" -- \{} \; -prune 2>/dev/null
Shell
#!/bin/sh if tty -s then echo "Run 'help' for help, or 'exit' to leave. Available commands:" else echo "Run 'help' for help. Available commands:" fi cd "$(dirname "$0")" for cmd in * do case "$cmd" in help) ;; *) [ -f "$cmd" ] && [ -x "$cmd" ] && echo "$cmd" ;; esac done
Shell
#!/bin/sh # # Performs an initial import of a directory. This is the equivalent # of doing 'git init; git add .; git commit'. It's a lot slower, # but is meant to be a simple fast-import example. if [ -z "$1" -o -z "$2" ]; then echo "usage: git-import branch import-message" exit 1 fi USERNAME="$(git config user.nam...
Shell
#!/bin/sh # This script displays the distribution of longest common hash prefixes. # This can be used to determine the minimum prefix length to use # for object names to be unique. git rev-list --objects --all | sort | perl -lne ' substr($_, 40) = ""; # uncomment next line for a distribution of bits instead of he...
Shell
#!/bin/sh usage() { cat <<\EOF usage: git jump <mode> [<args>] Jump to interesting elements in an editor. The <mode> parameter is one of: diff: elements are diff hunks. Arguments are given to diff. merge: elements are merge conflicts. Arguments are ignored. grep: elements are grep hits. Arguments are given to gre...
Shell
#!/bin/sh # Copyright (c) 2008, Nanako Shiraishi # Prime rerere database from existing merge commits me=rerere-train USAGE="$me rev-list-args" SUBDIRECTORY_OK=Yes OPTIONS_SPEC= . $(git --exec-path)/git-sh-setup require_work_tree cd_to_toplevel # Remember original branch branch=$(git symbolic-ref -q HEAD) || original...
Shell
#!/bin/sh # This script installs or deletes a MediaWiki on your computer. # It requires a web server with PHP and SQLite running. In addition, if you # do not have MediaWiki sources on your computer, the option 'install' # downloads them for you. # Please set the CONFIGURATION VARIABLES in ./test-gitmw-lib.sh WIKI_TE...
Shell
#!/bin/sh test_description='Test the Git Mediawiki remote helper: git pull by revision' . ./test-gitmw-lib.sh . ./push-pull-tests.sh . $TEST_DIRECTORY/test-lib.sh test_check_precond test_expect_success 'configuration' ' git config --global mediawiki.fetchStrategy by_rev ' test_push_pull test_done
Shell
#!/bin/sh # # Copyright (C) 2012 # Charles Roussel <charles.roussel@ensimag.imag.fr> # Simon Cathebras <simon.cathebras@ensimag.imag.fr> # Julien Khayat <julien.khayat@ensimag.imag.fr> # Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr> # Simon Perrat <simon.perrat@ensimag.imag.fr> # # License: GPL ...
Shell
#!/bin/sh # # Copyright (C) 2012 # Charles Roussel <charles.roussel@ensimag.imag.fr> # Simon Cathebras <simon.cathebras@ensimag.imag.fr> # Julien Khayat <julien.khayat@ensimag.imag.fr> # Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr> # Simon Perrat <simon.perrat@ensimag.imag.fr> # # License: GPL ...
Shell
#!/bin/sh # # Copyright (C) 2012 # Charles Roussel <charles.roussel@ensimag.imag.fr> # Simon Cathebras <simon.cathebras@ensimag.imag.fr> # Julien Khayat <julien.khayat@ensimag.imag.fr> # Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr> # Simon Perrat <simon.perrat@ensimag.imag.fr> # # License: GPL ...
Shell
#!/bin/sh # # Copyright (C) 2012 # Charles Roussel <charles.roussel@ensimag.imag.fr> # Simon Cathebras <simon.cathebras@ensimag.imag.fr> # Julien Khayat <julien.khayat@ensimag.imag.fr> # Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr> # Simon Perrat <simon.perrat@ensimag.imag.fr> # # License: GPL ...
Shell
# Copyright (C) 2012 # Charles Roussel <charles.roussel@ensimag.imag.fr> # Simon Cathebras <simon.cathebras@ensimag.imag.fr> # Julien Khayat <julien.khayat@ensimag.imag.fr> # Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr> # Simon Perrat <simon.perrat@ensimag.imag.fr> # License: GPL v2 or later #...
Shell
test_push_pull () { test_expect_success 'Git pull works after adding a new wiki page' ' wiki_reset && git clone mediawiki::'"$WIKI_URL"' mw_dir_1 && wiki_editpage Foo "page created after the git clone" false && ( cd mw_dir_1 && git pull ) && wiki_getallpage ref_page_1 && test_diff_directories m...
Shell
#!/bin/sh # # Copyright (c) 2012 Felipe Contreras # # Base commands from hg-git tests: # https://bitbucket.org/durin42/hg-git/src # test_description='Test bidirectionality of remote-hg' . ./test-lib.sh if ! test_have_prereq PYTHON; then skip_all='skipping remote-hg tests; python not available' test_done fi if ! "...
Shell
#!/bin/sh # # Copyright (c) 2012 Felipe Contreras # # Base commands from hg-git tests: # https://bitbucket.org/durin42/hg-git/src # test_description='Test remote-hg output compared to hg-git' . ./test-lib.sh if ! test_have_prereq PYTHON; then skip_all='skipping remote-hg tests; python not available' test_done fi ...
Shell
#!/bin/sh # # Copyright (c) 2012 Felipe Contreras # test_description='Test remote-bzr' . ./test-lib.sh if ! test_have_prereq PYTHON; then skip_all='skipping remote-bzr tests; python not available' test_done fi if ! "$PYTHON_PATH" -c 'import bzrlib'; then skip_all='skipping remote-bzr tests; bzr not available' t...
Shell
#!/bin/sh # # Copyright (c) 2012 Felipe Contreras # # Base commands from hg-git tests: # https://bitbucket.org/durin42/hg-git/src # test_description='Test remote-hg' . ./test-lib.sh if ! test_have_prereq PYTHON; then skip_all='skipping remote-hg tests; python not available' test_done fi if ! "$PYTHON_PATH" -c 'im...
Shell
#!/bin/sh # Use this tool to rewrite your .git/remotes/ files into the config. . git-sh-setup if [ -d "$GIT_DIR"/remotes ]; then echo "Rewriting $GIT_DIR/remotes" >&2 error=0 # rewrite into config { cd "$GIT_DIR"/remotes ls | while read f; do name=$(printf "$f" | tr -c "A-Za-z0-9-" ".") sed -n \ -e ...
Shell
#!/bin/sh OPTIONS_KEEPDASHDASH=t OPTIONS_SPEC="\ git-checkout [options] [<branch>] [<paths>...] -- b= create a new branch started at <branch> l create the new branch's reflog track arrange that the new branch tracks the remote branch f proceed even if the index or working tree is not...
Shell
#!/bin/sh USAGE="(edit [-F <file> | -m <msg>] | show) [commit]" . git-sh-setup test -z "$1" && usage ACTION="$1"; shift test -z "$GIT_NOTES_REF" && GIT_NOTES_REF="$(git config core.notesref)" test -z "$GIT_NOTES_REF" && GIT_NOTES_REF="refs/notes/commits" MESSAGE= while test $# != 0 do case "$1" in -m) test "$AC...
Shell
#!/bin/sh # Copyright (c) 2005 Linus Torvalds USAGE='[-n [<num>]] -l [<pattern>] | [-a | -s | -u <key-id>] [-f | -d | -v] [-m <msg>] <tagname> [<head>]' SUBDIRECTORY_OK='Yes' . git-sh-setup message_given= annotate= signed= force= message= username= list= verify= LINES=0 while test $# != 0 do case "$1" in -a) ...
Shell
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano # # Pretend we resolved the heads, but declare our tree trumps everybody else. # # We need to exit with 2 if the index does not match our HEAD tree, # because the current index is what we will be committing as the # merge result. git diff-index --quiet --cached HEAD -- ...
Shell
#!/bin/sh # # Copyright (c) 2005 Linus Torvalds # Copyright (c) 2006 Junio C Hamano USAGE='[-a | --interactive] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit> | --amend] [-u] [-e] [--author <author>] [--template <file>] [[-i | -o] <path>...]' SUBDIRECTORY_OK=Yes OPTIONS_SPEC= . git-sh-setup re...
Shell
#!/bin/sh # # Copyright (c) 2005-2006 Pavel Roskin # OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git-clean [options] <paths>... Clean untracked files from the working directory When optional <paths>... arguments are given, the paths affected are further limited to those that match them. -- d remove directories as well f o...
Shell
#!/bin/sh # # Copyright (c) 2006, Shawn O. Pearce # # Cleanup unreachable files and optimize the repository. USAGE='[--prune]' SUBDIRECTORY_OK=Yes . git-sh-setup no_prune=: while test $# != 0 do case "$1" in --prune) no_prune= ;; --) usage ;; esac shift done case "$(git config --get gc.packrefs)" in not...
Shell
#!/bin/sh USAGE='<tag>' SUBDIRECTORY_OK='Yes' . git-sh-setup verbose= while test $# != 0 do case "$1" in -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose) verbose=t ;; *) break ;; esac shift done if [ "$#" != "1" ] then usage fi type="$(git cat-file -t "$1" 2>/dev/null)" || die "$1: no such object." ...
Shell
#!/bin/sh # # Copyright (c) 2005 Linus Torvalds # Copyright (c) 2005 Junio C Hamano # case "$0" in *-revert* ) test -t 0 && edit=-e replay= me=revert USAGE='[--edit | --no-edit] [-n] <commit-ish>' ;; *-cherry-pick* ) replay=t edit= me=cherry-pick USAGE='[--edit] [-n] [-r] [-x] <commit-ish>' ;; * ) echo >&2 "...
Shell
#!/bin/sh # USAGE='<fetch-options> <repository> <refspec>...' SUBDIRECTORY_OK=Yes . git-sh-setup set_reflog_action "fetch $*" cd_to_toplevel ;# probably unnecessary... . git-parse-remote _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40" LF=' ' IFS="$LF" no_tags= tags= a...
Shell
#!/bin/sh # usage () { echo >&2 "usage: $0 [--heads] [--tags] [-u|--upload-pack <upload-pack>]" echo >&2 " <repository> <refs>..." exit 1; } die () { echo >&2 "$*" exit 1 } exec= while test $# != 0 do case "$1" in -h|--h|--he|--hea|--head|--heads) heads=heads; shift ;; -t|--t|--t...
Shell
#!/bin/sh # # Copyright (c) 2005 Linus Torvalds # # Resolve two trees. # echo 'WARNING: This command is DEPRECATED and will be removed very soon.' >&2 echo 'WARNING: Please use git-merge or git-pull instead.' >&2 sleep 2 USAGE='<head> <remote> <merge-message>' . git-sh-setup dropheads() { rm -f -- "$GIT_DIR/MERGE_H...
Shell
#!/bin/sh # # Copyright (c) 2005, Linus Torvalds # Copyright (c) 2005, Junio C Hamano # # Clone a repository into a different directory that does not yet exist. # See git-sh-setup why. unset CDPATH OPTIONS_SPEC="\ git-clone [options] [--] <repo> [<dir>] -- n,no-checkout don't create a checkout bare ...
Shell
#!/bin/sh # # Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano # USAGE='[--mixed | --soft | --hard] [<commit-ish>] [ [--] <paths>...]' SUBDIRECTORY_OK=Yes . git-sh-setup set_reflog_action "reset $*" require_work_tree update= reset_type=--mixed unset rev while test $# != 0 do case "$1" in --mixed | --soft...
Shell
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano # OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git merge [options] <remote>... git merge [options] <msg> HEAD <remote> -- stat show a diffstat at the end of the merge n don't show a diffstat at the end of the merge summary (synony...
Shell
#!/bin/sh usage () { echo "usage:" $@ exit 127 } die () { echo $@ exit 128 } if test $# -lt 2 || test $# -gt 3 then usage "$0 <repository> <new_workdir> [<branch>]" 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...
Shell
#!/bin/bash # # git-subtree.sh: split/join git repositories in subdirectories of this one # # Copyright (C) 2009 Avery Pennarun <apenwarr@gmail.com> # if [ $# -eq 0 ]; then set -- -h fi OPTS_SPEC="\ git subtree add --prefix=<prefix> <commit> git subtree add --prefix=<prefix> <repository> <commit> git subtree me...
Shell
#!/bin/sh # # Copyright (c) 2012 Avery Pennaraum # test_description='Basic porcelain support for subtrees This test verifies the basic operation of the merge, pull, add and split subcommands of git subtree. ' export TEST_DIRECTORY=$(pwd)/../../../t . ../../../t/test-lib.sh create() { echo "$1" >"$1" git add "$1" ...
Shell
#!/bin/sh # # An example hook script to verify if you are on battery, in case you # are running Linux or OS X. Called by git-gc --auto with no arguments. # The hook should exit with non-zero status after issuing an appropriate # message if it wants to stop the auto repacking. # # This hook is stored in the contrib/hook...
Shell
#!/bin/sh # # Copyright (c) 2007 Andy Parkins # # An example hook script to mail out commit update information. This hook # sends emails listing new revisions to the repository introduced by the # change being reported. The rule is that (for branch updates) each commit # will appear on one email and one email only. #...
Shell
#!/bin/sh # Copyright 2010 - 2012, Tim Henigan <tim.henigan@gmail.com> # # Perform a directory diff between commits in the repository using # the external diff or merge tool specified in the user's config. USAGE='[--cached] [--copy-back] [-x|--extcmd=<command>] <commit>{0,2} [-- <path>*] --cached Compare to t...
Shell
#!/bin/sh # Copyright 2008 Lukas Sandström <luksan@gmail.com> # # AppendPatch - A script to be used together with ExternalEditor # for Mozilla Thunderbird to properly include patches inline in e-mails. # ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2 CONFFILE=~/.appprc SEP="-=-=-=-=-=-...
Shell
#!/bin/sh # Distributed under the terms of the GNU General Public License v2 # Copyright (c) 2006 Fernando J. Pereda <ferdy@gentoo.org> # Copyright (c) 2008 Natanael Copa <natanael.copa@gmail.com> # Copyright (c) 2010 Eric S. Raymond <esr@thyrsus.com> # Assistance and review by Petr Baudis, author of ciabot.pl, # is gr...
Shell
#!/bin/sh USAGE="[-a] [-r] [-m] [-t] [-n] [-b <newname>] <name>" LONG_USAGE="git-resurrect attempts to find traces of a branch tip called <name>, and tries to resurrect it. Currently, the reflog is searched for checkout messages, and with -r also merge messages. With -m and -t, the history of all refs is scanned for...
Shell