On 13/10/2007, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:Exactly. When switching branches, or merging or fast-forwarding several commits, the last commit may not be correct. The last commit is only correct for the files being updated by the fast-forward to exactly one commit. Which seem to be pretty natural for the use case of checkout-only web-published workspace. Your comment prompted me to think about a narrower case of fast-forwaring to one revision. In that case, 'smudge' script can have commit identifier in FETCH_HEAD, so the example script from previous message with a little modification: $rev = `git-rev-parse FETCH_HEAD` gives *exact* solution to the originally stated problem, though for the specific case when the web server directory is a checkout-only working directory, which pulls changes automatically from master server (as opposed to, e.g., pushing changes to web server). Even if the server pulls several revisions at once, it is likely that they are done in a close succession (otherwise automated update would have picked them separately), and important part in web page timestamp is usually date. Too bad I do not really have a web server and do not need to maintain timestamps in web pages ... :) git scriptability always amazed me. - 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
| Nick Piggin | Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS] |
| Greg KH | Linux 2.6.26.3 |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Greg KH | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| David Symonds | Re: git and binary files |
| Sam Song | Fwd: [OT] Re: Git via a proxy server? |
| Linus Torvalds | Re: [PATCH 0/6] Initial subproject support (RFC?) |
| Petr Baudis | Re: repo.or.cz wishes? |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Jeff Garzik | Re: Wasting our Freedom |
| Alexey Suslikov | OT: OpenBSD on Asus eeePC |
| ropers | Re: Real men don't attack straw men |
| David Howells | [PATCH 6/7] FS-Cache: CacheFiles: ia64: missing copy_page export [try #13] |
| Valdis.Kletnieks | Re: [RFD] Incremental fsck |
| Chris Mason | Re: [PATCH][RFC] fast file mapping for loop |
| Nikolai Joukov | Re: [ANNOUNCE] RAIF: Redundant Array of Independent Filesystems |
