<commit_before>#!/usr/bin/env bash
#  DETAILS: External diff tool for git
#  CREATED: 03/20/13 21:55:08 IST
# MODIFIED: 18/Apr/2018 12:13:05 PDT
#
#   AUTHOR: <NAME>., <EMAIL>
#  LICENCE: Copyright (c) 2013, <NAME>.

#set -uvx               # Treat unset variables as an error, verbose, debug mode
[[ "$(basename git.sh)" == "$(basename -- $0)" && -f $HOME/.bashrc.dev ]] && { source $HOME/.bashrc.dev; }

# To change remote url for github repo from https to ssh, do
# git remote set-url origin <EMAIL>:rkks/scripts.git

# .mailmap allows users with different email-addrs to be recognized by same name
function add_mailmap()
{
    git shortlog -se | awk -F'[ -' '{print $2,$3,$2,$3}' | sort > .mailmap
    # Now manually edit .mailmap to name all emails belonging to single person
    # with same Name/title. So that release-notes generates grouping with name
}

function new_remote()
{
    [[ $# -ne 2 ]] && { echo "usage: new_remote <remote-name> <url>"; return; }
    local remote=$1; local url=$2;
    # git remote add bitbucket <EMAIL>:mrksravikiran/wiki.git
    git remote add $remote $url;<commit_msg>Fix bash_utils issues, simplify log, and source_script util functions<commit_after>#!/usr/bin/env bash
#  DETAILS: External diff tool for git
#  CREATED: 03/20/13 21:55:08 IST
# MODIFIED: 25/Apr/2018 17:41:20 PDT
#
#   AUTHOR: <NAME>., <EMAIL>
#  LICENCE: Copyright (c) 2013, <NAME>.

#set -uvx               # Treat unset variables as an error, verbose, debug mode
[[ "$(basename git.sh)" == "$(basename -- $0)" && -f $HOME/.bashrc.dev ]] && { source $HOME/.bashrc.dev; }

# .mailmap allows users with different email-addrs to be recognized by same name
function add_mailmap()
{
    git shortlog -se | awk -F'[ -' '{print $2,$3,$2,$3}' | sort > .mailmap
    # Now manually edit .mailmap to name all emails belonging to single person
    # with same Name/title. So that release-notes generates grouping with name
}

function new_remote()
{
    [[ $# -ne 2 ]] && { echo "usage: new_remote <remote-name> <url>"; return; }
    local remote=$1; local url=$2;
    # git remote add bitbucket <EMAIL>:mrksravikiran/wiki.git
    git remote add $remote $url;
{'fraction_non_alphanumeric': 0.14696337505795085, 'fraction_numerical': 0.03337969401947149, 'mean_word_length': 3.4403292181069958, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 18, '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': '7074390', 'n_tokens_mistral': 796, 'n_tokens_neox': 723, 'n_words': 248}