Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

silence "fatal: no such section: <name>" messages #52

Merged
merged 1 commit into from
May 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions transcrypt
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,15 @@ display_configuration() {

# remove transcrypt-related settings from the repository's git config
clean_gitconfig() {
git config --remove-section transcrypt
git config --remove-section filter.crypt
git config --remove-section diff.crypt
git config --remove-section transcrypt 2> /dev/null
git config --remove-section filter.crypt 2> /dev/null
git config --remove-section diff.crypt 2> /dev/null
git config --unset merge.renormalize

# remove the merge section if it's now empty
local merge_values=$(git config --get-regex --local 'merge\..*')
if [[ ! $merge_values ]]; then
git config --remove-section merge
git config --remove-section merge 2> /dev/null
fi
}

Expand Down Expand Up @@ -471,7 +471,7 @@ uninstall_transcrypt() {
# remove the alias section if it's now empty
local alias_values=$(git config --get-regex --local 'alias\..*')
if [[ ! $alias_values ]]; then
git config --remove-section alias
git config --remove-section alias 2> /dev/null
fi

# remove any defined crypt patterns in gitattributes
Expand Down