83f61949292b865a7962f1f0a4a8c0fc6350f313

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

git: change docs for git_main_branch

Also remove unnecesary dramatic remark

Diff

 1diff --git a/plugins/git/README.md b/plugins/git/README.md
 2index e809e1bcd2f5dee9468fdc7b3e10e70153554209..b92d0bf028508dee1582a75f3c5d2861db0fdbe5 100644
 3--- a/plugins/git/README.md
 4+++ b/plugins/git/README.md
 5@@ -208,13 +208,13 @@ These are aliases that have been removed, renamed, or otherwise modified in a wa
 6 
 7 ### Current
 8 
 9-| Command                | Description                                                                  |
10-|:-----------------------|:-----------------------------------------------------------------------------|
11-| `grename <old> <new>`  | Rename `old` branch to `new`, including in origin remote                     |
12-| current_branch         | Return the name of the current branch                                        |
13-| git_current_user_name  | Returns the `user.name` config value                                         |
14-| git_current_user_email | Returns the `user.email` config value                                        |
15-| git_main_branch        | Returns the name of the main branch: `master` if it exists, `main` otherwise |
16+| Command                | Description                                                                            |
17+|:-----------------------|:---------------------------------------------------------------------------------------|
18+| `grename <old> <new>`  | Rename `old` branch to `new`, including in origin remote                               |
19+| current_branch         | Return the name of the current branch                                                  |
20+| git_current_user_name  | Returns the `user.name` config value                                                   |
21+| git_current_user_email | Returns the `user.email` config value                                                  |
22+| git_main_branch        | Returns the name of the main branch: from origin or from local branches, else 'master' |
23 
24 ### Work in Progress (WIP)
25 
26diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
27index 7284cd121a5065e48569fabecda94b3ea5532cf2..8f8edcd23fec11a11a87aa9898f8a04d47cc6aff 100644
28--- a/plugins/git/git.plugin.zsh
29+++ b/plugins/git/git.plugin.zsh
30@@ -25,8 +25,7 @@ function work_in_progress() {
31   fi
32 }
33 
34-# Get the default 'main' branch
35-# Marc(2020-07-11): I hope to be able to remove this someday
36+# Get the default 'main' branch: from origin, from local branches, or else just 'master'
37 function git_main_branch() {
38   # Get default branch from the origin remote
39   local branch