summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2007-10-18 02:19:15 -0400
committerShawn O. Pearce <spearce@spearce.org>2007-10-18 03:45:59 -0400
commit334f4831e5a779d42e521b770a26eae1ecb27e86 (patch)
tree2db439c432f6c9a2e276a2a1e2f355e4cc8c56a2 /commit.c
parentde61e42b539ffbd28d2a2ba827bb0eb79767057b (diff)
downloadgit-334f4831e5a779d42e521b770a26eae1ecb27e86.tar.gz
send-pack: don't update tracking refs on error
Previously, we updated the tracking refs (which match refs we are pushing) while generating the list of refs to send. However, at that point we don't know whether the refs were accepted. Instead, we now wait until we get a response code from the server. If an error was indicated, we don't update any local tracking refs. Technically some refs could have been updated on the remote, but since the local ref update is just an optimization to avoid an extra fetch, we are better off erring on the side of correctness. The user-visible message is now generated much later in the program, and has been tweaked to make more sense. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions