| 345 | == Copying file aka {{{svn copy}}} == |
| 346 | The Git does automatic tracking of copied files like what "svn copy" does. |
| 347 | Although, on default, git checks modified source file and new file. |
| 348 | There are options which we should tell git to check unmodified source files, -C and --find-copies-harder. |
| 349 | |
| 350 | Here is sample workflow how to use -C and --find-copies-harder with "git svn dcommit": |
| 351 | * Copy files |
| 352 | * Update ChangeLog |
| 353 | * {{{git commit}}} and put contents of ChangeLog into git commit log. It will be svn commit message |
| 354 | * {{{git svn dcommit -n -C50 --find-copies-harder}}} Dry run |
| 355 | Output may be |
| 356 | {{{ |
| 357 | Committing to http://svn.webkit.org/repository/webkit/trunk... |
| 358 | diff-tree b6f4e217870317390ebcd2f4fe7410b8b5220b96~1 b6f4e217870317390ebcd2f4fe7410b8b5220b96 |
| 359 | }}} |
| 360 | * {{{git diff-tree p -C50 --find-copies-harder b6f4e217870317390ebcd2f4fe7410b8b5220b96~1 b6f4e217870317390ebcd2f4fe7410b8b5220b96}}} |
| 361 | * Output should be "copy from" and "copy to" |
| 362 | * {{{git svn dcommit -C50 --find-copies-harder}}} |
| 363 | Output should be looks like: |
| 364 | {{{ |
| 365 | Committing to http://svn.webkit.org/repository/webkit/trunk... |
| 366 | C Source/WebCore/Foo.cpp |
| 367 | C Source/WebCore/ChangeLog |
| 368 | Committed r123456 |
| 369 | M Source/WebCore/ChangeLog |
| 370 | }}} |
| 371 | |
| 372 | See also [https://bugs.webkit.org/show_bug.cgi?id=89155 WK-89155](failure example) and [http://trac.webkit.org/changeset/120567 r120567] (successful example) |