git: Capture all working tree changes for the Review Diff action (#49993)

Danilo Leal created

The AI-assisted "Review Diff" action was only working for committed
changes because we were passing HEAD in the git command. Without it, it
captures all of the working tree changes, the same way the Branch Diff
view itself does. I think this is now better and more intuitive, because
it shouldn't be required that you commit the changes to have them
quickly reviewed by an agent.

Release Notes:

- N/A

Change summary

crates/git/src/repository.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/git/src/repository.rs 🔗

@@ -2015,7 +2015,7 @@ impl GitRepository for RealGitRepository {
                     DiffType::MergeBase { base_ref } => {
                         new_command(&git_binary_path)
                             .current_dir(&working_directory)
-                            .args(["diff", "--merge-base", base_ref.as_ref(), "HEAD"])
+                            .args(["diff", "--merge-base", base_ref.as_ref()])
                             .output()
                             .await?
                     }