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

a few fixes in a row #175

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion bin/git-back
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if test $# -eq 0; then
git reset --soft HEAD~1
else
if `echo $1 | grep -q [^[:digit:]]`; then
if `echo $1 | grep -qv [[:digit:]]`; then
echo "$1 is not a number" 1>&2
else
git reset --soft HEAD~$1
Expand Down
2 changes: 1 addition & 1 deletion bin/git-bug
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ if test "$1" = "finish"; then
else
test -z $1 && echo "bug <name> required." && exit 1
branch=bug/$1
git checkout -b $branch &> /dev/null
git checkout -b $branch > /dev/null 2>&1
fi
2 changes: 1 addition & 1 deletion bin/git-delete-merged-branches
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

delete_all="no"
current_branch=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
Expand Down
2 changes: 1 addition & 1 deletion bin/git-extras
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

VERSION="1.9.0"

Expand Down
2 changes: 1 addition & 1 deletion bin/git-feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ if test "$1" = "finish"; then
else
test -z $1 && echo "feature <name> required." 1>&2 && exit 1
branch=feature/$1
git checkout -b $branch &> /dev/null
git checkout -b $branch > /dev/null 2>&1
fi
26 changes: 13 additions & 13 deletions bin/git-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

get_config() {
git config --list
Expand All @@ -23,20 +23,20 @@ remote_urls() {
# Show info similar to svn

echo
echo "## Remote URLs:\n"
echo "$(remote_urls)\n"
echo -e "## Remote URLs:\n"
echo -e "$(remote_urls)\n"

echo "## Remote Branches:\n"
echo "$(remote_branches)\n"
echo -e "## Remote Branches:\n"
echo -e "$(remote_branches)\n"

echo "## Local Branches:\n"
echo "$(local_branches)\n"
echo -e "## Local Branches:\n"
echo -e "$(local_branches)\n"

echo "## Most Recent Commit:\n"
echo "$(most_recent_commit)\n"
echo "Type 'git log' for more commits, or 'git show <commit id>' for full commit details.\n"
echo -e "## Most Recent Commit:\n"
echo -e "$(most_recent_commit)\n"
echo -e "Type 'git log' for more commits, or 'git show <commit id>' for full commit details.\n"

if test "$1" != "--no-config"; then
echo "## Configuration (.git/config):\n"
echo "$(get_config)\n"
fi
echo -e "## Configuration (.git/config):\n"
echo -e "$(get_config)\n"
fi
1 change: 1 addition & 0 deletions bin/git-obliterate
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh
file=$1
test -z $file && echo "file required." 1>&2 && exit 1
git filter-branch -f --index-filter "git rm -r --cached $file --ignore-unmatch" --prune-empty --tag-name-filter cat -- --all
2 changes: 1 addition & 1 deletion bin/git-pull-request
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash

#
# Echo <msg> and exit
Expand Down
2 changes: 1 addition & 1 deletion bin/git-refactor
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ if test "$1" = "finish"; then
else
test -z $1 && echo "refactor <name> required." 1>&2 && exit 1
branch=refactor/$1
git checkout -b $branch &> /dev/null
git checkout -b $branch > /dev/null 2>&1
fi
2 changes: 1 addition & 1 deletion bin/git-release
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/bash

hook() {
local hook=.git/hooks/$1.sh
Expand Down
3 changes: 2 additions & 1 deletion man/manning-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ for file in $(ls git*.md); do
extra=${file/.md/}
spaced=" "
echo "$extra(1)${spaced:${#extra}}$extra" >> index.txt.tmp;
title=$(grep -m=1 $extra"(1) -- " $file)
title=$(grep -m1 $extra"(1) -- " $file)
test "$extra" != "git-extras" && echo " - **"${title/" --"/"**"} >> git-extras.md.tmp
done
ln=$(awk '/## AUTHOR/{print NR};' ./git-extras.md)
awk "NR >= $ln-1" git-extras.md >> git-extras.md.tmp && mv -f index.txt.tmp index.txt && mv -f git-extras.md.tmp git-extras.md

for file in $(ls git*.md); do
echo -e "\nprocessing: $file"
extra=${file/.md/}
ronn $file && mv -f $extra.1.html $extra.html
done