Re: [git-users] Git diff problem with cvs $id$
On Mon, 6 Jul 2015 11:53:26 -0700 (PDT) Konrád Lőrinczi klorin...@gmail.com wrote: Remove the it! If you aren't using CVS those lines serve no purpose at all. Even if you do use CVS the line is of dubious usefulness. Unfortunately I can not remove them. They are in an earlier branch of a software repo, which has more thousand files. So I need a solution, where I can keep original repo, but still can merge with my fork, without solving conflicts in more thousand files because of cvs indents. So which repo contains expanded keywords? If yours, then do a recursive `sed` (or whatever) invocation on all that thousand of files and make a single commit titled Normalize CVS keywords. Then merge normally. If the foreign repo contains expanded keywords, may be `git rerere` might be of help -- it's specifically designed to remember how you resolved past merge conflicts. Still, I can't completely comprehend your situation: the foreign repo supposedly should contain unexpanded keywords because to me, the only sensible way to get a repo with expanded keywords is to have it converted from the source one using some brain-dead tool; or may be you have just done `git add .` on a CVS checkout? -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Git diff problem with cvs $id$
Any suggestions? Remove the it! If you aren't using CVS those lines serve no purpose at all. Even if you do use CVS the line is of dubious usefulness. Unfortunately I can not remove them. They are in an earlier branch of a software repo, which has more thousand files. So I need a solution, where I can keep original repo, but still can merge with my fork, without solving conflicts in more thousand files because of cvs indents. Konrad -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Git diff problem with cvs $id$
So which repo contains expanded keywords? If yours, then do a recursive `sed` (or whatever) invocation on all that thousand of files and make a single commit titled Normalize CVS keywords. Then merge normally. If the foreign repo contains expanded keywords, may be `git rerere` might be of help -- it's specifically designed to remember how you resolved past merge conflicts. There is a repo with original software. I have a repo, which contains an installed software, which has expanded cvs keywords. When I started development I did not use git, yet, so all developments were done on the installed version, which contained expanded cvs keywords. So maybe you are right, I should run sed through all my repo, but I'm afraid I can not write a regular expression, which can absolutely safely replace cvs keywords. For a thousand file, I can not be sure it will not break something. This is why I forced the clean smudge way. Konrad -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Git diff problem with cvs $id$
On Wed, Jul 01, 2015 at 06:37:12AM -0700, Konrád Lőrinczi wrote: I have two branches and the only difference between them is the cvs $id$, which is expanded in one branch and not expanded in the other. Is there a way to show git diff as unchanged? Not out of the box. You could do some filtering using attributes. Also should not show conflict in case of git merge. Any suggestions? Remove the it! If you aren't using CVS those lines serve no purpose at all. Even if you do use CVS the line is of dubious usefulness. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus Eagles may soar, but weasels don't get sucked into jet engines. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. signature.asc Description: PGP signature
Re: [git-users] Git diff problem with cvs $id$
On Wed, 1 Jul 2015 06:37:12 -0700 (PDT) Konrád Lőrinczi klorin...@gmail.com wrote: I have two branches and the only difference between them is the cvs $id$, which is expanded in one branch and not expanded in the other. Is there a way to show git diff as unchanged? Also should not show conflict in case of git merge. Two approaches: 1) Simply remove it from the files in both branches, as Magnus suggested. Another idea is to modify files only in the branch in which the tokens are expanded -- simply modify them back into token form to read just $Id$. After that change, the files will be byte-to-byte identical. 2) If you actually need this tokens expanded for real (that is, to contain some up-to-date information, read up on clean/smudge filters (use `git help attributes`). Basically, you'll need a pair of programs one of which would expand those tokens in the data it reads from its stdin and write the result to its stdout, and another one would do the reverse -- turning the $Id: blah blah$ back to just $Id$. This way you have files with expanded tokens in your work tree and files with normalized tokens in the repository. Git will also take care to apply clean filters when you do plain `git diff` -- thus comparing the file in the work tree to its version in the repository. I'd say, usage of VCS keywords these days is questionable. First, knowing which revision the file came from is only supposeldy useful for non-compiled code (like programs written in Tcl, Perl, Python etc), and for cases files could be somehow updated / checked out by the user individually. Second, given just the file without any expanded VCS keywords in it, you still are able to guess which commit(s) it could have came from -- quick googling yields [1, 2] as the top two links. 1. http://stackoverflow.com/a/223890/720999 2. http://blog.endpoint.com/2014/11/finding-specific-git-commit-at-point-in.html -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Git diff problem with cvs $id$
I have two branches and the only difference between them is the cvs $id$, which is expanded in one branch and not expanded in the other. Is there a way to show git diff as unchanged? Also should not show conflict in case of git merge. Any suggestions? -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.