Push fails silently

Open
#80 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
git, rust
Domain
cli, tooling

Research direction

Start at git-meta-lib/src/push.rs around line 199, then reproduce the failure with ti sync against a remote whose git hook denies the push. Compare the sync output with git push output and verify that hook output and the failed push status are reflected instead of reporting success.

Written by the indexing model from the issue text.

Description

Context

When pushing tickets to a git server that uses git hooks, ti does not forward remote hook stdout and stderr.
In addition to that, ti does not account for failed hook related pushes.

Example

ti output when syncing to remote with a hook that denies push :

$ ti sync
Remote: origin
Ref: refs/meta/main
URL: http://localhost:8010/test-repo
Pull: no new tickets.
Push: 1 ticket(s) synced.
Done.

Git push output with the same hook :

$ git push
Énumération des objets: 8, fait.
Décompte des objets: 100% (8/8), fait.
Compression par delta en utilisant jusqu'à 12 fils d'exécution
Compression des objets: 100% (6/6), fait.
Écriture des objets: 100% (6/6), 1.45 KiO | 1.45 MiO/s, fait.
Total 6 (delta 3), réutilisés 0 (delta 0), réutilisés du paquet 0 (depuis 0)
remote: error: hook declined to update refs/heads/main
To http://localhost:8010/test-repo
 ! [remote rejected] main -> main (hook declined)
erreur : impossible de pousser des références vers 'http://localhost:8010/test-repo'

Cause

This probably has to do with the following line in git-meta-lib.

[!note]
The failing hook does not contain any of the expressions used in this line.

Dominant language
Rust
Stars
523
Forks
242
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from schacon/ticgit

All issues in schacon/ticgit

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.