403Webshell
Server IP : 103.119.228.120  /  Your IP : 3.145.102.18
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /usr/share/doc/git-1.8.3.1/contrib/examples/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/share/doc/git-1.8.3.1/contrib/examples/git-notes.sh
#!/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 "$ACTION" = "edit" || usage
		shift
		if test "$#" = "0"; then
			die "error: option -m needs an argument"
		else
			if [ -z "$MESSAGE" ]; then
				MESSAGE="$1"
			else
				MESSAGE="$MESSAGE

$1"
			fi
			shift
		fi
		;;
	-F)
		test "$ACTION" = "edit" || usage
		shift
		if test "$#" = "0"; then
			die "error: option -F needs an argument"
		else
			if [ -z "$MESSAGE" ]; then
				MESSAGE="$(cat "$1")"
			else
				MESSAGE="$MESSAGE

$(cat "$1")"
			fi
			shift
		fi
		;;
	-*)
		usage
		;;
	*)
		break
		;;
	esac
done

COMMIT=$(git rev-parse --verify --default HEAD "$@") ||
die "Invalid commit: $@"

case "$ACTION" in
edit)
	if [ "${GIT_NOTES_REF#refs/notes/}" = "$GIT_NOTES_REF" ]; then
		die "Refusing to edit notes in $GIT_NOTES_REF (outside of refs/notes/)"
	fi

	MSG_FILE="$GIT_DIR/new-notes-$COMMIT"
	GIT_INDEX_FILE="$MSG_FILE.idx"
	export GIT_INDEX_FILE

	trap '
		test -f "$MSG_FILE" && rm "$MSG_FILE"
		test -f "$GIT_INDEX_FILE" && rm "$GIT_INDEX_FILE"
	' 0

	CURRENT_HEAD=$(git show-ref "$GIT_NOTES_REF" | cut -f 1 -d ' ')
	if [ -z "$CURRENT_HEAD" ]; then
		PARENT=
	else
		PARENT="-p $CURRENT_HEAD"
		git read-tree "$GIT_NOTES_REF" || die "Could not read index"
	fi

	if [ -z "$MESSAGE" ]; then
		GIT_NOTES_REF= git log -1 $COMMIT | sed "s/^/#/" > "$MSG_FILE"
		if [ ! -z "$CURRENT_HEAD" ]; then
			git cat-file blob :$COMMIT >> "$MSG_FILE" 2> /dev/null
		fi
		core_editor="$(git config core.editor)"
		${GIT_EDITOR:-${core_editor:-${VISUAL:-${EDITOR:-vi}}}} "$MSG_FILE"
	else
		echo "$MESSAGE" > "$MSG_FILE"
	fi

	grep -v ^# < "$MSG_FILE" | git stripspace > "$MSG_FILE".processed
	mv "$MSG_FILE".processed "$MSG_FILE"
	if [ -s "$MSG_FILE" ]; then
		BLOB=$(git hash-object -w "$MSG_FILE") ||
			die "Could not write into object database"
		git update-index --add --cacheinfo 0644 $BLOB $COMMIT ||
			die "Could not write index"
	else
		test -z "$CURRENT_HEAD" &&
			die "Will not initialise with empty tree"
		git update-index --force-remove $COMMIT ||
			die "Could not update index"
	fi

	TREE=$(git write-tree) || die "Could not write tree"
	NEW_HEAD=$(echo Annotate $COMMIT | git commit-tree $TREE $PARENT) ||
		die "Could not annotate"
	git update-ref -m "Annotate $COMMIT" \
		"$GIT_NOTES_REF" $NEW_HEAD $CURRENT_HEAD
;;
show)
	git rev-parse -q --verify "$GIT_NOTES_REF":$COMMIT > /dev/null ||
		die "No note for commit $COMMIT."
	git show "$GIT_NOTES_REF":$COMMIT
;;
*)
	usage
esac

Youez - 2016 - github.com/yon3zu
LinuXploit