<commit_before>#!/bin/bash
#
# This script will generate markdown describing which OpenZFS have
# been applied to ZFS on Linux and which still must be ported.  The
# script must be run in a git repository with the following remotes.
#
#   zfsonlinux  https://github.com/zfsonlinux/zfs.git
#   openzfs     https://github.com/openzfs/openzfs.git
#
# Initial Setup:
#
# mkdir openzfs-tracking
# cd openzfs-tracking
# git clone -o zfsonlinux https://github.com/zfsonlinux/zfs.git
# cd zfs
# git remote add openzfs https://github.com/openzfs/openzfs.git
#
# Exceptions file format:
# ---|---|---
# <openzfs issue>|<commit>/!/-|<comment>
# , where 
# ! 		pending commit
# - 		isn't applicable to Linux
# <commit>	ZoL commit
#
ZFSONLINUX_BRANCH="zfsonlinux/master"
ZFSONLINUX_GIT="https://github.com/zfsonlinux/zfs/commit"
ZFSONLINUX_DIR="."

OPENZFS_BRANCH="openzfs/master"
OPENZFS_HASH_START="1af68be"
OPENZFS_HASH_END="HEAD"
OPENZFS_URL="https://www.illumos.org/issues"
OPENZFS_GIT="https://github.com/openzfs/openzfs/commit"

# Only consider commits which modify one of the follow paths.
OPENZFS_PATHS=" \
    usr/src/uts/common/fs/zfs/sys usr/src/uts/common/fs/zfs usr/src/cmd/zdb \
    usr/src/cmd/zfs usr/src/cmd/zhack usr/src/cmd/zinject usr/src/cmd/zpool \
    usr/src/cmd/zstreamdump usr/src/cmd/ztest usr/src/lib/libzfs \
    usr/src/lib/libzfs_core usr/src/lib/libzpool usr/src/man/man1m/zdb.1m \
    usr/src/man/man1m/zfs.1m usr/src/man/man1m/zpool.1m \
    usr/src/man/man1m/zstreamdump.1m usr/src/common/zfs \
    usr/src/test/zfs-tests usr/src/tools/scripts/cstyle.pl"

NUMBER_REGEX='^[0-9]+$'
DATE=$(date)

STATUS_APPLIED_COLOR="#80ff00"
STATUS_EXCEPTION_COLOR="#80ff00"
STATUS_MISSING_COLOR="#ff9999"
STATUS_PR_COLOR="#ffee3a"
STATUS_NONAPPLICABLE_COLOR="#DDDDDD"
STATUS_PENDING_COLOR="#ffa500"

STATUS_APPLIED="st_appl"
STATUS_EXCEPTION="st_exc"
STATUS_MISSING="st_mis"
STATUS_PR="st_pr"
STATUS_NONAPPLICABLE="st_na"
STATUS_PENDING="st_pa"

STATUS_APPLIED_TEXT="Applied"
STATUS_EXCEPTION_TEXT="Applied"<commit_msg>Expand matched files (#86)<commit_after>#!/bin/bash
#
# This script will generate markdown describing which OpenZFS have
# been applied to ZFS on Linux and which still must be ported.  The
# script must be run in a git repository with the following remotes.
#
#   zfsonlinux  https://github.com/zfsonlinux/zfs.git
#   openzfs     https://github.com/openzfs/openzfs.git
#
# Initial Setup:
#
# mkdir openzfs-tracking
# cd openzfs-tracking
# git clone -o zfsonlinux https://github.com/zfsonlinux/zfs.git
# cd zfs
# git remote add openzfs https://github.com/openzfs/openzfs.git
#
# Exceptions file format:
# ---|---|---
# <openzfs issue>|<commit>/!/-|<comment>
# , where 
# ! 		pending commit
# - 		isn't applicable to Linux
# <commit>	ZoL commit
#
ZFSONLINUX_BRANCH="zfsonlinux/master"
ZFSONLINUX_GIT="https://github.com/zfsonlinux/zfs/commit"
ZFSONLINUX_DIR="."

OPENZFS_BRANCH="openzfs/master"
OPENZFS_HASH_START="1af68be"
OPENZFS_HASH_END="HEAD"
OPENZFS_URL="https://www.illumos.org/issues"
OPENZFS_GIT="https://github.com/openzfs/openzfs/commit"

# Only consider commits which modify one of the follow paths.
OPENZFS_PATHS=" \
    usr/src/uts/common/fs/zfs/sys usr/src/uts/common/fs/zfs usr/src/cmd/zdb \
    usr/src/cmd/zfs usr/src/cmd/zhack usr/src/cmd/zinject usr/src/cmd/zpool \
    usr/src/cmd/zstreamdump usr/src/cmd/ztest usr/src/lib/libzfs \
    usr/src/lib/libzfs_core usr/src/lib/libzpool usr/src/man/man1m/zdb.1m \
    usr/src/man/man1m/zfs.1m usr/src/man/man1m/zpool.1m \
    usr/src/man/man1m/zstreamdump.1m usr/src/common/zfs \
    usr/src/test/zfs-tests usr/src/tools/scripts/cstyle.pl \
    usr/src/common/nvpair usr/src/common/avl"

NUMBER_REGEX='^[0-9]+$'
DATE=$(date)

STATUS_APPLIED_COLOR="#80ff00"
STATUS_EXCEPTION_COLOR="#80ff00"
STATUS_MISSING_COLOR="#ff9999"
STATUS_PR_COLOR="#ffee3a"
STATUS_NONAPPLICABLE_COLOR="#DDDDDD"
STATUS_PENDING_COLOR="#ffa500"

STATUS_APPLIED="st_appl"
STATUS_EXCEPTION="st_exc"
STATUS_MISSING="st_mis"
STATUS_PR="st_pr"
STATUS_NONAPPLICABLE="st_na"
STATUS_PENDING="st_pa"

STATUS_APPLIED_TEXT="Applied"
STATUS_EXCEPTION_TEXT="Applied"
{'fraction_non_alphanumeric': 0.14250972762645914, 'fraction_numerical': 0.014591439688715954, 'mean_word_length': 4.634246575342465, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 14, 'lorem ipsum': 0, 'www.': 2, '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': '2199921', 'n_tokens_mistral': 1782, 'n_tokens_neox': 1692, 'n_words': 256}