Skip to content

Commit

Permalink
Change base structure of repository
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerun committed Jul 2, 2013
1 parent b6470dc commit 475fc8d
Show file tree
Hide file tree
Showing 45 changed files with 68 additions and 64 deletions.
15 changes: 3 additions & 12 deletions .gitignore
@@ -1,13 +1,4 @@
!bin/
!link/.*
caches/
backups/
link/.ssh/authorized_keys
link/.ssh/id_*
link/.ssh/known_hosts
*LOCAL*
link/.vim/.*
.cache/
cache/
backup/
vim/bundle/
home/.config/hub
*INBOX
config/hub
1 change: 0 additions & 1 deletion .gitmodules/antigen
Submodule antigen deleted from ce1316
1 change: 0 additions & 1 deletion .gitmodules/git-extras
Submodule git-extras deleted from d8492e
1 change: 0 additions & 1 deletion .gitmodules/neobundle.vim
Submodule neobundle.vim deleted from f21ad3
1 change: 0 additions & 1 deletion .gitmodules/rbenv
Submodule rbenv deleted from 6d950d
20 changes: 0 additions & 20 deletions .zsh/10_env.zsh

This file was deleted.

2 changes: 2 additions & 0 deletions NOTES.md
Expand Up @@ -32,3 +32,5 @@ homebrew_recipes=(
vim ssh-copy-id ctags mobile-shell ack
source-highlight
)

