smudge/clean filter needs filename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]