Package: git-buildpackage
Version: 0.9.23
Severity: normal
X-Debbugs-Cc: deb...@microjoe.org

Dear Maintainer,

The debian/git-buildpackage.zsh-completion is full of duplicated
function implementations:

$ cat debian/git-buildpackage.zsh-completion| grep -E '.*() {' | sort | uniq -c
      2 _gbp() {
      2 __gbp_branch_options() {
      2 _gbp-buildpackage() {
      2 _gbp-clone() {
      2 __gbp_common_options() {
      1 _gbp-config() {
      2 _gbp-create-remote-repo() {
      2 _gbp-dch () {
      1 _gbp-export-orig() {
      2 _gbp-import-dsc() {
      2 _gbp-import-dscs() {
      2 _gbp-import-orig() {
      1 _gbp-import-ref() {
      2 _gbp-pq() {
      1 _gbp-pristine-tar() {
      2 _gbp-pull() {
      1 _gbp-push() {
      1 _gbp-tag() {
      2 __gbp_tag_format_options() {
      2 __gbp_tag_sign_options() {

In particular, the _gbp() function that is defined twice does define the
`tag` subcommand in one of the implementations, but not in the other.

This is leading to the following bogus completion behavior:

* start a new zsh instance
* type `gbp`
* press <Tab> to complete
* the `tag` option is displayed
* press <Tab> again to select one of the options
* the `tag` option dissapears and will never be suggested during the zsh
  session

I feel that the duplication of the functions is not intentional and that
it is the root cause of this behavior. The solution could be to remove
the duplicate implementations, by keeping the most complete ones, in
order to fix this issue.

BRs,

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.14.0-4-amd64 (SMP w/4 CPU threads)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages git-buildpackage depends on:
ii  devscripts             2.21.4
ii  git                    1:2.33.1-1
ii  man-db                 2.9.4-2
ii  python3                3.9.7-1
ii  python3-dateutil       2.8.1-6
ii  python3-pkg-resources  58.2.0-1
ii  sensible-utils         0.0.17

Versions of packages git-buildpackage recommends:
ii  pristine-tar      1.49
ii  python3-requests  2.25.1+dfsg-2
ii  sbuild            0.81.2

Versions of packages git-buildpackage suggests:
pn  python3-notify2  <none>
ii  sudo             1.9.5p2-3
ii  unzip            6.0-26

-- no debconf information

Reply via email to