简体   繁体   中英

Git: Is commit content sent to network even after fatal error?

During an attempted push, is any of the substantive content of my commit (ie, the code I was working on) sent over the network, if the push results in any of the following errors? (where '%s' is the remote repo)

  1. fatal: repository '%s' not found
  2. fatal: Authentication failed for '%s'
  3. fatal: unable to access '%s'

No. If you consider the "unable to access" error for instance, you would find it in http-push.c#static int remote_exists(const char *path)

It is called from http-push.c#cmd_main() at a time where push is busy getting data from the remote repo, in order to determine the have/have not pack files, and know what to send back , as illustrated here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM