Re: [PATCH] Optional shrinking of RCS keywords in git-p4

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

 



On Mon, 15 Sep 2008, Junio C Hamano wrote:

> David Brown <git@xxxxxxxxxx> writes:
> 
> > ...  As far as I can tell, P4 completely
> > ignores whatever the $Id: ...$ headers happen to be expanded to at the
> > time of checking.  You can put garbage there, and it check in fine.
> > ...
> > I guess it isn't a problem to make this optional in git-p4, but I
> > don't think this patch is solving the right problem.
> 
> Hmm.  I do not do p4, but what I am guessing is that there probably is a
> configuration switch on the p4 side that lets you check in files with
> "$Id: garbage $" in them, while dhruva hasn't turned that switch on.

Actually, the problem seems to be that git-p4 tries to create the modified 
file by applying the git-generated diff to the p4-provided file, and this 
fails if the context for the git-generated diff contains a keyword, since 
the p4-provided file has it expanded and git has it collapsed.

I think the right solution is for git-p4 to check that p4 thinks the file 
is the correct file and then simply replace it rather than trying to 
generate the right result by patching. To be a bit more careful, git-p4 
could check that the contents it's replacing actually would exactly match 
the git contents if the keywords were callapsed (if the p4 setting is to 
use keywords in this file).

	-Daniel
*This .sig left intentionally blank*
--
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]

  Powered by Linux