<commit_before>Contents
========
This directory contains tools for developers working on this repository.

clang-format.py
===============

A script to format cpp source code according to [.clang-format](../../src/.clang-format). This should only be applied to new files or files which are currently not actively developed on. Also, git subtrees are not subject to formatting.

fix-copyright-headers.py
========================

Every year newly updated files need to have its copyright headers updated to reflect the current year.
If you run this script from the root folder it will automatically update the year on the copyright header for all
source files if these have a git commit from the current year.

For example a file changed in 2015 (with 2015 being the current year):

```// Copyright (c) 2009-2013 The Bitcoin Core developers```

would be changed to:

```// Copyright (c) 2009-2015 The Bitcoin Core developers```

git-subtree-check.sh
====================

Run this script from the root of the repository to verify that a subtree matches the contents of
the commit it claims to have been updated to.

To use, make sure that you have fetched the upstream repository branch in which the subtree is
maintained:
* for `src/secp256k1`: https://github.com/bitcoin/secp256k1.git (branch master)
* for `src/leveldb`: https://github.com/bitcoin/leveldb.git (branch bitcoin-fork)
* for `src/univalue`: https://github.com/bitcoin/univalue.git (branch master)

Usage: `git-subtree-check.sh DIR COMMIT`

`COMMIT` may be omitted, in which case `HEAD` is used.

github-merge.sh
===============

A small script to automate merging pull-requests securely and sign them with GPG.

For example:

  ./github-merge.sh bitcoin/bitcoin 3077

(in any git repository) will help you merge pull request #3077 for the
bitcoin/bitcoin repository.

What it does:<commit_msg>[doc] Update bitcoin-core GitHub links<commit_after>Contents
========
This directory contains tools for developers working on this repository.

clang-format.py
===============

A script to format cpp source code according to [.clang-format](../../src/.clang-format). This should only be applied to new files or files which are currently not actively developed on. Also, git subtrees are not subject to formatting.

fix-copyright-headers.py
========================

Every year newly updated files need to have its copyright headers updated to reflect the current year.
If you run this script from the root folder it will automatically update the year on the copyright header for all
source files if these have a git commit from the current year.

For example a file changed in 2015 (with 2015 being the current year):

```// Copyright (c) 2009-2013 The Bitcoin Core developers```

would be changed to:

```// Copyright (c) 2009-2015 The Bitcoin Core developers```

git-subtree-check.sh
====================

Run this script from the root of the repository to verify that a subtree matches the contents of
the commit it claims to have been updated to.

To use, make sure that you have fetched the upstream repository branch in which the subtree is
maintained:
* for `src/secp256k1`: https://github.com/bitcoin-core/secp256k1.git (branch master)
* for `src/leveldb`: https://github.com/bitcoin-core/leveldb.git (branch bitcoin-fork)
* for `src/univalue`: https://github.com/bitcoin-core/univalue.git (branch master)

Usage: `git-subtree-check.sh DIR COMMIT`

`COMMIT` may be omitted, in which case `HEAD` is used.

github-merge.sh
===============

A small script to automate merging pull-requests securely and sign them with GPG.

For example:

  ./github-merge.sh bitcoin/bitcoin 3077

(in any git repository) will help you merge pull request #3077 for the
bitcoin/bitcoin repository.

What it does:
{'fraction_non_alphanumeric': 0.11608093716719915, 'fraction_numerical': 0.021299254526091587, 'mean_word_length': 4.452830188679245, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '1329683', 'n_tokens_mistral': 1101, 'n_tokens_neox': 989, 'n_words': 485}