Skip to content

Commit

Permalink
never page on git r, git h, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
garybernhardt committed May 12, 2014
1 parent d52f6e4 commit 50188a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
# ra = recent commits, all reachable refs
# l = all commits, only current branch
# la = all commits, all reachable refs
head = !git l -1
head = !git r -1
h = !git head
hp = "!. ~/.githelpers && show_git_head"
r = !git l -30
r = !GIT_NO_PAGER=1 git l -30
ra = !git r --all
l = "!. ~/.githelpers && pretty_git_log"
la = !git l --all
Expand Down
9 changes: 7 additions & 2 deletions .githelpers
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ pretty_git_log() {
column -s '}' -t |
# Color merge commits specially
sed -Ee "s/(Merge (branch|remote-tracking branch|pull request) .*$)/$(printf $ANSI_RED)\1$(printf $ANSI_RESET)/" |
# Page only if we need to
less -FXRS
# Page only if we're asked to.
if [ -n "$GIT_NO_PAGER" ]; then
cat
else
# Page only if needed.
less -FXRS
fi
}

0 comments on commit 50188a4

Please sign in to comment.