Skip to content

Commit

Permalink
Don't prune tags
Browse files Browse the repository at this point in the history
The tags should not be updated as if there are several remotes, the
final tags will be equal to the last used remote. This remote may have
obsolete tags and will bring them to the current repository. This is not
acceptable.
  • Loading branch information
extsoft committed Sep 14, 2019
1 parent 9fdcd94 commit 4ddc37b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
7 changes: 4 additions & 3 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ successful push, the given and temporary branches are removed.
Approximate commands flow is
```bash
==>> git elegant accept-work task-123
git fetch --all --tags
git fetch --all
git checkout --force -B __eg origin/task-123
git status
git rebase origin/master
Expand Down Expand Up @@ -87,9 +87,10 @@ git config --local core.commentChar |
git config --local apply.whitespace fix
# Aliasing Elegant Git commands by making them available as Git commands
git config --local "alias.<command>" "elegant <command>"
# Keeping up-to-date with both branches and tags on the remote
# Keeping up-to-date branches
git config --local fetch.prune true
git config --local fetch.pruneTags true
# Don't prune tags by default
git config --local fetch.pruneTags false
# Rebase local changes while puling remotes refs
git config --local fetch.prune true
git config --local fetch.pruneTags
Expand Down
2 changes: 1 addition & 1 deletion libexec/git-elegant-accept-work
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ successful push, the given and temporary branches are removed.
Approximate commands flow is
\`\`\`bash
==>> git elegant accept-work task-123
git fetch --all --tags
git fetch --all
git checkout --force -B __eg origin/task-123
git status
git rebase origin/master
Expand Down
10 changes: 4 additions & 6 deletions libexec/git-elegant-acquire-repository
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ _core_editor_message="Please specify a command to start the editor."
_core_comment=("core.commentChar" "|")
_apply_whitespace=("apply.whitespace" "fix")
_fetch_prune=("fetch.prune" "true")
_fetch_pruneTags=("fetch.pruneTags" "true")
_fetch_pruneTags=("fetch.pruneTags" "false")
## Line endings
## See https://help.github.com/en/articles/configuring-git-to-handle-line-endings
### MAC/Linux
Expand Down Expand Up @@ -67,12 +67,10 @@ git config --local core.commentChar |
git config --local apply.whitespace fix
# Aliasing Elegant Git commands by making them available as Git commands
git config --local "alias.<command>" "elegant <command>"
# Keeping up-to-date with both branches and tags on the remote
# Keep remote-tracking references up-to-date
git config --local fetch.prune true
git config --local fetch.pruneTags true
# Rebase local changes while puling remotes refs
git config --local fetch.prune true
git config --local fetch.pruneTags
# Don't prune tags by default
git config --local fetch.pruneTags false
# Line ending configuration
## on MAC or Linux
git config --local core.autocrlf input
Expand Down
6 changes: 3 additions & 3 deletions tests/git-elegant-acquire-repository.bats
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ teardown() {
[[ "${lines[@]}" =~ "==>> git config --local core.commentChar |" ]]
[[ "${lines[@]}" =~ "==>> git config --local apply.whitespace fix" ]]
[[ "${lines[@]}" =~ "==>> git config --local fetch.prune true" ]]
[[ "${lines[@]}" =~ "==>> git config --local fetch.pruneTags true" ]]
[[ "${lines[@]}" =~ "==>> git config --local fetch.pruneTags false" ]]
[[ "${lines[@]}" =~ "==>> git config --local core.autocrlf true" ]]
[[ "${lines[@]}" =~ "==>> git config --local pull.rebase true" ]]
[[ "${lines[@]}" =~ "==>> git config --local rebase.autoStash false" ]]
Expand All @@ -50,7 +50,7 @@ teardown() {
[[ "${lines[@]}" =~ "==>> git config --local core.commentChar |" ]]
[[ "${lines[@]}" =~ "==>> git config --local apply.whitespace fix" ]]
[[ "${lines[@]}" =~ "==>> git config --local fetch.prune true" ]]
[[ "${lines[@]}" =~ "==>> git config --local fetch.pruneTags true" ]]
[[ "${lines[@]}" =~ "==>> git config --local fetch.pruneTags false" ]]
[[ "${lines[@]}" =~ "==>> git config --local core.autocrlf input" ]]
[[ "${lines[@]}" =~ "==>> git config --local pull.rebase true" ]]
[[ "${lines[@]}" =~ "==>> git config --local rebase.autoStash false" ]]
Expand All @@ -65,7 +65,7 @@ teardown() {
[[ "${lines[@]}" =~ "==>> git config --local core.commentChar |" ]]
[[ "${lines[@]}" =~ "==>> git config --local apply.whitespace fix" ]]
[[ "${lines[@]}" =~ "==>> git config --local fetch.prune true" ]]
[[ "${lines[@]}" =~ "==>> git config --local fetch.pruneTags true" ]]
[[ "${lines[@]}" =~ "==>> git config --local fetch.pruneTags false" ]]
[[ "${lines[@]}" =~ "==>> git config --local core.autocrlf input" ]]
[[ "${lines[@]}" =~ "==>> git config --local pull.rebase true" ]]
[[ "${lines[@]}" =~ "==>> git config --local rebase.autoStash false" ]]
Expand Down

0 comments on commit 4ddc37b

Please sign in to comment.