Hi!
We are using Crucible for code review, and using git as RCS. And there are two things that are really painful:
Thanks in advance!
Community moderators have prevented the ability to post new answers.
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
Hi Felipe,
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.
Thanks,
Oleg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Oleg,
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 <fkraemer@atlassian.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.
Kind regards,
Felipe Kraemer
Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Felipe,
Thanks for reply!
Best Regards,
Oleg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Oleg,
Kind regards,
Felipe Kraemer
Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.