Skip to content

Commit 4b07ca9

Browse files
authored
Merge pull request #42 from bill-auger/master
2 parents fad332c + 23a4d1d commit 4b07ca9

File tree

4 files changed

+127
-60
lines changed

4 files changed

+127
-60
lines changed

git-branch-status-subtree/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*
2+
!gbs-config.sh.inc.example
3+
!git-branch-status
4+
!LICENSE
5+
!README.md

git-branch-status-subtree/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ EXAMPLES:
5858
| feature-branch | (even) | (ahead 2) | origin/feature-branch |
5959
| master | (behind 1) | (even) | origin/master |
6060
61-
# compare two arbitrary branches (either local and either remote)
61+
# compare two arbitrary branches - local or remote
6262
$ git-branch-status local-arbitrary-branch fork/arbitrary-branch
6363
| local-arbitrary-branch | (even) | (ahead 1) | fork/arbitrary-branch |
6464
$ git-branch-status fork/arbitrary-branch local-arbitrary-branch
6565
| fork/arbitrary-branch | (behind 1) | (even) | local-arbitrary-branch |
6666
67-
# show all branches - including those synchronized, non-tracking, or not checked-out
67+
# show all branches - local and remote, regardless of state or relationship
6868
$ git-branch-status -a
6969
$ git-branch-status --all
70-
| master | (even) | (ahead 1) | origin/master |
70+
*| master | (even) | (ahead 1) | origin/master |
7171
| tracked-branch | (even) | (even) | origin/tracked-branch |
7272
| (no local) | n/a | n/a | origin/untracked-branch |
7373
| local-branch | n/a | n/a | (no upstream) |
@@ -77,7 +77,7 @@ EXAMPLES:
7777
# show the current branch
7878
$ git-branch-status -b
7979
$ git-branch-status --branch
80-
| current-branch | (even) | (ahead 2) | origin/current-branch |
80+
*| current-branch | (even) | (ahead 2) | origin/current-branch |
8181
8282
# show a specific branch
8383
$ git-branch-status specific-branch
@@ -98,7 +98,7 @@ EXAMPLES:
9898
# show all local branches - including those synchronized or non-tracking
9999
$ git-branch-status -l
100100
$ git-branch-status --local
101-
| master | (even) | (ahead 1) | origin/master |
101+
*| master | (even) | (ahead 1) | origin/master |
102102
| tracked-branch | (even) | (even) | origin/tracked-branch |
103103
| local-branch | n/a | n/a | (no upstream) |
104104
@@ -111,9 +111,9 @@ EXAMPLES:
111111
# show all branches with timestamps (like -a -d)
112112
$ git-branch-status -v
113113
$ git-branch-status --verbose
114-
| 1999-12-31 local | n/a | n/a | (no upstream) |
115-
| 1999-12-31 master | (behind 1) | (even) | 2000-01-01 origin/master |
116-
| 1999-12-31 tracked | (even) | (even) | 2000-01-01 origin/tracked |
114+
| 1999-12-31 master | (behind 1) | (even) | 2000-01-01 origin/master |
115+
| 1999-12-31 tracked | (even) | (even) | 2000-01-01 origin/tracked |
116+
*| 1999-12-31 local-wip | n/a | n/a | (no upstream) |
117117
```
118118

119119

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
###############################################################################
2+
# optional user-defined config for the 'git-branch-status' program #
3+
#-----------------------------------------------------------------------------#
4+
# * copy this file to: ./gbs-config.sh.inc (or $GBS_CFG_FILE) to customize #
5+
# * the text in this file must be valid BASH #
6+
# * you can also export these configuration options from the environment #
7+
# as well as an alternate location of this file (as $GBS_CFG_FILE) #
8+
# * environment variables will over-ride those defined in this file #
9+
# * environment variables should be named similarly to those in this file #
10+
# with the CFG_* prefix replaced with GBS_* #
11+
# eg: export GBS_CFG_FILE=~/.config/git-branch-status/config.sh.inc #
12+
# eg: export GBS_FETCH_PERIOD=0 #
13+
###############################################################################
14+
15+
16+
# number of minutes between automatic `git fetch --all` calls
17+
# 0 => always, -1 => never (default: -1)
18+
readonly CFG_FETCH_PERIOD=-1
19+
20+
21+
# writable filesystem location for storage of the last-fetch timestamp
22+
# (default: ~/.GBS_LAST_FETCH)
23+
readonly CFG_LAST_FETCH_FILE=~/.GBS_LAST_FETCH
24+
25+
26+
# whether or not to present ANSI colors
27+
# 0 => no, 1 => yes (default: 1)
28+
readonly CFG_USE_ANSI_COLOR=1

0 commit comments

Comments
 (0)