Branch compare shows wrong results
Gitlab branch compare tool (and merge requests too) shows a wrong result one of my files (and maybe other files).
I'm using Gitlab-CE 8.0.5 version from the omnibus repository on Debian GNU/Linux 7 (3.2.0-4-amd64).
I've tracked down the web UI is using the gitlab_git gem to parse the rugged gem's output. So've reproduced it from the rails console, using the gitlab_git gem.
Checking from the 'gitlab-rails console'.
irb> repo = Gitlab::Git::Repository.new('/var/opt/gitlab/git-data/repositories/root/kite_service_test.git');
irb> compare = Gitlab::Git::Compare.new(repo,'master','machine_list_and_information_materials');
irb> diff = compare.diffs.detect{|x| x.new_path == 'app/src/main/AndroidManifest.xml'}.diff;
irb> puts diff
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -26,6 +26,7 @@
<application
android:allowBackup="true"
+ android:name=".KiteApplication"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
@@ -56,10 +57,12 @@
</activity>
<activity
android:name=".activity.GepActivity"
+ android:icon="@drawable/kite_logo_small"
android:label="@string/title_activity_gep" >
</activity>
<activity
android:name=".activity.MunkalapActivity"
+ android:icon="@drawable/kite_logo_small"
android:label="@string/title_activity_munkalap" >
</activity>
<activity
@@ -78,8 +81,54 @@
</activity>
<activity
android:name=".activity.PartnerDetailsActivity"
+ android:icon="@drawable/kite_logo_small"
+ android:screenOrientation="sensorLandscape"
android:label="@string/title_activity_partner_details" >
</activity>
- </application>
+ <activity
+ android:name=".activity.MachineDetailsActivity"
+ android:screenOrientation="sensorLandscape"
+ android:label="@string/title_activity_activity_machine_details" >
+ </activity>
+ <activity
+ android:name=".activity.InformaciosAnyagokActivity"
+ android:icon="@drawable/kite_logo_small"
+ android:screenOrientation="sensorLandscape"
+ android:label="@string/title_activity_informacios_anyagok" >
+ </activity>
+ <activity
+ android:name=".activity.SyncActivity"
+ android:icon="@drawable/kite_logo_small"
+ android:label="@string/title_activity_sync"
+ android:screenOrientation="sensorLandscape" >
+ </activity>
+
+ <provider
+ android:name=".orm.provider.KiteContentProvider"
+ android:authorities="hu.itware.service.provider.Kite"
+ android:exported="false"
+ android:syncable="true" />
+
+ <service android:name=".orm.authenticator.AuthenticatorService" >
+ <intent-filter>
+ <action android:name="android.accounts.AccountAuthenticator" />
+ </intent-filter>
+
+ <meta-data
+ android:name="android.accounts.AccountAuthenticator"
+ android:resource="@xml/authenticator" />
+ </service>
+ <service
+ android:name=".orm.sync.SyncService"
+ android:exported="true"
+ android:icon="@drawable/kite_icon" >
+ <intent-filter>
+ <action android:name="android.content.SyncAdapter" />
+ </intent-filter>
+ <meta-data
+ android:name="android.content.SyncAdapter"
+ android:resource="@xml/syncadapter" />
+ </service>
+ </application>
</manifest>
=> nil
Using the git diff CLI command on a locally cloned repository
$ kite_service_test git:(master) git pull --all
Fetching origin
Already up-to-date.
$ kite_service_test git:(master) git diff master machine_list_and_information_materials -- app/src/main/AndroidManifest.xml | cat
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 6a72251..5ee0f10 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -57,10 +57,12 @@
</activity>
<activity
android:name=".activity.GepActivity"
+ android:icon="@drawable/kite_logo_small"
android:label="@string/title_activity_gep" >
</activity>
<activity
android:name=".activity.MunkalapActivity"
+ android:icon="@drawable/kite_logo_small"
android:label="@string/title_activity_munkalap" >
</activity>
<activity
@@ -79,9 +81,22 @@
</activity>
<activity
android:name=".activity.PartnerDetailsActivity"
+ android:icon="@drawable/kite_logo_small"
+ android:screenOrientation="sensorLandscape"
android:label="@string/title_activity_partner_details" >
</activity>
<activity
+ android:name=".activity.MachineDetailsActivity"
+ android:screenOrientation="sensorLandscape"
+ android:label="@string/title_activity_activity_machine_details" >
+ </activity>
+ <activity
+ android:name=".activity.InformaciosAnyagokActivity"
+ android:icon="@drawable/kite_logo_small"
+ android:screenOrientation="sensorLandscape"
+ android:label="@string/title_activity_informacios_anyagok" >
+ </activity>
+ <activity
android:name=".activity.SyncActivity"
android:icon="@drawable/kite_logo_small"
android:label="@string/title_activity_sync"
Different results... the second one is the good result.
I'm also tracked it down by using the rugged gem from the gitlab-rails console, and it gave me good results (the same as the git diff command output).
Can you look into what's causing the difference between the two ways?
Thanks,
Armin