Doc: Describe changes in the diff editor

- Describe the context menu commands in the diff editor
  when used with Git
- Make the description of colors less specific, because they
  depend on the theme
- Use "chunk" consistently instead of "hunk"
- Update the screenshot

Change-Id: I6c9ec4eee8ff80f171558c930e5e448ac493f927
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Leena Miettinen
2020-03-03 11:46:39 +01:00
parent d2bb3b0358
commit 40899c7209
4 changed files with 22 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2018 The Qt Company Ltd. ** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Creator documentation. ** This file is part of the Qt Creator documentation.
@@ -80,11 +80,11 @@
\image creator-diff-editor.png "Diff editor output in the Edit mode" \image creator-diff-editor.png "Diff editor output in the Edit mode"
The changes are displayed in the \uicontrol Edit mode. Color coding is used The changes are displayed in the \uicontrol Edit mode. Color coding is
to mark changed lines. By default, light red indicates lines that contain used to mark changed lines. By default, red indicates lines that contain
removed text (painted a darker red) in the left pane and light green removed text (painted another shade of red) in the left pane and green
indicates lines that contain added text (painted a darker green) in the indicates lines that contain added text (painted another shade of green)
right pane. in the right pane.
To revert the changes, right-click added text and then select To revert the changes, right-click added text and then select
\uicontrol {Revert Chunk} in the context menu. To apply the changes, select \uicontrol {Revert Chunk} in the context menu. To apply the changes, select

View File

@@ -151,7 +151,8 @@
instead, select the \uicontrol {Switch to Text Diff Editor} (1) option from instead, select the \uicontrol {Switch to Text Diff Editor} (1) option from
the toolbar. In the inline the toolbar. In the inline
diff view, you can use context menu commands to apply, revert, stage, and diff view, you can use context menu commands to apply, revert, stage, and
unstage hunks, as well as send them to a code pasting service. unstage chunks or selected lines, as well as send chunks to a code pasting
service.
\section2 Viewing Versioning History and Change Details \section2 Viewing Versioning History and Change Details

View File

@@ -89,7 +89,8 @@
by default. To use the unified diff view instead, select the by default. To use the unified diff view instead, select the
\uicontrol {Switch to Unified Diff Editor} (1) option from the toolbar. \uicontrol {Switch to Unified Diff Editor} (1) option from the toolbar.
In both views, you can use context menu commands to apply, revert, stage, In both views, you can use context menu commands to apply, revert, stage,
and unstage hunks, as well as send them to a code pasting service. and unstage chunks or selected lines, as well as send chunks to a code
pasting service.
\section2 Viewing Git Log \section2 Viewing Git Log
@@ -186,11 +187,18 @@
When you have finished filling out the commit page information, click on When you have finished filling out the commit page information, click on
\uicontrol Commit to start committing. \uicontrol Commit to start committing.
The \uicontrol {Diff Selected Files} button brings up a diff view of the The \uicontrol {Diff Selected Files} button opens a \l{Viewing Git Diff}
files selected in the file list. Since the commit page is just another {diff view} of the files selected in the file list. Select
editor, you can go back to it by closing the diff view. You can also switch \uicontrol {Stage Chunk} in the context menu to stage a chunk or
to an open diff view by selecting it in the \uicontrol {Open Documents} view \uicontrol {Stage Selection} to stage the selected lines.
in the sidebar.
To unstage chunks or selected lines, select \uicontrol {Unstage Chunk} or
\uicontrol {Unstage Selection} in the context menu. To revert the changes
in a chunk, select \uicontrol {Revert Chunk}.
The commit page is just another editor, and therefore you return to it when
you close the diff view. You can also switch to an open diff view by
selecting it in the \uicontrol {Open Documents} view in the sidebar.
\section2 Amending Commits \section2 Amending Commits