From: "Zakirov Salikh" <salikh@gmail.com>
To: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, "Peter Karlsson" <peter@softwolves.pp.se>
Subject: Re: RCS keyword expansion
Date: Sat, 13 Oct 2007 08:52:24 +0900 [thread overview]
Message-ID: <eb5812d90710121652g24b1177ao685c1ce4e0626c2d@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0710122341160.25221@racer.site>
On 13/10/2007, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > * smudge filter is not passed a name of file being checked out,
> > so it is not possible to exactly find the commit identifier.
> > However, this is alleviated by the fact that 'smudge' is only being run
> > for the changed files, so the last commit *is* the needed one.
>
> No.
> When changing branches, this is not the commit you think it is.
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.
> But maybe you humour me and tell me in which context such a smudge filter
> is of use. I have yet to encounter an argument that convinces me.
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.
next prev parent reply other threads:[~2007-10-12 23:52 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-11 14:47 RCS keyword expansion Peter Karlsson
2007-10-11 15:02 ` Johannes Sixt
2007-10-11 15:09 ` Randal L. Schwartz
2007-10-11 15:59 ` Oliver Kullmann
2007-10-11 18:09 ` Alex Riesen
2007-10-11 20:47 ` Johannes Schindelin
2007-10-11 21:35 ` Sam Vilain
2007-10-12 5:26 ` Peter Karlsson
2007-10-12 10:02 ` Johannes Schindelin
2007-10-12 10:50 ` Peter Karlsson
2007-10-12 11:05 ` Johannes Sixt
2007-10-12 11:21 ` Lars Hjemli
2007-10-12 11:34 ` Johannes Schindelin
2007-10-15 14:03 ` Peter Karlsson
2007-10-15 14:28 ` Johannes Schindelin
2007-10-12 12:57 ` Jan Hudec
2007-10-12 19:08 ` Salikh Zakirov
2007-10-12 22:42 ` Johannes Schindelin
2007-10-12 23:52 ` Zakirov Salikh [this message]
2007-10-11 17:55 ` Peter Karlsson
2007-10-11 19:21 ` Alex Riesen
2007-10-12 5:27 ` Peter Karlsson
2007-10-12 17:05 ` Barry Fishman
2007-10-12 17:44 ` Linus Torvalds
2007-10-12 17:51 ` Florian Weimer
2007-10-11 21:20 ` Sam Vilain
2007-10-11 19:16 ` Lars Hjemli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eb5812d90710121652g24b1177ao685c1ce4e0626c2d@mail.gmail.com \
--to=salikh@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=peter@softwolves.pp.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).