<commit_before># Defined in /tmp/fish.6VsvPc/git-sync.fish @ line 2
function git-sync
	if count $argv >/dev/null 2>&1; [ $argv[1] = "init" ]
        mkdir -p $HOME/.local/bin
        echo -e "#!/bin/sh\nfish -c git-sync" > $HOME/.local/bin/git-sync
        chmod +x $HOME/.local/bin/git-sync
    else
        # git-sync (fish version)
        #
        # cf. https://qiita.com/masarakki/items/27f2cb456b4801ccb31b
        command git fetch --all --prune

        set -l modifieds (command git status --porcelain --untracked-files=no | string length)

        if count $modifieds >/dev/null 2>&1
            command git stash
        end

        set -l current (command git branch | string match --entire --regex '^\* ' | string split ' ')[2]

        command git checkout master
        command git pull --rebase

        for b in (command git branch --no-color --merged | string match --entire --invert --regex '^\* ' | string trim)
            command git branch -d $b
        end

        for b in (command git branch --no-color -vv | string match --entire --regex '\[[A-Za-z0-9_\/\.\-]*: gone\]' | string trim)
            command git branch -D  (string split --max 1 ' ' $b)[1]
        end

        if count $modifieds >/dev/null 2>&1
            if command git checkout $current
                command git stash pop
            else
                command git stash drop
            end
        end
    end
end<commit_msg>update: PATHの取った場所に git-sync が無ければ作成する<commit_after># Defined in /tmp/fish.H9yeDE/git-sync.fish @ line 2
function git-sync
	# setup
	if type --no-function --quiet git-sync; or true
        command mkdir -p $HOME/.local/bin
        echo -e "#!/bin/sh\nfish -c git-sync" > $HOME/.local/bin/git-sync
        command chmod +x $HOME/.local/bin/git-sync
    end

	# git-sync (fish version)
	#
	# cf. https://qiita.com/masarakki/items/27f2cb456b4801ccb31b
	command git fetch --all --prune

	set -l modifieds (command git status --porcelain --untracked-files=no | string length)

	if count $modifieds >/dev/null 2>&1
		command git stash
	end

	set -l current (command git branch | string match --entire --regex '^\* ' | string split ' ')[2]

	command git checkout master
	command git pull --rebase

	for b in (command git branch --no-color --merged | string match --entire --invert --regex '^\* ' | string trim)
		command git branch -d $b
	end

	for b in (command git branch --no-color -vv | string match --entire --regex '\[[A-Za-z0-9_\/\.\-]*: gone\]' | string trim)
		command git branch -D  (string split --max 1 ' ' $b)[1]
	end

	if count $modifieds >/dev/null 2>&1
		if command git checkout $current
			command git stash pop
		else
			command git stash drop
		end
	end
end
{'fraction_non_alphanumeric': 0.13148148148148148, 'fraction_numerical': 0.01814814814814815, 'mean_word_length': 2.0658342792281497, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '1743711', 'n_tokens_mistral': 955, 'n_tokens_neox': 889, 'n_words': 300}