Theodore Tso <tytso@mit.edu> wrote:The reflog does update if the log file exists during a push (err, actually during receive-pack). Or if core.logAllRefUpdates is set to true. Now this isn't the default in a bare repository, but it should be the default in a repository with a working directory. So the case we are talking about should be seeing the reflog update. Yes, the update hook can detect this. Actually receive-pack by default rejects *all* non-fast-forward pushes, even if the client side uses --force. The update hook could also perform this check; test if the ref being updated is the current branch, and if so, verify the index and working directory is clean. That's a simple run of git-symbolic-ref (to get the current branch) and git-runstatus (to check the index and working directory), is it not? If git-runstatus exits to indicate the tree is clean (nothing to commit) then a simple `read-tree -m -u HEAD $new` should update the working directory and index, right? -- Shawn. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Con Kolivas | Re: [ANNOUNCE] RSDL completely fair starvation free interactive cpu scheduler |
| David Miller | [GIT]: Networking |
| Alan Stern | Re: [linux-pm] Re: Hibernation considerations |
git: | |
| Junio C Hamano | Re: git-diff on touched files: bug or feature? |
| Johannes Schindelin | Re: MinGW port - initial work uploaded |
| Kay Sievers | Re: Rss produced by git is not valid xml? |
| Marek Zawirski | [EGIT PATCH 00/31] Push GUI, GUI improvements, various jgit stuff |
| frantisek holop | nptd regression in 4.2 |
| Thilo Pfennig | OpenBSD project goals |
| Luca Dell'Oca | Authenticate squid in Active Directory |
| Richard Stallman | Real men don't attack straw men |
| Julius Volz | [PATCHv3 00/24] Add first IPv6 support to IPVS |
| Paul Moore | [RFC PATCH v4 01/14] netlabel: Remove unneeded in-kernel API functions |
| David Miller | Re: [PATCH net-2.6.25 1/10][NETNS][FRAGS]: Move ctl tables around. |
| Wenji Wu | Re: RE: A Linux TCP SACK Question |
