Re: bug: origin refs updated too soon locally

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

 



Perry Wagle <wagle@xxxxxxxxxxxxxx> wrote:
> If I clone a remote repository, make a few commits, push them to the  
> remote repository, and the update hook on the remote repository  
> rejects them (exit 1), the local origin refs are still updated as if  
> the push had gone through.  The workaround is to do a pull to set the  
> origin refs back.

Heh.  Yes, that's a known bug.  Someone should really fix it.
The problem is we are updating the local tracking ref before we
actually get confirmation from the remote side that the remote side
has accepted (or rejected) that update request.

This is probably easier to do after the db/fetch-pack topic is
merged as the improvements there might make this easier.  But I
could be wrong.  Be nice if someone proved me wrong by writing up
a patch for git-send-pack.

For the time being the best way to recover from this is to use
git-fetch rather than git-pull.  Recall that git-pull is defined as
"fetch then merge".  You really just need to refetch the tracking
branches again, so your tracking branches have the same value as
the remote side.

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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