Skip to content

Git panel Push status out of sync with repository even after triggering Fetch from Zed #61273

Description

@brokenthorn

Reproduction steps

  1. Start Zed
  2. Make changes in AI agent or otherwise
  3. Open Git panel
  4. Make visual note of Push button text
  5. From AI agent or CLI do a manual commit
  6. Push button in Zed should say "↑ 1 Push"
  7. Push from AI agent or CLI (alternative that still triggers is to have this step integrated in step 6)
  8. Note Push button still says "↑ 1 Push"
  9. Click caret on Push button and select Fetch
  10. Push button stays the same
  11. Run git status from CLI, note that there's no unpushed commits
  12. Push button still says the same
  13. Closing and reopening Git panel or switching sidebar panels doesn't fix it

Current vs. Expected behavior

Current behavior: Push button shows 1 unpushed commit and is enabled for clicking and can be clicked to trigger a push that effectively pushes nothing

Image

Expected behavior: Push button would always remain in sync with actual git status (with a respectable delay, such as 5s), and triggering Fetch sooner (repro step 9) should immediately update the button status if not already in sync.

Zed version and system specs

Zed: v1.11.3+stable (Zed)
OS: Linux Wayland cachyos
Memory: 15.5 GiB
Architecture: x86_64
GPU: NVIDIA GeForce RTX 2070 || NVIDIA || 610.43.03

Attach Zed log file

Zed.log

Relevant Zed settings

settings.json
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
  // User Interface:
  "cli_default_open_behavior": "new_window",
  "inlay_hints": {
    "toggle_on_modifiers_press": {
      // `ctrl-shift + ;` toggles hints permanently, so it makes sense to use
      // the same modifiers for temporary toggle:
      "control": true,
      "shift": true,
    },
  },
  "git_panel": {
    "sort_by_path": true,
    "tree_view": true,
  },
  "icon_theme": {
    "mode": "system",
    "light": "Catppuccin Latte",
    "dark": "Zed (Default)",
  },
  "theme": {
    "mode": "system",
    "light": "Catppuccin Latte",
    "dark": "Kanagawa Wave",
  },
  "agent_buffer_font_size": 18, // default 12
  "ui_font_family": "JetBrains Mono NL",
  "ui_font_size": 18,
  "ui_font_weight": 300,
  "buffer_font_family": "JetBrains Mono NL",
  "buffer_font_size": 18, // default 15
  "buffer_font_weight": 300,
  "terminal": {
    "toolbar": { "breadcrumbs": true },
    "font_size": 18, // default same as buffer
    "font_weight": 300,
    // "font_family": "JetBrains Mono", // same as buffer
  },

  // Other options:
  "soft_wrap": "editor_width",
  "vim_mode": true,
  "cursor_blink": false,
  "base_keymap": "SublimeText",
  "relative_line_numbers": "enabled",
  "diff_view_style": "unified",
  "session": { "trust_all_worktrees": true },

  // AI Agents:
  "agent_servers": {},
  "agent": {
    "default_profile": "ask",
    "default_model": {
      "effort": "minimal",
      "provider": "google",
      "model": "gemini-3.1-flash-lite",
      "enable_thinking": true,
    },
  },

  // Languages
  "languages": {
    "TOML": {
      "preferred_line_length": 120,
    },
    "Markdown": {
      "preferred_line_length": 120,
    },
  },

  // Language servers:
  "lsp": {
    "vtsls": {
      "settings": {
        "typescript": {
          "updateImportsOnFileMove": {
            "enabled": "always",
          },
        },
        "javascript": {
          "updateImportsOnFileMove": {
            "enabled": "always",
          },
        },
      },
      "enable_lsp_tasks": true,
    },
    "rust-analyzer": {
      "enable_lsp_tasks": true,
      // "fetch": { "pre_release": true, },
      // "binary": { "ignore_system_version": true, },
      "initialization_options": {
        "checkOnSave": true,
        // "check": {
        //   "workspace": false,
        // },
        "diagnostics": { "styleLints": { "enable": true } },
        "inlayHints": {
          "closureReturnTypeHints": { "enable": "always" },
          "lifetimeElisionHints": {
            "enable": "skip_trivial",
            "useParameterNames": true,
          },
          "maxLength": null,
        },
        // "rust": { "analyzerTargetDir": true },
      },
    },
  },
}

Relevant Keymap

keymap.json

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:needs triagetriage is not complete: no `area:*` label, or no `priority:*`/`frequency:*` for Bugs/Crashes

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions