Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghq for openSUSE:Factory checked in at 2026-10-01 16:45:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghq (Old) and /work/SRC/openSUSE:Factory/.ghq.new.1253 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghq" Thu Oct 1 16:45:23 2026 rev:2 rq:1381708 version:1.11.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghq/ghq.changes 2026-09-08 16:54:43.931513137 +0200 +++ /work/SRC/openSUSE:Factory/.ghq.new.1253/ghq.changes 2026-10-01 16:46:35.244889883 +0200 @@ -1,0 +2,10 @@ +Wed Sep 30 14:48:47 UTC 2026 - Gakuto Furuya <[email protected]> + +- Update to version 1.11.2: + * get: add --clean-bare flag for a clean bare-repository layout + * Update bash, zsh and fish completions + * Update Go dependencies (urfave/cli/v3 3.13.0, golang.org/x/*, + go-isatty 0.0.24) + * 1.11.1 and 1.11.2 only change the upstream release workflow + +------------------------------------------------------------------- Old: ---- ghq-1.10.1.tar.zst New: ---- ghq-1.11.2.tar.zst ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghq.spec ++++++ --- /var/tmp/diff_new_pack.wOZBdr/_old 2026-10-01 16:46:36.071924546 +0200 +++ /var/tmp/diff_new_pack.wOZBdr/_new 2026-10-01 16:46:36.073924630 +0200 @@ -17,7 +17,7 @@ Name: ghq -Version: 1.10.1 +Version: 1.11.2 Release: 0 Summary: Remote repository management made easy License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.wOZBdr/_old 2026-10-01 16:46:36.112926264 +0200 +++ /var/tmp/diff_new_pack.wOZBdr/_new 2026-10-01 16:46:36.116926432 +0200 @@ -3,7 +3,7 @@ <param name="url">https://github.com/x-motemen/ghq</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v1.10.1</param> + <param name="revision">v1.11.2</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> @@ -14,7 +14,7 @@ <param name="compression">zst</param> </service> <service name="go_modules" mode="manual"> - <param name="archive">ghq-1.10.1.tar.zst</param> + <param name="archive">ghq-1.11.2.tar.zst</param> </service> </services> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.wOZBdr/_old 2026-10-01 16:46:36.140927438 +0200 +++ /var/tmp/diff_new_pack.wOZBdr/_new 2026-10-01 16:46:36.145927647 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/x-motemen/ghq</param> - <param name="changesrevision">f60089654267c0990f076186b2ced2eb307d2cbe</param></service></servicedata> + <param name="changesrevision">b9273dd116d09b423073b83e7c0d82ef508d985a</param></service></servicedata> (No newline at EOF) ++++++ ghq-1.10.1.tar.zst -> ghq-1.11.2.tar.zst ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/.tagpr new/ghq-1.11.2/.tagpr --- old/ghq-1.10.1/.tagpr 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/.tagpr 2026-09-29 18:59:55.000000000 +0200 @@ -40,4 +40,5 @@ vPrefix = true releaseBranch = master versionFile = main.go - release = draft + release = draft + command = make prepare-release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/CHANGELOG.md new/ghq-1.11.2/CHANGELOG.md --- old/ghq-1.10.1/CHANGELOG.md 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/CHANGELOG.md 2026-09-29 18:59:55.000000000 +0200 @@ -1,5 +1,53 @@ # Changelog +## [v1.11.2](https://github.com/x-motemen/ghq/compare/v1.11.1...v1.11.2) - 2026-09-29 + +- Restore release asset compatibility by @Songmu in https://github.com/x-motemen/ghq/pull/555 + +## [v1.11.1](https://github.com/x-motemen/ghq/compare/v1.11.0...v1.11.1) - 2026-09-29 + +- Update release workflow by @Songmu in https://github.com/x-motemen/ghq/pull/550 +- install gocredits with Songmu/gocredits GitHub Action by @Songmu in https://github.com/x-motemen/ghq/pull/552 +- Revert "install gocredits with Songmu/gocredits GitHub Action" by @Songmu in https://github.com/x-motemen/ghq/pull/553 + +## [v1.11.0](https://github.com/x-motemen/ghq/compare/v1.10.1...v1.11.0) - 2026-09-29 + +- feat(completion): improve bash completions. by @sciencesakura in https://github.com/x-motemen/ghq/pull/490 +- fix(test): exercise `ghq rm` in command tests by @nurazon59 in https://github.com/x-motemen/ghq/pull/489 +- chore(deps): bump golang.org/x/net from 0.52.0 to 0.53.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/485 +- chore(deps): bump github.com/mattn/go-isatty from 0.0.20 to 0.0.21 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/486 +- chore(deps): bump Songmu/tagpr from 1.18.1 to 1.18.2 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/484 +- chore(deps): bump github.com/urfave/cli/v3 from 3.7.0 to 3.8.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/487 +- chore(deps): bump github.com/mattn/go-isatty from 0.0.21 to 0.0.22 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/495 +- chore(deps): bump Songmu/tagpr from 1.18.2 to 1.19.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/498 +- chore(deps): bump crate-ci/typos from 1.45.0 to 1.46.1 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/501 +- chore(deps): bump golang.org/x/text from 0.36.0 to 0.37.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/500 +- chore(deps): bump golang.org/x/net from 0.53.0 to 0.54.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/499 +- feat(completion): update fish completions by @mochaaP in https://github.com/x-motemen/ghq/pull/508 +- docs: add nix by @ryoppippi in https://github.com/x-motemen/ghq/pull/525 +- fix: correct branch name by @hezhizhen in https://github.com/x-motemen/ghq/pull/514 +- feat(completion): update bash/zsh/fish completions by @hezhizhen in https://github.com/x-motemen/ghq/pull/526 +- chore(deps): bump github.com/urfave/cli/v3 from 3.8.0 to 3.10.1 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/524 +- chore(deps): bump reviewdog/action-staticcheck from 1.28.0 to 1.29.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/523 +- chore(deps): bump actions/checkout from 6.0.2 to 7.0.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/520 +- chore(deps): bump codecov/codecov-action from 6.0.0 to 7.0.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/512 +- chore(deps): bump Songmu/tagpr from 1.19.0 to 1.20.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/509 +- chore(deps): bump crate-ci/typos from 1.46.1 to 1.47.2 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/511 +- Group Dependabot updates for golang.org/x and actions by @Songmu in https://github.com/x-motemen/ghq/pull/528 +- chore(deps): bump the golang-x group with 3 updates by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/529 +- chore(deps): bump actions/setup-go from 6.4.0 to 6.5.0 in the actions group by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/530 +- chore(deps): bump crate-ci/typos from 1.47.2 to 1.48.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/531 +- docs: mention clone.defaultRemoteName by @umekikazuya in https://github.com/x-motemen/ghq/pull/540 +- feat(get): add --clean-bare flag for clean bare-repo layout by @fragon10 in https://github.com/x-motemen/ghq/pull/546 +- chore(deps): bump github.com/urfave/cli/v3 from 3.10.1 to 3.13.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/549 +- chore(deps): bump the actions group across 1 directory with 2 updates by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/535 +- chore(deps): bump reviewdog/action-staticcheck from 1.29.0 to 1.30.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/544 +- chore(deps): bump github.com/mattn/go-isatty from 0.0.22 to 0.0.24 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/537 +- chore(deps): bump Songmu/tagpr from 1.20.0 to 1.20.1 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/533 +- chore(deps): bump crate-ci/typos from 1.48.0 to 1.49.0 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/538 +- chore(deps): bump reviewdog/action-actionlint from 1.72.0 to 1.73.2 by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/542 +- chore(deps): bump the golang-x group across 1 directory with 3 updates by @dependabot[bot] in https://github.com/x-motemen/ghq/pull/547 + ## [v1.10.1](https://github.com/x-motemen/ghq/compare/v1.10.0...v1.10.1) - 2026-04-11 - feat(rm): make ghq rm worktree-aware by @chris-monardo in https://github.com/x-motemen/ghq/pull/481 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/CREDITS new/ghq-1.11.2/CREDITS --- old/ghq-1.10.1/CREDITS 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/CREDITS 2026-09-29 18:59:55.000000000 +0200 @@ -117,27 +117,6 @@ ================================================================ -github.com/davecgh/go-spew -https://github.com/davecgh/go-spew ----------------------------------------------------------------- -ISC License - -Copyright (c) 2012-2016 Dave Collins <[email protected]> - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -================================================================ - github.com/daviddengcn/go-colortext https://github.com/daviddengcn/go-colortext ---------------------------------------------------------------- @@ -225,92 +204,6 @@ ================================================================ -github.com/golangplus/testing -https://github.com/golangplus/testing ----------------------------------------------------------------- -Copyright (c) 2015, Golang Plus -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of testing nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -================================================================ - -github.com/kr/pretty -https://github.com/kr/pretty ----------------------------------------------------------------- -The MIT License (MIT) - -Copyright 2012 Keith Rarick - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -================================================================ - -github.com/kr/text -https://github.com/kr/text ----------------------------------------------------------------- -Copyright 2012 Keith Rarick - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -================================================================ - github.com/mattn/go-isatty https://github.com/mattn/go-isatty ---------------------------------------------------------------- @@ -392,39 +285,6 @@ ================================================================ -github.com/pmezard/go-difflib -https://github.com/pmezard/go-difflib ----------------------------------------------------------------- -Copyright (c) 2013, Patrick Mezard -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - The names of its contributors may not be used to endorse or promote -products derived from this software without specific prior written -permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -================================================================ - github.com/saracen/walker https://github.com/saracen/walker ---------------------------------------------------------------- @@ -451,33 +311,6 @@ SOFTWARE. ================================================================ -github.com/stretchr/testify -https://github.com/stretchr/testify ----------------------------------------------------------------- -MIT License - -Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -================================================================ - github.com/urfave/cli/v3 https://github.com/urfave/cli/v3 ---------------------------------------------------------------- @@ -604,70 +437,6 @@ ================================================================ -golang.org/x/text -https://golang.org/x/text ----------------------------------------------------------------- -Copyright 2009 The Go Authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google LLC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -================================================================ - -gopkg.in/check.v1 -https://gopkg.in/check.v1 ----------------------------------------------------------------- -Gocheck - A rich testing framework for Go - -Copyright (c) 2010-2013 Gustavo Niemeyer <[email protected]> - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -================================================================ - gopkg.in/yaml.v3 https://gopkg.in/yaml.v3 ---------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/Makefile new/ghq-1.11.2/Makefile --- old/ghq-1.10.1/Makefile 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/Makefile 2026-09-29 18:59:55.000000000 +0200 @@ -1,4 +1,3 @@ -VERSION = $(shell godzil show-version) CURRENT_REVISION = $(shell git rev-parse --short HEAD) BUILD_LDFLAGS = "-s -w -X main.revision=$(CURRENT_REVISION)" VERBOSE_FLAG = $(if $(VERBOSE),-v) @@ -6,17 +5,18 @@ .PHONY: deps deps: - go get ${u} $(VERBOSE_FLAG) - go mod tidy + go get ${u} + +.PHONY: credits-deps +credits-deps: + go install github.com/Songmu/gocredits/cmd/[email protected] .PHONY: devel-deps -devel-deps: deps - go install github.com/Songmu/godzil/cmd/godzil@latest - go install github.com/tcnksm/ghr@latest +devel-deps: go install honnef.co/go/tools/cmd/staticcheck@latest .PHONY: test -test: deps +test: go test $(VERBOSE_FLAG) ./... .PHONY: lint @@ -24,28 +24,18 @@ staticcheck ./... .PHONY: build -build: deps +build: go build $(VERBOSE_FLAG) -ldflags=$(BUILD_LDFLAGS) .PHONY: install -install: deps +install: go install $(VERBOSE_FLAG) -ldflags=$(BUILD_LDFLAGS) -.PHONY: release -release: devel-deps - godzil release - -CREDITS: devel-deps go.sum - godzil credits -w - -DIST_DIR = dist/v$(VERSION) -.PHONY: crossbuild -crossbuild: CREDITS - rm -rf $(DIST_DIR) - env CGO_ENABLED=0 godzil crossbuild -build-ldflags=$(BUILD_LDFLAGS) \ - -include='misc/bash/_ghq','misc/zsh/_ghq' -z -d $(DIST_DIR) - cd $(DIST_DIR) && shasum $$(find * -type f -maxdepth 0) > SHASUMS - -.PHONY: upload -upload: - ghr -body="$$(godzil changelog --latest -F markdown)" v$(VERSION) $(DIST_DIR) +.PHONY: prepare-release +prepare-release: credits-deps + go mod tidy + gocredits -w + git update-index --add --remove -- go.mod go.sum CREDITS + +CREDITS: go.sum credits-deps + gocredits -w diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/README.adoc new/ghq-1.11.2/README.adoc --- old/ghq-1.10.1/README.adoc 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/README.adoc 2026-09-29 18:59:55.000000000 +0200 @@ -16,7 +16,7 @@ == SYNOPSIS [verse] -ghq get [-u] [-p] [--shallow] [--vcs <vcs>] [--look] [--silent] [--branch] [--no-recursive] [--bare] [--partial blobless|treeless] <repository URL>|<host>/<user>/<project>|<user>/<project>|<project> +ghq get [-u] [-p] [--shallow] [--vcs <vcs>] [--look] [--silent] [--branch] [--no-recursive] [--bare] [--clean-bare] [--partial blobless|treeless] <repository URL>|<host>/<user>/<project>|<user>/<project>|<project> ghq list [-p] [-e] [<query>] ghq create [--vcs <vcs>] <repository URL>|<host>/<user>/<project>|<user>/<project>|<project> ghq rm [--dry-run] <repository URL>|<host>/<user>/<project>|<user>/<project>|<project> @@ -45,7 +45,25 @@ The 'ghq' gets the git repository recursively by default. + We can prevent it with '--no-recursive' option. With '--bare' option, a "bare clone" will be performed (for Git - repositories only, 'git clone --bare ...' eg.). + + repositories only, 'git clone --bare ...' eg.). The on-disk directory + receives a '.git' suffix (e.g. '<root>/host/user/repo.git'). + + With '--clean-bare' option, a bare clone is performed but the bare + gitdir is placed as a '.git' subdirectory of an unsuffixed parent + (e.g. '<root>/host/user/repo/.git'). This layout keeps the repository + directory name clean and allows Git worktrees to live as sibling + subdirectories: ++ +.... +repo/ +├── .git/ # bare repository +├── main/ # worktree +├── feature/ # worktree +└── bugfix/ # worktree +.... ++ +'--clean-bare' implies '--bare'. Passing both together is not an error: +'--bare' is ignored (with a warning) and the clone follows the +'--clean-bare' layout. + With '--partial' option, a "partial clone" will be performed (for Git repositories only, in 'blobless' mode, 'git clone --filter=blob:none ...', in 'treeless' mode, 'git clone --filter=tree:0 ...' eg.). @@ -117,6 +135,10 @@ you can specify a repository-specific root directory instead of the common ghq root directory. + The URL is matched against '<url>' using 'git config --get-urlmatch'. +Since `ghq get` runs `git clone` for Git repositories, git's own configuration applies as +well. For example, `clone.defaultRemoteName` changes the name of the created remote, which +is `origin` by default. + +To get this configuration variable effective, you will need Git 2.30 or higher. === Example configuration (.gitconfig): @@ -204,6 +226,13 @@ mise use ghq ---- +=== https://github.com/nixos/nixpkgs[nixpkgs] + +---- +nix run nixpkgs#ghq # run ghq once +nix profile install nixpkgs#ghq # install ghq to your profile +---- + === build ---- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/cmd_create.go new/ghq-1.11.2/cmd_create.go --- old/ghq-1.10.1/cmd_create.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/cmd_create.go 2026-09-29 18:59:55.000000000 +0200 @@ -26,7 +26,7 @@ return err } - localRepo, err := LocalRepositoryFromURL(u, bare) + localRepo, err := LocalRepositoryFromURL(u, bareModeFromClassicBool(bare)) if err != nil { return err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/cmd_get.go new/ghq-1.11.2/cmd_get.go --- old/ghq-1.10.1/cmd_get.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/cmd_get.go 2026-09-29 18:59:55.000000000 +0200 @@ -22,11 +22,26 @@ func doGet(ctx context.Context, cmd *cli.Command) error { var ( - args = cmd.Args().Slice() - andLook = cmd.Bool("look") - parallel = cmd.Bool("parallel") - silent = cmd.Bool("silent") + args = cmd.Args().Slice() + andLook = cmd.Bool("look") + parallel = cmd.Bool("parallel") + silent = cmd.Bool("silent") + bare = cmd.Bool("bare") + cleanBare = cmd.Bool("clean-bare") ) + // --clean-bare implies --bare. When both are set the intent is + // unambiguous but the classic --bare is redundant; emit a warning + // so users don't get silently different behavior than they typed. + if bare && cleanBare { + logger.Log("warning", "--bare is redundant when --clean-bare is set; ignoring --bare") + } + bareMode := BareNone + switch { + case cleanBare: + bareMode = BareClean + case bare: + bareMode = BareClassic + } g := &getter{ update: cmd.Bool("update"), shallow: cmd.Bool("shallow"), @@ -35,7 +50,7 @@ silent: silent, branch: cmd.String("branch"), recursive: !cmd.Bool("no-recursive"), - bare: cmd.Bool("bare"), + bareMode: bareMode, partial: cmd.String("partial"), } if parallel { @@ -104,7 +119,7 @@ } if andLook { if argCnt > 1 && firstArg != "" { - return look(firstArg, g.bare) + return look(firstArg, g.bareMode) } if argCnt == 1 && getInfo.localRepository != nil { return lookByLocalRepository(getInfo.localRepository) @@ -148,7 +163,7 @@ return "/bin/sh" } -func look(name string, bare bool) error { +func look(name string, mode BareMode) error { var ( reposFound []*LocalRepository mu sync.Mutex @@ -165,7 +180,7 @@ if len(reposFound) == 0 { if url, err := newURL(name, false, false); err == nil { - repo, err := LocalRepositoryFromURL(url, bare) + repo, err := LocalRepositoryFromURL(url, mode) if err != nil { return err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/cmd_get_test.go new/ghq-1.11.2/cmd_get_test.go --- old/ghq-1.10.1/cmd_get_test.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/cmd_get_test.go 2026-09-29 18:59:55.000000000 +0200 @@ -223,6 +223,70 @@ } }, }, { + name: "clean-bare", + scenario: func(t *testing.T, tmpRoot string, cloneArgs *_cloneArgs, updateArgs *_updateArgs) { + localDir := filepath.Join(tmpRoot, "github.com", "motemen", "ghq-test-repo", ".git") + + app.Run(context.Background(), []string{"", "get", "--clean-bare", "motemen/ghq-test-repo"}) + + expect := "https://github.com/motemen/ghq-test-repo" + if cloneArgs.remote.String() != expect { + t.Errorf("got: %s, expect: %s", cloneArgs.remote, expect) + } + if filepath.ToSlash(cloneArgs.local) != filepath.ToSlash(localDir) { + t.Errorf("got: %s, expect: %s", filepath.ToSlash(cloneArgs.local), filepath.ToSlash(localDir)) + } + // --clean-bare implies --bare at the git-invocation layer: + // the resulting repo must be a bare git repository. + if !cloneArgs.bare { + t.Errorf("cloneArgs.bare should be true (--clean-bare implies --bare)") + } + }, + }, { + name: "bare and clean-bare together (clean-bare wins, warns on --bare)", + scenario: func(t *testing.T, tmpRoot string, cloneArgs *_cloneArgs, updateArgs *_updateArgs) { + localDir := filepath.Join(tmpRoot, "github.com", "motemen", "ghq-test-repo", ".git") + + // --clean-bare implies --bare; passing both should emit a + // warning and still perform a clean-bare clone. We do not + // assert on the warning text here because logger output is + // bound to the original os.Stderr at package init and does + // not follow the test's stderr redirection reliably. + app.Run(context.Background(), []string{"", "get", "--bare", "--clean-bare", "motemen/ghq-test-repo"}) + + expect := "https://github.com/motemen/ghq-test-repo" + if cloneArgs.remote.String() != expect { + t.Errorf("got: %s, expect: %s", cloneArgs.remote, expect) + } + // When both flags are set, --clean-bare must control the layout. + if filepath.ToSlash(cloneArgs.local) != filepath.ToSlash(localDir) { + t.Errorf("got: %s, expect: %s (clean-bare must win over bare)", filepath.ToSlash(cloneArgs.local), filepath.ToSlash(localDir)) + } + if !cloneArgs.bare { + t.Errorf("cloneArgs.bare should be true") + } + }, + }, { + name: "already cloned clean-bare with -update", + scenario: func(t *testing.T, tmpRoot string, cloneArgs *_cloneArgs, updateArgs *_updateArgs) { + // Clean-bare layout: repo/ with a .git subdirectory that is + // itself a bare gitdir. Path resolution treats this as a + // normal-looking repo; the update path must still target the + // parent (not the .git subdir) and pass bare=true to the VCS + // backend so it invokes the bare-repo fetch codepath. + parentDir := filepath.Join(tmpRoot, "github.com", "motemen", "ghq-test-repo") + os.MkdirAll(filepath.Join(parentDir, ".git"), 0755) + + app.Run(context.Background(), []string{"", "get", "--clean-bare", "-update", "motemen/ghq-test-repo"}) + + if filepath.ToSlash(updateArgs.local) != filepath.ToSlash(parentDir) { + t.Errorf("updateArgs.local got: %s, expect: %s", filepath.ToSlash(updateArgs.local), filepath.ToSlash(parentDir)) + } + if !updateArgs.bare { + t.Errorf("updateArgs.bare should be true (--clean-bare implies --bare)") + } + }, + }, { name: "silent mode", scenario: func(t *testing.T, tmpRoot string, cloneArgs *_cloneArgs, updateArgs *_updateArgs) { localDir := filepath.Join(tmpRoot, "github.com", "motemen", "ghq-test-repo") @@ -437,13 +501,13 @@ t.Errorf("lastCmd.Env[len(lastCmd.Env)-1]: got: %s, expect: %s", gotEnv, expectEnv) } - err = look("github.com/motemen/_unknown", false) + err = look("github.com/motemen/_unknown", BareNone) expect := "no repository found" if !strings.HasPrefix(fmt.Sprintf("%s", err), expect) { t.Errorf("error should has prefix %q, but: %s", expect, err) } - err = look("gobump", false) + err = look("gobump", BareNone) expect = "More than one repositories are found; Try more precise name" if !strings.HasPrefix(fmt.Sprintf("%s", err), expect) { t.Errorf("error should has prefix %q, but: %s", expect, err) @@ -483,13 +547,13 @@ t.Errorf("lastCmd.Env[len(lastCmd.Env)-1]: got: %s, expect: %s", gotEnv, expectEnv) } - err = look("github.com/motemen/ghq", false) + err = look("github.com/motemen/ghq", BareNone) expect := "no repository found" if !strings.HasPrefix(fmt.Sprintf("%s", err), expect) { t.Errorf("error should has prefix %q, but: %s", expect, err) } - err = look("github.com/motemen/gobump.git", true) + err = look("github.com/motemen/gobump.git", BareClassic) expect = "no repository found" if !strings.HasPrefix(fmt.Sprintf("%s", err), expect) { t.Errorf("error should has prefix %q, but: %s", expect, err) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/cmd_list.go new/ghq-1.11.2/cmd_list.go --- old/ghq-1.10.1/cmd_list.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/cmd_list.go 2026-09-29 18:59:55.000000000 +0200 @@ -28,7 +28,7 @@ if query != "" { if hasSchemePattern.MatchString(query) || scpLikeURLPattern.MatchString(query) { if url, err := newURL(query, false, false); err == nil { - if repo, err := LocalRepositoryFromURL(url, bare); err == nil { + if repo, err := LocalRepositoryFromURL(url, bareModeFromClassicBool(bare)); err == nil { query = filepath.ToSlash(repo.RelPath) } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/cmd_migrate.go new/ghq-1.11.2/cmd_migrate.go --- old/ghq-1.10.1/cmd_migrate.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/cmd_migrate.go 2026-09-29 18:59:55.000000000 +0200 @@ -72,7 +72,7 @@ } // Derive destination path - localRepo, err := LocalRepositoryFromURL(u, false) + localRepo, err := LocalRepositoryFromURL(u, BareNone) if err != nil { return fmt.Errorf("failed to derive destination path: %w", err) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/cmd_rm.go new/ghq-1.11.2/cmd_rm.go --- old/ghq-1.10.1/cmd_rm.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/cmd_rm.go 2026-09-29 18:59:55.000000000 +0200 @@ -28,7 +28,7 @@ return err } - localRepo, err := LocalRepositoryFromURL(u, bare) + localRepo, err := LocalRepositoryFromURL(u, bareModeFromClassicBool(bare)) if err != nil { return err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/cmd_rm_test.go new/ghq-1.11.2/cmd_rm_test.go --- old/ghq-1.10.1/cmd_rm_test.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/cmd_rm_test.go 2026-09-29 18:59:55.000000000 +0200 @@ -41,13 +41,25 @@ name: "simple", input: []string{"rm", "motemen/ghqq"}, setup: func(t *testing.T) { - os.MkdirAll(filepath.Join(tmpd, "github.com", "motemen", "ghqq"), 0755) + if err := os.MkdirAll(filepath.Join(tmpd, "github.com", "motemen", "ghqq", ".git"), 0755); err != nil { + t.Fatal(err) + } }, expectErr: false, }, { - name: "empty directory", - input: []string{"rm", "motemen/ghqqq"}, + name: "empty directory", + input: []string{"rm", "motemen/ghqqq"}, + setup: func(t *testing.T) { + if err := os.MkdirAll(filepath.Join(tmpd, "github.com", "motemen", "ghqqq"), 0755); err != nil { + t.Fatal(err) + } + }, + expectErr: true, + }, + { + name: "missing directory", + input: []string{"rm", "motemen/missing"}, setup: func(t *testing.T) {}, expectErr: true, }, @@ -87,6 +99,21 @@ if tc.cmdRun != nil { cmdutil.CommandRunner = tc.cmdRun } + + var runErr error + _, _, err := captureWithInput([]string{"y"}, func() { + a := newApp() + args := append([]string{"ghq"}, tc.input...) + runErr = a.Run(context.Background(), args) + }) + + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + if gotErr := runErr != nil; gotErr != tc.expectErr { + t.Fatalf("error = %v, expectErr = %v", runErr, tc.expectErr) + } }) } } @@ -119,7 +146,9 @@ name: "simple", input: []string{"rm", "--dry-run", "motemen/ghqq"}, setup: func(t *testing.T) { - os.MkdirAll(filepath.Join(tmpd, "github.com", "motemen", "ghqq"), 0755) + if err := os.MkdirAll(filepath.Join(tmpd, "github.com", "motemen", "ghqq", ".git"), 0755); err != nil { + t.Fatal(err) + } }, expectErr: false, }, @@ -139,9 +168,9 @@ }, { name: "permission denied", - input: []string{"rm", "--dry-run", "motemen/ghqq"}, + input: []string{"rm", "--dry-run", "motemen/ghq-notpermitted"}, setup: func(t *testing.T) { - f := filepath.Join(tmpd, "github.com", "motemen", "ghqq") + f := filepath.Join(tmpd, "github.com", "motemen", "ghq-notpermitted") os.MkdirAll(f, 0000) t.Cleanup(func() { os.Chmod(f, 0755) @@ -165,6 +194,21 @@ if tc.cmdRun != nil { cmdutil.CommandRunner = tc.cmdRun } + + var runErr error + _, _, err := capture(func() { + a := newApp() + args := append([]string{"ghq"}, tc.input...) + runErr = a.Run(context.Background(), args) + }) + + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + if gotErr := runErr != nil; gotErr != tc.expectErr { + t.Fatalf("error = %v, expectErr = %v", runErr, tc.expectErr) + } }) } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/commands.go new/ghq-1.11.2/commands.go --- old/ghq-1.10.1/commands.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/commands.go 2026-09-29 18:59:55.000000000 +0200 @@ -41,6 +41,7 @@ Usage: "Specify `branch` name. This flag implies --single-branch on Git"}, &cli.BoolFlag{Name: "parallel", Aliases: []string{"P"}, Usage: "Import parallelly"}, &cli.BoolFlag{Name: "bare", Usage: "Do a bare clone"}, + &cli.BoolFlag{Name: "clean-bare", Usage: "Do a clean bare clone (bare gitdir as a .git subdirectory of the repo directory). Implies --bare."}, &cli.StringFlag{ Name: "partial", Usage: "Do a partial clone. Can specify either \"blobless\" or \"treeless\"", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/commands_test.go new/ghq-1.11.2/commands_test.go --- old/ghq-1.10.1/commands_test.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/commands_test.go 2026-09-29 18:59:55.000000000 +0200 @@ -20,6 +20,7 @@ type _updateArgs struct { local string + bare bool } func withFakeGitBackend(t *testing.T, block func(*testing.T, string, *_cloneArgs, *_updateArgs)) { @@ -49,6 +50,7 @@ Update: func(vg *vcsGetOption) error { updateArgs = _updateArgs{ local: vg.dir, + bare: vg.bare, } return nil }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/getter.go new/ghq-1.11.2/getter.go --- old/ghq-1.10.1/getter.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/getter.go 2026-09-29 18:59:55.000000000 +0200 @@ -25,8 +25,9 @@ } type getter struct { - update, shallow, silent, ssh, recursive, bare bool - vcs, branch, partial string + update, shallow, silent, ssh, recursive bool + bareMode BareMode + vcs, branch, partial string } func (g *getter) get(ctx context.Context, argURL string) (getInfo, error) { @@ -51,7 +52,7 @@ // If isShallow is true, does shallow cloning. (no effect if already cloned or the VCS is Mercurial and git-svn) func (g *getter) getRemoteRepository(ctx context.Context, remote RemoteRepository, branch string) (getInfo, error) { remoteURL := remote.URL() - local, err := LocalRepositoryFromURL(remoteURL, g.bare) + local, err := LocalRepositoryFromURL(remoteURL, g.bareMode) if err != nil { return getInfo{}, err } @@ -97,7 +98,19 @@ localRepoRoot = filepath.Join(local.RootPath, remoteURL.Hostname(), l) } - if g.bare { + // localRepoRoot at this point does NOT include the bare-mode + // suffix (detectLocalRepoRoot strips ".git" if present); the + // switch below adds it (either as a suffix on the leaf directory + // or as a ".git" subdirectory). + switch g.bareMode { + case BareClean: + // Clean-bare: the bare gitdir lives inside the leaf directory + // as ".git" (repo/.git), so we join rather than concatenate. + localRepoRoot = filepath.Join(localRepoRoot, ".git") + case BareClassic: + // Classic bare: the leaf directory itself is the bare gitdir + // (repo -> repo.git), so we suffix the leaf and deliberately + // do NOT use filepath.Join, which would create a new segment. localRepoRoot = localRepoRoot + ".git" } @@ -113,7 +126,7 @@ silent: g.silent, branch: branch, recursive: g.recursive, - bare: g.bare, + bare: g.bareMode != BareNone, partial: g.partial, }) } @@ -134,7 +147,7 @@ dir: localRepoRoot, silent: g.silent, recursive: g.recursive, - bare: g.bare, + bare: g.bareMode != BareNone, }) } return info, nil diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/go.mod new/ghq-1.11.2/go.mod --- old/ghq-1.10.1/go.mod 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/go.mod 2026-09-29 18:59:55.000000000 +0200 @@ -4,13 +4,13 @@ require ( github.com/Songmu/gitconfig v0.2.2 - github.com/mattn/go-isatty v0.0.20 + github.com/mattn/go-isatty v0.0.24 github.com/motemen/go-colorine v0.0.0-20180816141035-45d19169413a github.com/otiai10/copy v1.14.1 github.com/saracen/walker v0.1.4 - github.com/urfave/cli/v3 v3.7.0 - golang.org/x/net v0.52.0 - golang.org/x/sync v0.20.0 + github.com/urfave/cli/v3 v3.13.0 + golang.org/x/net v0.59.0 + golang.org/x/sync v0.23.0 ) require ( @@ -23,7 +23,7 @@ github.com/cli/safeexec v1.0.1 // indirect github.com/daviddengcn/go-colortext v1.0.0 // indirect github.com/goccy/go-yaml v1.19.2 // indirect - golang.org/x/sys v0.42.0 // indirect - golang.org/x/text v0.35.0 + golang.org/x/sys v0.48.0 // indirect + golang.org/x/text v0.42.0 gopkg.in/yaml.v3 v3.0.1 // indirect ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/go.sum new/ghq-1.11.2/go.sum --- old/ghq-1.10.1/go.sum 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/go.sum 2026-09-29 18:59:55.000000000 +0200 @@ -5,8 +5,6 @@ github.com/cli/safeexec v1.0.1 h1:e/C79PbXF4yYTN/wauC4tviMxEV13BwljGj0N9j+N00= github.com/cli/safeexec v1.0.1/go.mod h1:Z/D4tTN8Vs5gXYHDCbaM1S/anmEDnJb1iW0+EJ5zx3Q= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/daviddengcn/go-colortext v1.0.0 h1:ANqDyC0ys6qCSvuEK7l3g5RaehL/Xck9EX8ATG8oKsE= github.com/daviddengcn/go-colortext v1.0.0/go.mod h1:zDqEI5NVUop5QPpVJUxE9UO10hRnmkD5G4Pmri9+m4c= github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= @@ -20,31 +18,30 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= +github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= github.com/motemen/go-colorine v0.0.0-20180816141035-45d19169413a h1:CONqI/36EjYzkAzrMD0UWuL/lRDr7UdoID4fDGke+Yc= github.com/motemen/go-colorine v0.0.0-20180816141035-45d19169413a/go.mod h1:PU2urRC7j30rrabSyp1MGGhyoiWSninPD8ckjzBSgkU= github.com/otiai10/copy v1.14.1 h1:5/7E6qsUMBaH5AnQ0sSLzzTg1oTECmcCmT6lvF45Na8= github.com/otiai10/copy v1.14.1/go.mod h1:oQwrEDDOci3IM8dJF0d8+jnbfPDllW6vUjNc3DoZm9I= github.com/otiai10/mint v1.6.3 h1:87qsV/aw1F5as1eH1zS/yqHY85ANKVMgkDrf9rcxbQs= github.com/otiai10/mint v1.6.3/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/saracen/walker v0.1.4 h1:/WCOt98GRkQ0KgL6hXJFBpoH21XY6iCD2N6LQWBFiaU= github.com/saracen/walker v0.1.4/go.mod h1:2F+hfOidTHfXP2AmlKOqpO+yewf8fIvNUDBNJogpJbk= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -github.com/urfave/cli/v3 v3.7.0 h1:AGSnbUyjtLiM+WJUb4dzXKldl/gL+F8OwmRDtVr6g2U= -github.com/urfave/cli/v3 v3.7.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= -golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0= -golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw= -golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= -golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= -golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= -golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= +github.com/urfave/cli/v3 v3.13.0 h1:Dr6jqMfIyyFsRVn7Nz5mqLsMY+ZMpfh3a0aMs+umPVY= +github.com/urfave/cli/v3 v3.13.0/go.mod h1:vXn6HxPNccJSzQr2QvwVncOKrgYGIHU0HY5h8B2nQj4= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= +golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues= +golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg= +golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= +golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= +golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= +golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= +golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI= +golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/local_repository.go new/ghq-1.11.2/local_repository.go --- old/ghq-1.10.1/local_repository.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/local_repository.go 2026-09-29 18:59:55.000000000 +0200 @@ -72,14 +72,47 @@ }, nil } +// BareMode selects the on-disk layout of a bare-cloned repository. +// It is used by LocalRepositoryFromURL to decide how (or whether) the +// ".git" suffix appears in the resolved path. The illegal state +// "bare with no known layout" is unrepresentable by construction. +type BareMode int + +const ( + // BareNone represents a normal (non-bare) clone. The on-disk path + // matches the repository name with no ".git" suffix + // (e.g. "<root>/host/user/repo"). + BareNone BareMode = iota + // BareClassic represents the classic bare layout, where the on-disk + // directory name itself gets a ".git" suffix + // (e.g. "<root>/host/user/repo.git"). + BareClassic + // BareClean represents the "clean bare" layout, where the bare gitdir + // lives as a ".git" subdirectory of an unsuffixed parent + // (e.g. "<root>/host/user/repo/.git"). From ghq's path-resolution + // perspective this is indistinguishable from BareNone; the ".git" + // subdirectory is created by the git backend at clone time. + BareClean +) + +// bareModeFromClassicBool is a compatibility helper for commands that +// expose only the classic --bare flag (list, rm, create, migrate). +// It returns BareClassic when bare is true, otherwise BareNone. +func bareModeFromClassicBool(bare bool) BareMode { + if bare { + return BareClassic + } + return BareNone +} + // LocalRepositoryFromURL resolve LocalRepository from URL -func LocalRepositoryFromURL(remoteURL *url.URL, bare bool) (*LocalRepository, error) { +func LocalRepositoryFromURL(remoteURL *url.URL, mode BareMode) (*LocalRepository, error) { pathParts := append( []string{remoteURL.Hostname()}, strings.Split(remoteURL.Path, "/")..., ) relPath := strings.TrimSuffix(filepath.Join(pathParts...), ".git") pathParts[len(pathParts)-1] = strings.TrimSuffix(pathParts[len(pathParts)-1], ".git") - if bare { + if mode == BareClassic { // Force to append ".git" even if remoteURL does not end with ".git". relPath = relPath + ".git" pathParts[len(pathParts)-1] = pathParts[len(pathParts)-1] + ".git" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/local_repository_test.go new/ghq-1.11.2/local_repository_test.go --- old/ghq-1.10.1/local_repository_test.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/local_repository_test.go 2026-09-29 18:59:55.000000000 +0200 @@ -123,7 +123,7 @@ defer func(orig string) { _home = orig }(_home) _home = "" homeOnce = &sync.Once{} - r, err := LocalRepositoryFromURL(mustParseURL(tc.url), false) + r, err := LocalRepositoryFromURL(mustParseURL(tc.url), BareNone) if err != nil { t.Errorf("error should be nil but: %s", err) } @@ -134,6 +134,77 @@ } } +func TestLocalRepositoryFromURL_BareMode(t *testing.T) { + defer func(orig []string) { _localRepositoryRoots = orig }(_localRepositoryRoots) + tmproot := newTempDir(t) + _localRepositoryRoots = []string{tmproot} + + testCases := []struct { + name string + url string + mode BareMode + expect string + relPath string + }{{ + name: "normal (BareNone)", + url: "ssh://[email protected]/motemen/ghq.git", + mode: BareNone, + expect: filepath.Join(tmproot, "github.com/motemen/ghq"), + relPath: filepath.FromSlash("github.com/motemen/ghq"), + }, { + name: "classic bare", + url: "ssh://[email protected]/motemen/ghq.git", + mode: BareClassic, + expect: filepath.Join(tmproot, "github.com/motemen/ghq.git"), + relPath: filepath.FromSlash("github.com/motemen/ghq.git"), + }, { + name: "classic bare with URL missing .git suffix", + url: "ssh://[email protected]/motemen/ghq", + mode: BareClassic, + expect: filepath.Join(tmproot, "github.com/motemen/ghq.git"), + relPath: filepath.FromSlash("github.com/motemen/ghq.git"), + }, { + name: "clean bare", + url: "ssh://[email protected]/motemen/ghq.git", + mode: BareClean, + expect: filepath.Join(tmproot, "github.com/motemen/ghq"), + relPath: filepath.FromSlash("github.com/motemen/ghq"), + }, { + name: "clean bare with URL missing .git suffix", + url: "ssh://[email protected]/motemen/ghq", + mode: BareClean, + expect: filepath.Join(tmproot, "github.com/motemen/ghq"), + relPath: filepath.FromSlash("github.com/motemen/ghq"), + }} + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + defer func(orig string) { _home = orig }(_home) + _home = "" + homeOnce = &sync.Once{} + r, err := LocalRepositoryFromURL(mustParseURL(tc.url), tc.mode) + if err != nil { + t.Fatalf("error should be nil but: %s", err) + } + if r.FullPath != tc.expect { + t.Errorf("FullPath got: %s, expect: %s", r.FullPath, tc.expect) + } + if r.RelPath != tc.relPath { + t.Errorf("RelPath got: %s, expect: %s", r.RelPath, tc.relPath) + } + }) + } +} + +func TestBareModeFromClassicBool(t *testing.T) { + if bareModeFromClassicBool(true) != BareClassic { + t.Errorf("bareModeFromClassicBool(true) = %d, want BareClassic (%d)", bareModeFromClassicBool(true), BareClassic) + } + if bareModeFromClassicBool(false) != BareNone { + t.Errorf("bareModeFromClassicBool(false) = %d, want BareNone (%d)", bareModeFromClassicBool(false), BareNone) + } +} + func TestLocalRepositoryRoots(t *testing.T) { defer func(orig []string) { _localRepositoryRoots = orig }(_localRepositoryRoots) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/main.go new/ghq-1.11.2/main.go --- old/ghq-1.10.1/main.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/main.go 2026-09-29 18:59:55.000000000 +0200 @@ -9,7 +9,7 @@ "github.com/x-motemen/ghq/logger" ) -const version = "1.10.1" +const version = "1.11.2" var revision = "HEAD" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/misc/bash/_ghq new/ghq-1.11.2/misc/bash/_ghq --- old/ghq-1.10.1/misc/bash/_ghq 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/misc/bash/_ghq 2026-09-29 18:59:55.000000000 +0200 @@ -1,21 +1,84 @@ -function _ghq () { +_ghq() { local cur prev words cword _init_completion || return - case $cword in - 1) - COMPREPLY=( $(compgen -W "get list rm" -- $cur) );; - 2) - case $prev in - get) - COMPREPLY=( $(compgen -W "$(ghq list --unique)" -- $cur) );; + local subcommands="get clone list root rm create migrate help" + local global_opts="--help -h" + + if [[ $cword = 1 ]]; then + COMPREPLY=( $(compgen -W "$subcommands $global_opts --version -v" -- "$cur") ) + return 0 + fi + + local vcs_backends="git github codecommit svn subversion git-svn hg mercurial darcs pijul fossil bzr bazaar" + + case "${words[1]}" in + get|clone) + local opts="--update -u -p --shallow --look -l --vcs --silent -s --no-recursive --branch -b --parallel -P --bare --partial" + if [[ $cur = -* ]]; then + COMPREPLY=( $(compgen -W "$opts $global_opts" -- "$cur") ) + return 0 + fi + case "$prev" in + --branch|-b) + # expects branch name + ;; + --partial) + COMPREPLY=( $(compgen -W "blobless treeless" -- "$cur") );; + --vcs) + COMPREPLY=( $(compgen -W "$vcs_backends" -- "$cur") );; + *) + local arg + for arg in "${words[@]}"; do + case "$arg" in + --update|-u) + COMPREPLY=( $(compgen -W "$(ghq list)" -- "$cur") ) + break;; + esac + done;; + esac;; list) - COMPREPLY=( $(compgen -W "$(ghq list)" -- $cur) );; + local opts="--exact -e --vcs --full-path -p --unique --bare" + if [[ $cur = -* ]]; then + COMPREPLY=( $(compgen -W "$opts $global_opts" -- "$cur") ) + return 0 + fi + case "$prev" in + --vcs) + COMPREPLY=( $(compgen -W "$vcs_backends" -- "$cur") );; + esac;; + root) + local opts="--all" + if [[ $cur = -* ]]; then + COMPREPLY=( $(compgen -W "$opts $global_opts" -- "$cur") ) + return 0 + fi;; rm) - COMPREPLY=( $(compgen -W "$(ghq list)" -- $cur) );; - esac;; - *) - COMPREPLY=( $(compgen -W "$(ls)" -- $cur) );; + local opts="--dry-run --bare" + if [[ $cur = -* ]]; then + COMPREPLY=( $(compgen -W "$opts $global_opts" -- "$cur") ) + return 0 + fi + COMPREPLY=( $(compgen -W "$(ghq list)" -- "$cur") );; + create) + local opts="--vcs --bare" + if [[ $cur = -* ]]; then + COMPREPLY=( $(compgen -W "$opts $global_opts" -- "$cur") ) + return 0 + fi + case "$prev" in + --vcs) + COMPREPLY=( $(compgen -W "$vcs_backends" -- "$cur") );; + esac;; + migrate) + local opts="-y --dry-run" + if [[ $cur = -* ]]; then + COMPREPLY=( $(compgen -W "$opts $global_opts" -- "$cur") ) + return 0 + fi + _filedir -d;; + help) + COMPREPLY=( $(compgen -W "$subcommands $global_opts" -- "$cur") );; esac } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/misc/fish/ghq.fish new/ghq-1.11.2/misc/fish/ghq.fish --- old/ghq-1.10.1/misc/fish/ghq.fish 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/misc/fish/ghq.fish 2026-09-29 18:59:55.000000000 +0200 @@ -1,6 +1,6 @@ function __fish_ghq_needs_subcommand set -l cmd (commandline -opc) - for subcmd in get list rm root create h help + for subcmd in get clone list rm root create migrate h help if contains -- $subcmd $cmd return 1 end @@ -18,48 +18,57 @@ complete -c ghq -n __fish_ghq_needs_subcommand -s v -l version -d 'Print the version' # Global subcommands -complete -c ghq -n __fish_ghq_needs_subcommand -a get -d 'Clone/sync with a remote repository' +complete -c ghq -n __fish_ghq_needs_subcommand -a 'get clone' -d 'Clone/sync with a remote repository' complete -c ghq -n __fish_ghq_needs_subcommand -a list -d 'List local repositories' complete -c ghq -n __fish_ghq_needs_subcommand -a rm -d 'Remove local repository' complete -c ghq -n __fish_ghq_needs_subcommand -a root -d 'Show repositories\' root' complete -c ghq -n __fish_ghq_needs_subcommand -a create -d 'Create a new repository' +complete -c ghq -n __fish_ghq_needs_subcommand -a migrate -d 'Migrate existing repository to ghq-managed directory' complete -c ghq -n __fish_ghq_needs_subcommand -a 'h help' -d 'Shows a list of commands or help for one command' # Arguments for subcommands -complete -c ghq -n '__fish_seen_subcommand_from get' -s u -l update -d 'Update local repository if cloned already' -complete -c ghq -n '__fish_seen_subcommand_from get' -s p -d 'Clone with SSH' -complete -c ghq -n '__fish_seen_subcommand_from get' -l shallow -d 'Do a shallow clone' -complete -c ghq -n '__fish_seen_subcommand_from get' -s l -l look -d 'Look after get' -complete -c ghq -n '__fish_seen_subcommand_from get' -l vcs -d 'Specify vcs backend for cloning' -complete -c ghq -n '__fish_seen_subcommand_from get' -s s -l silent -d 'Clone or update silently' -complete -c ghq -n '__fish_seen_subcommand_from get' -l no-recursive -d 'Prevent recursive fetching' -complete -c ghq -n '__fish_seen_subcommand_from get' -s b -l branch -d 'Specify branch name. This flag implies --single-branch on Git' -complete -c ghq -n '__fish_seen_subcommand_from get' -s P -l parallel -d 'Import parallelly' -complete -c ghq -n '__fish_seen_subcommand_from get' -l bare -d 'Do a bare clone' +complete -c ghq -n '__fish_seen_subcommand_from get clone' -s u -l update -d 'Update local repository if cloned already' +complete -c ghq -n '__fish_seen_subcommand_from get clone' -s p -d 'Clone with SSH' +complete -c ghq -n '__fish_seen_subcommand_from get clone' -l shallow -d 'Do a shallow clone' +complete -c ghq -n '__fish_seen_subcommand_from get clone' -s l -l look -d 'Look after get' +complete -c ghq -n '__fish_seen_subcommand_from get clone' -l vcs -d 'Specify vcs backend for cloning' +complete -c ghq -n '__fish_seen_subcommand_from get clone' -s s -l silent -d 'Clone or update silently' +complete -c ghq -n '__fish_seen_subcommand_from get clone' -l no-recursive -d 'Prevent recursive fetching' +complete -c ghq -n '__fish_seen_subcommand_from get clone' -s b -l branch -d 'Specify branch name. This flag implies --single-branch on Git' +complete -c ghq -n '__fish_seen_subcommand_from get clone' -s P -l parallel -d 'Import parallelly' +complete -c ghq -n '__fish_seen_subcommand_from get clone' -l bare -d 'Do a bare clone' function __complete_get_partial printf '%s\t%s\n' 'blobless' 'Do a blobless clone' printf '%s\t%s\n' 'treeless' 'Do a treeless clone' end -complete -c ghq -n '__fish_seen_subcommand_from get' -l partial -d 'Do a partial clone' -xa '(__complete_get_partial)' +complete -c ghq -n '__fish_seen_subcommand_from get clone' -l partial -d 'Do a partial clone' -xa '(__complete_get_partial)' +# When updating an existing repository (-u/--update), complete with local repositories +complete -c ghq -n '__fish_seen_subcommand_from get clone' -n '__fish_seen_argument -s u -l update' -xa '(ghq list)' complete -c ghq -n '__fish_seen_subcommand_from list' -s e -l exact -d 'Perform an exact match' complete -c ghq -n '__fish_seen_subcommand_from list' -l vcs -d 'Specify vcs backend for matching' complete -c ghq -n '__fish_seen_subcommand_from list' -s p -l full-path -d 'Print full paths' complete -c ghq -n '__fish_seen_subcommand_from list' -l unique -d 'Print unique subpaths' +complete -c ghq -n '__fish_seen_subcommand_from list' -l bare -d 'Query bare repositories' complete -c ghq -n '__fish_seen_subcommand_from rm' -l dry-run -d 'Do not remove actually' +complete -c ghq -n '__fish_seen_subcommand_from rm' -l bare -d 'Remove a bare repository' complete -c ghq -n '__fish_seen_subcommand_from rm' -xa '(ghq list)' complete -c ghq -n '__fish_seen_subcommand_from root' -l all -d 'Show all roots' complete -c ghq -n '__fish_seen_subcommand_from create' -l vcs -d 'Specify vcs backend explicitly' +complete -c ghq -n '__fish_seen_subcommand_from create' -l bare -d 'Create a bare repository' + +complete -c ghq -n '__fish_seen_subcommand_from migrate' -s y -d 'Skip confirmation prompt' +complete -c ghq -n '__fish_seen_subcommand_from migrate' -l dry-run -d 'Show what would happen without moving' # Complete VCS backend options for supported subcommands -complete -c ghq -n '__fish_seen_subcommand_from get list create' -n '__fish_seen_argument --vcs' -l vcs -x -a 'git github codecommit' -d git -complete -c ghq -n '__fish_seen_subcommand_from get list create' -n '__fish_seen_argument --vcs' -l vcs -x -a 'svn subversion' -d subversion -complete -c ghq -n '__fish_seen_subcommand_from get list create' -n '__fish_seen_argument --vcs' -l vcs -x -a git-svn -d git-svn -complete -c ghq -n '__fish_seen_subcommand_from get list create' -n '__fish_seen_argument --vcs' -l vcs -x -a 'hg mercurial' -d mercurial -complete -c ghq -n '__fish_seen_subcommand_from get list create' -n '__fish_seen_argument --vcs' -l vcs -x -a darcs -d darcs -complete -c ghq -n '__fish_seen_subcommand_from get list create' -n '__fish_seen_argument --vcs' -l vcs -x -a pijul -d pijul -complete -c ghq -n '__fish_seen_subcommand_from get list create' -n '__fish_seen_argument --vcs' -l vcs -x -a fossil -d fossil -complete -c ghq -n '__fish_seen_subcommand_from get list create' -n '__fish_seen_argument --vcs' -l vcs -x -a 'bzr bazaar' -d bazaar +complete -c ghq -n '__fish_seen_subcommand_from get clone list create' -n '__fish_seen_argument --vcs' -l vcs -x -a 'git github codecommit' -d git +complete -c ghq -n '__fish_seen_subcommand_from get clone list create' -n '__fish_seen_argument --vcs' -l vcs -x -a 'svn subversion' -d subversion +complete -c ghq -n '__fish_seen_subcommand_from get clone list create' -n '__fish_seen_argument --vcs' -l vcs -x -a git-svn -d git-svn +complete -c ghq -n '__fish_seen_subcommand_from get clone list create' -n '__fish_seen_argument --vcs' -l vcs -x -a 'hg mercurial' -d mercurial +complete -c ghq -n '__fish_seen_subcommand_from get clone list create' -n '__fish_seen_argument --vcs' -l vcs -x -a darcs -d darcs +complete -c ghq -n '__fish_seen_subcommand_from get clone list create' -n '__fish_seen_argument --vcs' -l vcs -x -a pijul -d pijul +complete -c ghq -n '__fish_seen_subcommand_from get clone list create' -n '__fish_seen_argument --vcs' -l vcs -x -a fossil -d fossil +complete -c ghq -n '__fish_seen_subcommand_from get clone list create' -n '__fish_seen_argument --vcs' -l vcs -x -a 'bzr bazaar' -d bazaar diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/misc/zsh/_ghq new/ghq-1.11.2/misc/zsh/_ghq --- old/ghq-1.10.1/misc/zsh/_ghq 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/misc/zsh/_ghq 2026-09-29 18:59:55.000000000 +0200 @@ -15,13 +15,13 @@ case $state in (args) case $words[1] in - (get) + (get|clone) _arguments -C \ '(-u --update)'{-u,--update}'[Update local repository if cloned already]' \ '-p[Clone with SSH]' \ '--shallow[Do a shallow clone]' \ '(-l --look)'{-l,--look}'[Look after get]' \ - '--vcs[Specify vcs backend for cloning]' \ + '--vcs[Specify vcs backend for cloning]: :(git github codecommit svn subversion git-svn hg mercurial darcs pijul fossil bzr bazaar)' \ '(-s --silent)'{-s,--silent}'[Clone or update silently]' \ '--no-recursive[Prevent recursive fetching]' \ '--bare[Do a bare clone]' \ @@ -30,11 +30,14 @@ '--partial[Do a partial clone]: :(blobless treeless)' \ '(-)*:: :->null_state' \ && ret=0 + if (( ${words[(I)-u]} )) || (( ${words[(I)--update]} )); then + __ghq_all_repositories && ret=0 + fi ;; (list) _arguments -C \ '(-e --exact)'{-e,--exact}'[Perform an exact match]' \ - '--vcs[Specify vcs backend for matching]' \ + '--vcs[Specify vcs backend for matching]: :(git github codecommit svn subversion git-svn hg mercurial darcs pijul fossil bzr bazaar)' \ '(-p --full-path)'{-p,--full-path}'[Print full paths]' \ '--unique[Print unique subpaths]' \ '--bare[Query bare repositories]' \ @@ -49,7 +52,7 @@ ;; (create) _arguments -C \ - '--vcs[Specify vcs backend explicitly]' \ + '--vcs[Specify vcs backend explicitly]: :(git github codecommit svn subversion git-svn hg mercurial darcs pijul fossil bzr bazaar)' \ '--bare[Create a bare repository]' \ '(-)*:: :->null_state' \ && ret=0 @@ -94,12 +97,14 @@ local -a _c _c=( 'get:Clone/sync with a remote repository' + 'clone:Clone/sync with a remote repository' 'list:List local repositories' 'rm:Remove local repository' 'create:Create a new repository' 'migrate:Migrate existing repository to ghq-managed directory' "root:Show repositories' root" 'help:Show a list of commands or help for one command' + 'h:Show a list of commands or help for one command' ) _describe -t commands Commands _c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghq-1.10.1/vcs.go new/ghq-1.11.2/vcs.go --- old/ghq-1.10.1/vcs.go 2026-04-11 16:37:22.000000000 +0200 +++ new/ghq-1.11.2/vcs.go 2026-09-29 18:59:55.000000000 +0200 @@ -152,6 +152,13 @@ }, Init: func(dir string) error { args := []string{"init"} + // TODO(clean-bare): this HasSuffix check coincidentally works for + // classic bare (dir ends with ".git") but would misfire for the + // clean-bare layout, where dir is <root>/host/user/repo and the + // bare gitdir needs to be created inside it as ".git". If ghq + // create ever grows a --clean-bare flag, this decision needs an + // explicit signal (e.g. a bare/mode argument through the Init + // signature) rather than reading it off the path shape. if strings.HasSuffix(dir, ".git") { args = append(args, "--bare") } ++++++ vendor.tar.gz ++++++ ++++ 10028 lines of diff (skipped)
