Skip to content

Commit 34b86bd

Browse files
committed
Added new files
1 parent 362e307 commit 34b86bd

File tree

6 files changed

+100
-0
lines changed

6 files changed

+100
-0
lines changed

git-amend-all

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
3+
## Copyright (C) 2006-2011 Daniel Baumann <[email protected]>
4+
##
5+
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6+
## This is free software, and you are welcome to redistribute it
7+
## under certain conditions; see COPYING for details.
8+
9+
10+
set -e
11+
12+
# User is not in git repository
13+
if ! git branch > /dev/null 2>&1
14+
then
15+
echo "E: '$(basename ${PWD})' - Not a Git repository."
16+
exit 1
17+
fi
18+
19+
git add .
20+
git commit -a --amend -C HEAD

git-checkout-branches

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/sh
2+
3+
## Copyright (C) 2006-2011 Daniel Baumann <[email protected]>
4+
##
5+
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6+
## This is free software, and you are welcome to redistribute it
7+
## under certain conditions; see COPYING for details.
8+
9+
10+
set -e
11+
12+
# User is not in git repository
13+
if ! git branch > /dev/null 2>&1
14+
then
15+
echo "E: '$(basename ${PWD})' - Not a Git repository."
16+
exit 1
17+
fi
18+
19+
echo "P: Checking out all remote branches..."
20+
21+
# Rememeber current branch
22+
_CURRENT_BRANCH="$(git branch | awk '/^\* / { print $2 }')"
23+
24+
# Checkout all remote branches
25+
for _REMOTE_BRANCH in $(git branch -r | awk '{ print $1 }')
26+
do
27+
_BRANCH_NAME="$(echo ${_REMOTE_BRANCH} | cut -d/ -f 2-)"
28+
29+
if [ "${_BRANCH_NAME}" != "HEAD" ]
30+
then
31+
if ! git branch | grep -q "${_BRANCH_NAME}$"
32+
then
33+
git checkout -b ${_BRANCH_NAME} ${_REMOTE_BRANCH}
34+
fi
35+
fi
36+
done
37+
38+
# Switch back to current branch
39+
if [ "$(git branch | awk '/^\* / { print $2 }')" != "${_CURRENT_BRANCH}" ]
40+
then
41+
git checkout ${_CURRENT_BRANCH}
42+
fi

git-diff-dw

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
/Applications/Misc/DeltaWalker.app/Contents/MacOS/DeltaWalker -nosplash "$PWD/$1" "$2"

git-find

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class Commit < GitObject
8383
if @names.include?(name)
8484
return
8585
end
86+
puts name
8687
add_name(name)
8788

8889
offset = 0

git-merge-dw

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
/Applications/Misc/DeltaWalker.app/Contents/MacOS/DeltaWalker -nosplash "$PWD/$1" "$2" "$3" -merged="$4"

git-whoami

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
3+
# git-whoami
4+
# Author: Peter Eisentraut <[email protected]>
5+
# Created: 2011-10-27
6+
# License: WTFPL; see http://sam.zoy.org/wtfpl/
7+
8+
# exact logic in ident.c in git source tree
9+
10+
set -e
11+
12+
get_email() {
13+
git config user.email || ( [ -n "$EMAIL" ] && echo "$EMAIL" ) || echo "$(id -nu)@$(hostname --fqdn)"
14+
}
15+
16+
get_name() {
17+
git config user.name || getent passwd $(id -un) | cut -d : -f 5 | cut -d , -f 1
18+
}
19+
20+
: ${GIT_AUTHOR_NAME=$(get_name)}
21+
: ${GIT_COMMITTER_NAME=$(get_name)}
22+
: ${GIT_AUTHOR_EMAIL=$(get_email)}
23+
: ${GIT_COMMITTER_EMAIL=$(get_email)}
24+
25+
author="$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>"
26+
commit="$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
27+
28+
if [ "$author" = "$commit" ]; then
29+
echo "$author"
30+
else
31+
echo "Author: $author"
32+
echo "Commit: $commit"
33+
fi

0 commit comments

Comments
 (0)