Ticket #42050: hub-1.11.1.patch

File hub-1.11.1.patch, 2.7 KB (added by robsonpeixoto@…, 11 years ago)
  • Portfile

     
    44PortSystem          1.0
    55PortGroup           github 1.0
    66
    7 github.setup        github hub 1.10.6 v
    8 revision            2
     7github.setup        github hub 1.11.1 v
    98description         git-wrapper for GitHub specific functionality
    109long_description    hub is a command line utility which adds GitHub knowledge to git.\
    1110                    It can be used on its own or as a git wrapper.
     
    1716
    1817homepage            http://defunkt.io/hub/
    1918
    20 patchfiles          patch-bash-completion.diff
     19checksums           rmd160  2b07f4243eb0f0dc3d50fe5bf379c03e9d4dd909 \
     20                    sha256  b36a36b959472bf81466db7cb563147497d27216adfcafb5e24f370ff4c17764
    2121
    22 checksums           rmd160  3904600cb58a3d895c373b4faecd73b774f4722d \
    23                     sha256  096b86ed9dd83db4bab5f10679feaac017f31aad11fb081b3607405a35e93711
    24 
    2522depends_build       bin:rake:rb-rake
    2623
    2724depends_lib         port:git-core
  • files/patch-bash-completion.diff

     
    1 --- etc/hub.bash_completion.sh.orig     2013-10-11 17:03:50.000000000 +0200
    2 +++ etc/hub.bash_completion.sh  2013-10-12 14:24:47.000000000 +0200
    3 @@ -1,15 +1,16 @@
    4  # hub tab-completion script for bash.
    5  # This script complements the completion script that ships with git.
    6  
    7 -# Check that git tab completion is available
    8 -if declare -F _git > /dev/null; then
    9 -  # Duplicate and rename the 'list_all_commands' function
    10 -  eval "$(declare -f __git_list_all_commands | \
    11 -        sed 's/__git_list_all_commands/__git_list_all_commands_without_hub/')"
    12 +# Ensure that git tab completion is available
    13 +_xfunc git __git_list_all_commands >/dev/null 2>&1
    14  
    15 -  # Wrap the 'list_all_commands' function with extra hub commands
    16 -  __git_list_all_commands() {
    17 -    cat <<-EOF
    18 +# Duplicate and rename the 'list_all_commands' function
    19 +eval "$(declare -f __git_list_all_commands | \
    20 +    sed 's/__git_list_all_commands/__git_list_all_commands_without_hub/')"
    21 +
    22 +# Wrap the 'list_all_commands' function with extra hub commands
    23 +__git_list_all_commands() {
    24 +cat <<-EOF
    25  alias
    26  pull-request
    27  fork
    28 @@ -17,9 +18,11 @@
    29  browse
    30  compare
    31  EOF
    32 -    __git_list_all_commands_without_hub
    33 -  }
    34 +__git_list_all_commands_without_hub
    35 +}
    36  
    37 -  # Ensure cached commands are cleared
    38 -  __git_all_commands=""
    39 -fi
    40 +# Ensure cached commands are cleared
    41 +__git_all_commands=""
    42 +
    43 +# Register completion for the hub command
    44 +__git_complete hub __git_main