Hello community, here is the log from the commit of package hub for openSUSE:Factory checked in at 2020-03-07 21:41:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hub (Old) and /work/SRC/openSUSE:Factory/.hub.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hub" Sat Mar 7 21:41:29 2020 rev:11 rq:782298 version:2.14.2 Changes: -------- --- /work/SRC/openSUSE:Factory/hub/hub.changes 2020-01-22 22:46:23.864579461 +0100 +++ /work/SRC/openSUSE:Factory/.hub.new.26092/hub.changes 2020-03-07 21:41:38.708410160 +0100 @@ -1,0 +2,10 @@ +Fri Mar 6 18:58:55 UTC 2020 - Martin Hauke <mar...@gmx.de> + +- Update to version 2.14.2 + * Ensure man pages are shown at full width + * Fix subject in ci-status docs + * Indicate in docs that you can do plain git push after hub pr + checkout + * Fix using hub inside git worktree + +------------------------------------------------------------------- Old: ---- hub-2.14.1.tar.gz New: ---- hub-2.14.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hub.spec ++++++ --- /var/tmp/diff_new_pack.zct0s3/_old 2020-03-07 21:41:39.728410849 +0100 +++ /var/tmp/diff_new_pack.zct0s3/_new 2020-03-07 21:41:39.732410852 +0100 @@ -1,7 +1,7 @@ # # spec file for package hub # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define ver %{version} Name: hub -Version: 2.14.1 +Version: 2.14.2 Release: 0 Summary: Command-line wrapper for git and GitHub License: MIT ++++++ hub-2.14.1.tar.gz -> hub-2.14.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/.github/workflows/ci.yml new/hub-2.14.2/.github/workflows/ci.yml --- old/hub-2.14.1/.github/workflows/ci.yml 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/.github/workflows/ci.yml 2020-03-05 18:48:23.000000000 +0100 @@ -8,7 +8,7 @@ strategy: fail-fast: false matrix: - go: [ '1.9', '1.10', '1.11', '1.12', '1.13' ] + go: [ '1.11', '1.12', '1.13', '1.14' ] steps: - uses: actions/checkout@v1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/.github/workflows/release.yml new/hub-2.14.2/.github/workflows/release.yml --- old/hub-2.14.1/.github/workflows/release.yml 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/.github/workflows/release.yml 2020-03-05 18:48:23.000000000 +0100 @@ -28,3 +28,4 @@ formula-name: hub env: COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/Makefile new/hub-2.14.2/Makefile --- old/hub-2.14.1/Makefile 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/Makefile 2020-03-05 18:48:23.000000000 +0100 @@ -1,17 +1,16 @@ -SOURCES = $(shell script/build files) +SOURCES = $(shell go list -f '{{range .GoFiles}}{{$$.Dir}}/{{.}}\ +{{end}}' ./...) SOURCE_DATE_EPOCH ?= $(shell date +%s) BUILD_DATE = $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" '+%d %b %Y' 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" '+%d %b %Y') HUB_VERSION = $(shell bin/hub version | tail -1) -FLAGS_ALL = $(shell go version | grep -q 'go1.[89]' || echo 'all=') -export GOFLAGS := $(shell go version | grep -q 'go1.1[^0]' && echo '-mod=vendor') -export LDFLAGS := -extldflags '$(LDFLAGS)' -export GCFLAGS := $(FLAGS_ALL)-trimpath '$(PWD)' -export ASMFLAGS := $(FLAGS_ALL)-trimpath '$(PWD)' -ifneq ($(GOFLAGS),) - export GO111MODULE=on - unexport GOPATH -endif +export GOFLAGS := -mod=vendor +export GO111MODULE=on +unexport GOPATH + +export LDFLAGS := -extldflags '$(LDFLAGS)' +export GCFLAGS := all=-trimpath '$(PWD)' +export ASMFLAGS := all=-trimpath '$(PWD)' MIN_COVERAGE = 90.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/README.md new/hub-2.14.2/README.md --- old/hub-2.14.1/README.md 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/README.md 2020-03-05 18:48:23.000000000 +0100 @@ -10,19 +10,23 @@ ``` sh $ hub clone rtomayko/tilt - -# expands to: #=> git clone git://github.com/rtomayko/tilt.git + +# if you prefer HTTPS to git/SSH protocols: +$ git config --global hub.protocol https +$ hub clone rtomayko/tilt +#=> git clone https://github.com/rtomayko/tilt.git ``` -hub can be safely [aliased](#aliasing) as `git` so you can type `$ git -<command>` in the shell and get all the usual `hub` features. +See [usage examples](https://hub.github.com/#developer) or the [full reference +documentation](https://hub.github.com/hub.1.html) to see all available commands +and flags. -See [Usage documentation](https://hub.github.com/hub.1.html) for the list of all -commands and their arguments. +hub can also be used to make shell scripts that [directly interact with the +GitHub API](https://hub.github.com/#scripting). -hub can also be used to make shell scripts that [manually interface with the -GitHub API](https://hub.github.com/hub-api.1.html). +hub can be safely [aliased](#aliasing) as `git`, so you can type `$ git +<command>` in the shell and have it expanded with `hub` features. Installation ------------ @@ -41,18 +45,47 @@ Debian | [apt(8)](https://manpages.debian.org/buster/apt/apt.8.en.html) | `sudo apt install hub` Ubuntu | [Snap](https://snapcraft.io) | `snap install hub --classic` +Packages other than Homebrew are community-maintained (thank you!) and they +are not guaranteed to match the [latest hub release][latest]. Check `hub +version` after installing a community package. + #### Standalone -`hub` can be easily installed as an executable. Download the latest -[compiled binaries](https://github.com/github/hub/releases) and put it anywhere -in your executable path. +`hub` can be easily installed as an executable. Download the [latest +binary][latest] for your system and put it anywhere in your executable path. + +#### GitHub Actions + +hub can be used for automation through [GitHub Actions][] workflows: +```yaml +steps: +- uses: actions/checkout@v2 + +- name: hub example + shell: bash + run: | + curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 + bin/hub pr list # list pull requests in the current repo + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +``` + +Note that the default GITHUB_TOKEN will only work for API operations within _the +same repo that runs this workflow_. If you need to access or write to other +repositories, [generate a Personal Access Token][pat] with `repo` scope and add +it to your [repository secrets][]. + + +[github actions]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions +[pat]: https://github.com/settings/tokens +[repository secrets]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets #### Source Prerequisites for building from source are: * `make` -* [Go 1.9+](https://golang.org/doc/install) +* [Go 1.11+](https://golang.org/doc/install) Clone this repository and run `make install`: @@ -67,11 +100,6 @@ make install prefix=/usr/local ``` -This assumes support for [Go 1.11+ -modules](https://github.com/golang/go/wiki/Modules). If you are building on an -older version of Go, you will need to clone the repository into -`$GOPATH/src/github.com/github/hub`. - Aliasing -------- @@ -113,18 +141,15 @@ ### Shell tab-completion -hub repository contains tab-completion scripts for bash, zsh and fish. +hub repository contains [tab-completion scripts](./etc) for bash, zsh and fish. These scripts complement existing completion scripts that ship with git. -[Installation instructions](etc) - -* [hub bash completion](https://github.com/github/hub/blob/master/etc/hub.bash_completion.sh) -* [hub zsh completion](https://github.com/github/hub/blob/master/etc/hub.zsh_completion) -* [hub fish completion](https://github.com/github/hub/blob/master/etc/hub.fish_completion) - Meta ---- -* Home: <https://github.com/github/hub> * Bugs: <https://github.com/github/hub/issues> * Authors: <https://github.com/github/hub/contributors> +* Our [Code of Conduct](https://github.com/github/hub/blob/master/CODE_OF_CONDUCT.md) + + +[latest]: https://github.com/github/hub/releases/latest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/commands/ci_status.go new/hub-2.14.2/commands/ci_status.go --- old/hub-2.14.1/commands/ci_status.go 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/commands/ci_status.go 2020-03-05 18:48:23.000000000 +0100 @@ -23,7 +23,7 @@ -f, --format <FORMAT> Pretty print all status checks using <FORMAT> (implies ''--verbose''). See the "PRETTY FORMATS" section of git-log(1) for some additional details on how - placeholders are used in format. The available placeholders for issues are: + placeholders are used in format. The available placeholders for checks are: %U: the URL of this status check diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/commands/help.go new/hub-2.14.2/commands/help.go --- old/hub-2.14.1/commands/help.go 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/commands/help.go 2020-03-05 18:48:23.000000000 +0100 @@ -175,6 +175,7 @@ } c := exec.Command(manArgs[0], manArgs[1:]...) + c.Stdin = os.Stdin c.Stdout = os.Stdout c.Stderr = os.Stderr c.Env = env diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/commands/pr.go new/hub-2.14.2/commands/pr.go --- old/hub-2.14.1/commands/pr.go 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/commands/pr.go 2020-03-05 18:48:23.000000000 +0100 @@ -30,6 +30,8 @@ * _checkout_: Check out the head of a pull request in a new branch. + To update the pull request with new commits, use ''git push''. + * _show_: Open a pull request page in a web browser. When no <PR-NUMBER> is specified, <HEAD> is used to look up open pull requests and defaults to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/commands/updater_autoupdate.go new/hub-2.14.2/commands/updater_autoupdate.go --- old/hub-2.14.1/commands/updater_autoupdate.go 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/commands/updater_autoupdate.go 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -// +build autoupdate - -package commands - -func init() { - EnableAutoUpdate = true -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/git/git.go new/hub-2.14.2/git/git.go --- old/hub-2.14.1/git/git.go 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/git/git.go 2020-03-05 18:48:23.000000000 +0100 @@ -2,7 +2,6 @@ import ( "fmt" - "io/ioutil" "os" "path/filepath" "strings" @@ -105,32 +104,6 @@ return false } -func BranchAtRef(paths ...string) (name string, err error) { - dir, err := Dir() - if err != nil { - return - } - - segments := []string{dir} - segments = append(segments, paths...) - path := filepath.Join(segments...) - b, err := ioutil.ReadFile(path) - if err != nil { - return - } - - n := string(b) - refPrefix := "ref: " - if strings.HasPrefix(n, refPrefix) { - name = strings.TrimPrefix(n, refPrefix) - name = strings.TrimSpace(name) - } else { - err = fmt.Errorf("No branch info in %s: %s", path, n) - } - - return -} - func Editor() (string, error) { varCmd := gitCmd("var", "GIT_EDITOR") varCmd.Stderr = nil @@ -143,9 +116,18 @@ } func Head() (string, error) { - return BranchAtRef("HEAD") + return SymbolicRef("HEAD") +} + +// SymbolicRef reads a branch name from a ref such as "HEAD" +func SymbolicRef(ref string) (string, error) { + refCmd := gitCmd("symbolic-ref", ref) + refCmd.Stderr = nil + output, err := refCmd.Output() + return firstLine(output), err } +// SymbolicFullName reads a branch name from a ref such as "@{upstream}" func SymbolicFullName(name string) (string, error) { parseCmd := gitCmd("rev-parse", "--symbolic-full-name", name) parseCmd.Stderr = nil diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/github/client.go new/hub-2.14.2/github/client.go --- old/hub-2.14.1/github/client.go 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/github/client.go 2020-03-05 18:48:23.000000000 +0100 @@ -1156,7 +1156,11 @@ func checkStatus(expectedStatus int, action string, response *simpleResponse, err error) error { if err != nil { - return fmt.Errorf("Error %s: %s", action, err.Error()) + errStr := err.Error() + if urlErr, isURLErr := err.(*url.Error); isURLErr { + errStr = fmt.Sprintf("%s %s: %s", urlErr.Op, urlErr.URL, urlErr.Err) + } + return fmt.Errorf("Error %s: %s", action, errStr) } else if response.StatusCode != expectedStatus { errInfo, err := response.ErrorInfo() if err != nil { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/github/localrepo.go new/hub-2.14.2/github/localrepo.go --- old/hub-2.14.1/github/localrepo.go 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/github/localrepo.go 2020-03-05 18:48:23.000000000 +0100 @@ -113,14 +113,16 @@ } func (r *GitHubRepo) DefaultBranch(remote *Remote) *Branch { - var name string - if remote != nil { - name, _ = git.BranchAtRef("refs", "remotes", remote.Name, "HEAD") + b := Branch{ + Repo: r, + Name: "refs/heads/master", } - if name == "" { - name = "refs/heads/master" + if remote != nil { + if name, err := git.SymbolicRef(fmt.Sprintf("refs/remotes/%s/HEAD", remote.Name)); err == nil { + b.Name = name + } } - return &Branch{r, name} + return &b } func (r *GitHubRepo) RemoteBranchAndProject(owner string, preferUpstream bool) (branch *Branch, project *Project, err error) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/script/get new/hub-2.14.2/script/get --- old/hub-2.14.1/script/get 1970-01-01 01:00:00.000000000 +0100 +++ new/hub-2.14.2/script/get 2020-03-05 18:48:23.000000000 +0100 @@ -0,0 +1,54 @@ +#!/bin/bash +# Usage: curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s <HUB_VERSION> +# +# Downloads the hub binary into `bin/hub` within the current directory. + +set -e + +latest-version() { + curl -fsi https://github.com/github/hub/releases/latest | awk -F/ '/^Location:/ {print $(NF)}' +} + +HUB_VERSION="${1#v}" +if [ -z "$HUB_VERSION" ]; then + latest=$(latest-version) || true + [ -n "$latest" ] || latest="v2.14.1" + cat <<MSG >&2 +Error: You must specify a version of hub via the first argument. Example: + curl -L <script> | bash -s ${latest#v} +MSG + exit 1 +fi + +ARCH="amd64" +OS="$(uname -s | tr '[:upper:]' '[:lower:]')" +case "$OS" in +mingw* | msys* ) OS=windows ;; +esac + +download() { + case "$OS" in + windows ) + zip="${1%.tgz}.zip" + curl -fsSLO "$zip" + unzip "$(basename "$zip")" bin/hub.exe + rm -f "$(basename "$zip")" + ;; + darwin ) + curl -fsSL "$1" | tar xz --strip-components=1 '*/bin/hub' + ;; + * ) + curl -fsSL "$1" | tar xz --strip-components=1 --wildcards '*/bin/hub' + ;; + esac +} + +download "https://github.com/github/hub/releases/download/v$HUB_VERSION/hub-$OS-$ARCH-$HUB_VERSION.tgz" + +bin/hub version +if [ -z "$GITHUB_TOKEN" ]; then + cat <<MSG >&2 +Warning: We recommend supplying the GITHUB_TOKEN environment variable to avoid +being prompted for authentication. +MSG +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/script/package new/hub-2.14.2/script/package --- old/hub-2.14.1/script/package 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/script/package 2020-03-05 18:48:23.000000000 +0100 @@ -38,8 +38,10 @@ if [ "$os" = "windows" ]; then crlf README.md "${tmpdir}/README.txt" crlf LICENSE "${tmpdir}/LICENSE.txt" - mkdir "${tmpdir}/help" - for man in share/doc/*/*.html; do crlf "$man" "${tmpdir}/help/${man##*/}"; done + for man in share/doc/*/*.html; do + mkdir -p "${tmpdir}/${man%/*}" + cp "$man" "${tmpdir}/${man}" + done crlf script/install.bat "${tmpdir}/install.bat" else cp -R README.md LICENSE etc share "$tmpdir" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/script/test new/hub-2.14.2/script/test --- old/hub-2.14.1/script/test 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/script/test 2020-03-05 18:48:23.000000000 +0100 @@ -32,7 +32,6 @@ trap "exit 1" INT check_formatting() { - [[ "$(go version)" != *" go1.8."* ]] || return 0 gofmt -l -w . >/dev/null git checkout -- vendor if ! git diff -U1 --exit-code; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hub-2.14.1/version/version.go new/hub-2.14.2/version/version.go --- old/hub-2.14.1/version/version.go 2020-01-21 15:28:56.000000000 +0100 +++ new/hub-2.14.2/version/version.go 2020-03-05 18:48:23.000000000 +0100 @@ -1,4 +1,4 @@ package version // Version represents the hub version number -var Version = "2.14.1" +var Version = "2.14.2"