<commit_before>function newstory() {

	if [[ $# -lt 4 ]]; then
		echo >&2 `print_usage`
		exit 1
	fi

	src=""
	newBranch=""

	while [ $# -gt 0 ]
	do
		case "${1}" in
			-s | --source)
				src=${2}
				shift
				;;
			-b | --branch)
				newBranch=${2}
				shift
				;;
			*) # unknown flag
				echo >&2 `print_usage`
				exit 1;;
		esac
		shift
	done

	# find source branch using $src
	srcBranch=`_gitcli_get_config "story.source.${src}"`
	if [[ -z "${srcBranch}" ]]; then
		_gitcli_error "Unable to find source branch with ${src}"
		exit 1
	fi

	# fetch most recent changes before doing anything
	git fetch --all

	# create new branch
	_gitcli_create "${newBranch}" "${srcBranch}"

	# checkout new branch
	_gitcli_process "Checking out new branch"
	_gitcli_checkout "${newBranch}"

	# push to remote
	_gitcli_process "Pushing to remote target: ${remoteTarget}"
	remoteTarget=`_gitcli_get_config "story.remotetarget"`
	if [[ -z "${remoteTarget}" ]]; then
		remoteTarget="origin"
	fi
	git push -u "${remoteTarget}" "${newBranch}"
}
<commit_msg>Fetch only needed remote<commit_after>function newstory() {

	if [[ $# -lt 2 ]]; then
		echo >&2 `print_usage`
		exit 1
	fi

	src="default"
	newBranch=""

	while [ $# -gt 0 ]
	do
		case "${1}" in
			-s | --source)
				src=${2}
				shift
				;;
			-b | --branch)
				newBranch=${2}
				shift
				;;
			*) # unknown flag
				echo >&2 `print_usage`
				exit 1;;
		esac
		shift
	done

	if [[ -z "${newBranch}" ]]; then
		_gitcli_error "Specify new branch name"
		exit 1
	fi

	# find source branch using $src
	srcBranch=`_gitcli_get_config "story.source.${src}"`
	if [[ -z "${srcBranch}" ]]; then
		_gitcli_error "Unable to find source branch with ${src}"
		exit 1
	fi

	# fetch most recent changes before doing anything
	if [[ "${srcBranch}" =~ ([-a-zA-Z0-9]+)/.* ]]; then
		remote=${BASH_REMATCH[1]}
		_gitcli_process "Fetching most recent changes from ${remote}"
		git fetch "${remote}"
	else
		_gitcli_process "Fetching most recent changes"
		git fetch
	fi

	exit 0

	# create new branch
	_gitcli_create "${newBranch}" "${srcBranch}"

	# checkout new branch
	_gitcli_process "Checking out new branch"
	_gitcli_checkout "${newBranch}"

	# push to remote
	_gitcli_process "Pushing to remote target: ${remoteTarget}"
	remoteTarget=`_gitcli_get_config "story.remotetarget"`
	if [[ -z "${remoteTarget}" ]]; then
		remoteTarget="origin"
	fi
	git push -u "${remoteTarget}" "${newBranch}"
}

{'fraction_non_alphanumeric': 0.14892739273927394, 'fraction_numerical': 0.010313531353135313, 'mean_word_length': 3.457720588235294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6289570', 'n_tokens_mistral': 975, 'n_tokens_neox': 873, 'n_words': 256}