-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
254
-
Hi everyone,
Thanks for your feedback, passion, and advocacy for this suggestion. Please accept our apologies for allowing this issue to remain open without a clear answer from us.
Changing the way diff works (diff A B instead of git diff A...B) doesn't align with our product priorities.
We remain committed to being an open company, whether it's with regards to feature requests or bugs in our software.
What are we doing instead? We remain committed to helping software teams deliver high-quality software faster in an increasingly competitive world. We believe that great developer tools are a key element of modern software development. To that end, we've made a lot of improvements last year and are planning to work in the following areas that help with problems development teams face now:
- Performance and scaling to support growth
- Security and compliance features
- Innovations around developer productivity
- Integrations between Atlassian and other leading products
Cheers,
Anton Genkin
Product Manager - Bitbucket Data Center & Server
Original suggestion
If I have two branches with the same changes in different commits, Stash's branch comparison is misleading.
I have created a demonstration git repository (attached). In it, I created the file two.txt on both 'master' and 'a_branch'. I then made further modifications to this file on 'master'.
However, Stash's compare (see screenshot) is showing the line 'file two' as being a new addition when merging 'master' into 'a_branch'. Furthermore, it is claiming two.txt is a new file (it's shown in green text on the left panel), when it already exists in 'a_branch'!
In terms of git's CLI, I would expect this:
$ PAGER=cat git diff a_branch..master diff --git a/file_created_in_branch.txt b/file_created_in_branch.txt deleted file mode 100644 index d673e5e..0000000 --- a/file_created_in_branch.txt +++ /dev/null @@ -1 +0,0 @@ -created file in a_branch diff --git a/file_created_in_master.txt b/file_created_in_master.txt new file mode 100644 index 0000000..9dc7d06 --- /dev/null +++ b/file_created_in_master.txt @@ -0,0 +1 @@ +this file was only created in master! diff --git a/two.txt b/two.txt index 6c970db..135327c 100644 --- a/two.txt +++ b/two.txt @@ -1 +1,2 @@ file two +modification in master
However, Stash seems to be doing the equivalent of this (three dots!):
$ PAGER=cat git diff a_branch...master diff --git a/file_created_in_master.txt b/file_created_in_master.txt new file mode 100644 index 0000000..9dc7d06 --- /dev/null +++ b/file_created_in_master.txt @@ -0,0 +1 @@ +this file was only created in master! diff --git a/two.txt b/two.txt new file mode 100644 index 0000000..135327c --- /dev/null +++ b/two.txt @@ -0,0 +1,2 @@ +file two +modification in master
This has bitten our users several times: they become reluctant to create pull requests because they think the merge would include more changes than they expected. As a result, they lose trust in branch comparison tool.
- is duplicated by
-
BSERV-8213 As a stash user, I want compare to work correctly
- Closed
-
BSERV-7522 Configurable Pull Request Diff Mode (two dot vs three dot diff mode)
- Closed
- is related to
-
BSERV-7097 Diff is incorrect when source branch modified before destination branch
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
- resolves
-
PSSRV-123962 Loading...