xquartz
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 3 additions & 8 deletions .bin/dotfiles → bin/dotfiles
Expand Up @@ -24,14 +24,9 @@ link_dotfiles() {
e_header "Linking files into home directory..."

cd "$HOME"
for file in $DOTHOME/.*; do
for file in $DOTHOME/[a-z]*; do
local base="$(basename $file)"
local dest="$HOME/$base"

# Don't link .git directory
if test "$base" = ".git"; then
continue;
fi
local dest="$HOME/.$base"

# Skip if link is the same.
if test "$file" -ef "$dest"; then
Expand All @@ -47,7 +42,7 @@ link_dotfiles() {
mv "$dest" "$BACKDIR"
fi

ln -sf "${file#$HOME/}" "$base"
ln -sf "${file#$HOME/}" ".$base"
e_success "$base"
done
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
48 changes: 28 additions & 20 deletions .bin/hub → bin/hub
Expand Up @@ -7,7 +7,7 @@
#

module Hub
Version = VERSION = '1.10.4'
Version = VERSION = '1.10.6'
end

module Hub
Expand Down Expand Up @@ -327,6 +327,7 @@ module Hub
create_connection host_url
end

req['User-Agent'] = "Hub #{Hub::VERSION}"
apply_authentication(req, url)
yield req if block_given?

Expand Down Expand Up @@ -541,7 +542,7 @@ module Hub
tty_state = `stty -g 2>#{NULL}`
system 'stty raw -echo -icanon isig' if $?.success?
pass = ''
while char = $stdin.getbyte and !(char == 13 or char == 10)
while char = getbyte($stdin) and !(char == 13 or char == 10)
if char == 127 or char == 8
pass[-1,1] = '' unless pass.empty?
else
Expand All @@ -553,6 +554,14 @@ module Hub
system "stty #{tty_state}" unless tty_state.empty?
end

def getbyte(io)
if io.respond_to?(:getbyte)
io.getbyte
else
io.getc
end
end

def proxy_uri(with_ssl)
env_name = "HTTP#{with_ssl ? 'S' : ''}_PROXY"
if proxy = ENV[env_name] || ENV[env_name.downcase] and !proxy.empty?
Expand Down Expand Up @@ -1190,7 +1199,7 @@ module Hub
extend Context

NAME_RE = /[\w.][\w.-]*/
OWNER_RE = /[a-zA-Z0-9-]+/
OWNER_RE = /[a-zA-Z0-9][a-zA-Z0-9-]*/
NAME_WITH_OWNER_RE = /^(?:#{NAME_RE}|#{OWNER_RE}\/#{NAME_RE})$/

CUSTOM_COMMANDS = %w[alias create browse compare fork pull-request]
Expand Down Expand Up @@ -1230,6 +1239,10 @@ module Hub
base_project = local_repo.main_project
head_project = local_repo.current_project

unless current_branch
abort "Aborted: not currently on any branch."
end

unless base_project
abort "Aborted: the origin remote doesn't point to a GitHub repository."
end
Expand Down Expand Up @@ -1331,13 +1344,18 @@ module Hub
args.executable = 'echo'
args.replace [pull['html_url']]
rescue GitHubAPI::Exceptions
display_api_exception("creating pull request", $!.response)
response = $!.response
display_api_exception("creating pull request", response)
if 404 == response.status
base_url = base_project.web_url.split('://', 2).last
warn "Are you sure that #{base_url} exists?"
end
exit 1
end

def clone(args)
ssh = args.delete('-p')
has_values = /^(--(upload-pack|template|depth|origin|branch|reference)|-[ubo])$/
has_values = /^(--(upload-pack|template|depth|origin|branch|reference|name)|-[ubo])$/

idx = 1
while idx < args.length
Expand All @@ -1362,17 +1380,7 @@ module Hub
return unless index = args.index('add')
args.delete_at index

branch = args.index('-b') || args.index('--branch')
if branch
args.delete_at branch
branch_name = args.delete_at branch
end

clone(args)

if branch_name
args.insert branch, '-b', branch_name
end
args.insert index, 'add'
end

Expand Down Expand Up @@ -1417,7 +1425,7 @@ module Hub
end

projects = names.map { |name|
unless name =~ /\W/ or remotes.include?(name) or remotes_group(name)
unless name !~ /^#{OWNER_RE}$/ or remotes.include?(name) or remotes_group(name)
project = github_project(nil, name)
repo_info = api_client.repo_info(project)
if repo_info.success?
Expand Down Expand Up @@ -1670,7 +1678,7 @@ module Hub
abort "Usage: hub compare [USER] [<START>...]<END>"
end
else
sha_or_tag = /(\w{1,2}|\w[\w.-]+\w)/
sha_or_tag = /((?:#{OWNER_RE}:)?\w[\w.-]+\w)/
range = args.pop.sub(/^#{sha_or_tag}\.\.#{sha_or_tag}$/, '\1...\2')
project = if owner = args.pop then github_project(nil, owner)
else current_project
Expand Down Expand Up @@ -2061,7 +2069,7 @@ __END__
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "HUB" "1" "November 2012" "DEFUNKT" "Git Manual"
.TH "HUB" "1" "March 2013" "DEFUNKT" "Git Manual"
.
.SH "NAME"
\fBhub\fR \- git + hub = github
Expand Down Expand Up @@ -2485,8 +2493,8 @@ $ hub submodule add wycats/bundler vendor/bundler
$ hub submodule add \-p wycats/bundler vendor/bundler
> git submodule add git@github\.com:wycats/bundler\.git vendor/bundler
$ hub submodule add \-b ryppl ryppl/pip vendor/pip
> git submodule add \-b ryppl git://github\.com/ryppl/pip\.git vendor/pip
$ hub submodule add \-b ryppl \-\-name pip ryppl/pip vendor/pip
> git submodule add \-b ryppl \-\-name pip git://github\.com/ryppl/pip\.git vendor/pip
.
.fi
.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions .gitconfig → gitconfig
Expand Up @@ -10,6 +10,7 @@
br = branch
co = checkout
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
cp = cherry-pick
[color]
ui = true
[push]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions .vimrc → vimrc
Expand Up @@ -20,6 +20,7 @@ call neobundle#config('vimproc', {
\ 'unix' : 'make -f make_unix.mak',
\ },
\ })

NeoBundle 'christoomey/vim-space'
NeoBundle 'chrisbra/NrrwRgn'
NeoBundle 'vim-scripts/ZoomWin'
Expand Down Expand Up @@ -93,8 +94,15 @@ NeoBundle 'skwp/vim-conque'
NeoBundle 'duff/vim-bufonly'
NeoBundle 'skwp/vim-ruby-conque'
NeoBundle 'terryma/vim-multiple-cursors'
NeoBundle 'airblade/vim-gitgutter'
NeoBundle 'mattn/webapi-vim'
NeoBundle 'mattn/vdbi-vim'

filetype plugin indent on
NeoBundleCheck

" On OSX
vmap <D-c> "+y<CR>
nmap <D-v> "+p<CR>
runtime! plugin/vimrc.vim
File renamed without changes.
7 changes: 7 additions & 0 deletions zsh/10_env.zsh
@@ -0,0 +1,7 @@
export EDITOR="vim"
export LESSOPEN="| src-hilite-lesspipe.sh %s"

# By default, zsh considers many characters part of a word (e.g., _ and -).
# Narrow that down to allow easier skipping through words via M-f and M-b.
export WORDCHARS='*?[]~&;!$%^<>'

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions .zshrc → zshrc
Expand Up @@ -18,3 +18,19 @@ antigen theme sheerun/oh-my-zsh-powerline-theme powerline
antigen apply

autoload -U zmv
:only() {
ps -ao pid,ppid,comm= | \
awk '!'"/^$$|ack/&&/$(basename $SHELL)"'$/{print $2}' | \
xargs kill
}

if [[ "$SHELL" == *zsh ]]; then
zle -N :only
# bindkey "^Wo" :only
# bindkey "^W^O" :only
fi


### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
export LANG="en_GB.UTF-8"

0 comments on commit 475fc8d

Please sign in to comment.