I'm trying to write how many lines of code difference are there between 2 git branches. So i ran the git command for the difference, on terminal, where it output the file location along with the number of different lines between two branches.
Although, i know the command to write the terminal output into a file. I've used the below mentioned command to write the terminal output into a file 'code_mismatch.txt':
git diff --compact-summary --ignore-space-change remotes/dev_admin/master origin/master &> code_mismatch.txt
A glance on the code_mismatch.txt file:
application/models/admin/Template_model.php | 97 +- application/models/admin/Ticket_model.php | 75 +- .../models/admin/Tickets_v2/Channel_model.php | 10 +- .../models/admin/Tickets_v2/Superadminmodel.php | 30 +- .../models/admin/Tickets_v2/Template_model.php | 26 +- .../models/admin/Tickets_v2/Ticket_model.php | 4 +- .../merchant/dashboard/ticket_destinations.php | 16 +- .../ticket_list.php (gone) | 94 - application/views/activity_overview.php | 2 +- application/views/admin/channel.php | 15 +- .../views/admin/company/companysettings_v1.php | 57 +- But the problem i'm facing is, if the file location written inside the 'code_mismatch.txt' file is a bit long, then it replaces the starting part of the file location with dots like this '...'.
If i try to run the same command without writing the output into code_mismatch.txt file then on the terminal i'm getting full location of the file.
git diff --compact-summary --ignore-space-change remotes/dev_admin/master origin/master
A glance on terminal output:
application/models/admin/Template_model.php | 97 +- application/models/admin/Ticket_model.php | 75 +- application/models/admin/Tickets_v2/Channel_model.php | 10 +- application/models/admin/Tickets_v2/Superadminmodel.php | 30 +- application/models/admin/Tickets_v2/Template_model.php | 26 +- application/models/admin/Tickets_v2/Ticket_model.php | 4 +- application/views/V1/codes/merchant/dashboard/ticket_destinations.php | 16 +- application/views/V1/ticket_destinations_list/ticket_list.php (gone) | 94 - application/views/activity_overview.php | 2 +- application/views/admin/channel.php | 15 +- application/views/admin/company/companysettings_v1.php | 57 +- application/views/admin/company/create_new_company.php | 456 ++- Is there a way i can write my file same as the terminal output..??
Thanks!
--stat=0?--stat=10000? stackoverflow.com/a/10460154/7976758