[PATCH 0/2] add an advice on unqualified <dst> push

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Years ago I accidentally deleted the "master" branch at work (due to
git push origin $emptyvar:master), and while I could tell from the
reflogs what SHA-1 I needed on the other side ran into the fairly
cryptic error message, certainly to me when the adrenaline is flowing
and you've just ruined something in production.

So this series makes that error message better, and suggests to the
user how they can fix the situation, first I needed to mark some
strings in remote.c for i18n.

It would be better if we could just give the user a full command to
copy/paste, i.e. what the ran but with refs/{heads,tags}/<their-ref>,
but between passing the remote name down, and handling any push
options I think it's better for now just to suggest the refspec.

Ævar Arnfjörð Bjarmason (2):
  i18n: remote.c: mark error(...) messages for translation
  push: add an advice on unqualified <dst> push

 Documentation/config.txt |  7 ++++
 advice.c                 |  2 +
 advice.h                 |  1 +
 remote.c                 | 86 +++++++++++++++++++++++++++++++---------
 t/t5505-remote.sh        | 25 ++++++++++++
 5 files changed, 102 insertions(+), 19 deletions(-)

-- 
2.19.1.390.gf3a00b506f




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux