We are using Crucible for code review, and using git as RCS. And there are two things that are really painful:
Thanks in advance!
Thanks for reply!
Not only FishEye/Crucible will show the old file being deleted and the new one being created. This happens in Git as well. In the commands below, I have renamed a file, committed it, and showed the diff:
ecrmac-01:mygitrepo fkraemer$ git mv Test.txt Test1.txt ecrmac-01:mygitrepo fkraemer$ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # renamed: Test.txt -> Test1.txt # ecrmac-01:mygitrepo fkraemer$ git commit -m "Committing Test1.txt" [master b18a10b] Committing Test1.txt 1 file changed, 0 insertions(+), 0 deletions(-) rename Test.txt => Test1.txt (100%) ecrmac-01:mygitrepo fkraemer$ git show commit b18a10b4debdca6e77fec185c1673e336bce91fd Author: Felipe Kraemer <email@example.com> Date: Thu Oct 23 15:02:34 2014 -0200 Committing Test1.txt diff --git a/Test.txt b/Test.txt deleted file mode 100644 index 55d5dd1..0000000 --- a/Test.txt +++ /dev/null @@ -1 +0,0 @@ -This is a test! diff --git a/Test1.txt b/Test1.txt new file mode 100644 index 0000000..55d5dd1 --- /dev/null +++ b/Test1.txt @@ -0,0 +1 @@ +This is a test!
As can be seen above, Git itself is showing the file with the old name as deleted ("deleted file mode 100644") and the file with the new name as a new file ("new file mode 100644"). The same happens on directories or packages that get renamed. That's why in FishEye/Crucible renaming is shown as deleted and new file as well.
While the files are not committed, it is possible to see that it was renaming. And, yes, when commit is done, just "git show" doesn't show the renamings, but... Even then you can still do:
git diff -M --summary commit_from commit_to
which in your case is, possibly (I might mistake the commit IDs, possibly they should be vice versa):
git diff -M --summary 55d5dd1 b18a10b
The output of that command will show the renamings.
Looks like you need to use "-M" and "-C" options:
C:\Data\NetBeansProjects>git show -M -C commit 23e1e3f4fb08a53cd0703383c3e7ce609981199d Author: Alexander K Date: Tue Apr 19 13:55:56 2016 -0700 Renamed test diff --git a/Test.txt b/Test1.txt similarity index 100% rename from Test.txt rename to Test1.txt
Happy Monday everyone! If you're anything like me, you tend to think a lot about what the future looks like. What are my kids up to in 15 years? Have we solved for climate change? How could TVs poss...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs