From: Pete Wyckoff <pw@padd.com>
To: git@vger.kernel.org
Subject: smudge/clean filter needs filename
Date: Sat, 18 Dec 2010 17:38:22 -0500 [thread overview]
Message-ID: <20101218223822.GA18902@arf.padd.com> (raw)
I'm using git-p4 to import and work with upstream p4
repositories. Some of the files are ktext, meaning they expect
expansion of $Id$ and similar identifiers.
Using the filter driver for this file, I can do the "clean" part
easily, but to calculate the "smudge" correctly, I need to know
the filename inside the filter driver.
E.g., inside file foo/Makefile, the clean line:
# $File$
should be smudged into:
# $File: //depot/project/foo/Makefile $
I know the //depot/project location from context in the commit
log message that git-p4 produces. But I don't know the pathname
in the git repo that my smudge script is working on.
Would it make sense to pass that on the command line? E.g.
[filter "p4"]
clean = git-p4smudge --clean %s
smudge = git-p4smudge --smudge %s
Or maybe put the path in an environment variable?
-- Pete
next reply other threads:[~2010-12-18 22:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-18 22:38 Pete Wyckoff [this message]
2010-12-19 21:29 ` [PATCH] convert filter: supply path to external driver Pete Wyckoff
2010-12-19 21:59 ` Junio C Hamano
2010-12-20 2:24 ` Jeff King
2010-12-20 5:52 ` david
2010-12-20 16:09 ` [PATCH v2] " Pete Wyckoff
2010-12-20 17:59 ` Junio C Hamano
2010-12-21 13:44 ` [PATCH v3] " Pete Wyckoff
2010-12-21 18:19 ` Jonathan Nieder
2010-12-21 20:33 ` [PATCH v4] " Pete Wyckoff
2010-12-21 21:24 ` Junio C Hamano
2010-12-22 14:40 ` [PATCH v5] " Pete Wyckoff
2010-12-22 18:10 ` Junio C Hamano
2010-12-22 23:22 ` Junio C Hamano
2010-12-20 8:04 ` [PATCH] " Johannes Sixt
2010-12-20 8:52 ` Junio C Hamano
2010-12-20 14:41 ` Pete Wyckoff
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=20101218223822.GA18902@arf.padd.com \
--to=pw@padd.com \
--cc=git@vger.kernel.org \
/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).