-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Read multi slash branch names when
deliver-work
`git elegant deliver-work` incorrectly reads the name of the upstream branch if it contains at least one slash like `feature/123`. This is because the used pattern matching logic doesn't expect remote branch names like `origin/feature/123`. In order to solve it, the new `transformation` plugin is introduced. It provides functions that parse remote branch names correctly. Now, the plugin handles branch translation (mapping) for `deliver-work` command as well as for `accept-work` and `obtain-work` in order to prevent possible errors in the future. #255
- Loading branch information
Showing
6 changed files
with
31 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
# The plugin holds functions that convert one object into another. | ||
# The most part of functions manipulates with strings. | ||
|
||
branch-from-remote-branch() { | ||
# usage : echo $(branch-from-remote-branch origin/feature/a) | ||
# result: feature/a | ||
echo ${1#*/} | ||
} | ||
|
||
remote-from-remote-branch() { | ||
# usage : echo $(remote-from-remote-branch origin/feature/a) | ||
# result: origin | ||
echo ${1%%/*} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters