git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* smudge/clean filter needs filename
@ 2010-12-18 22:38 Pete Wyckoff
  2010-12-19 21:29 ` [PATCH] convert filter: supply path to external driver Pete Wyckoff
  0 siblings, 1 reply; 17+ messages in thread
From: Pete Wyckoff @ 2010-12-18 22:38 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-12-22 23:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-18 22:38 smudge/clean filter needs filename Pete Wyckoff
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

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).