aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/git
Commit message (Collapse)AuthorAgeFilesLines
* Git: Disable instant blame for modified filesAndre Hartmann2022-11-281-0/+7
| | | | | | Change-Id: Iae24a8bbcbdb3663367ee863e8cc27ad92942e17 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Git: Enable instant blame only if current file is managedOrgad Shaneh2022-11-221-1/+1
| | | | | | | | If the current project is Git managed, but the user opens a header from an unmanaged directory, don't try to run blame. Change-Id: I563f7a687b2ea03f4c03bf97c8f5c27c1f8411ec Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Git: Fix crash when closing last editorOrgad Shaneh2022-11-211-18/+21
| | | | | | | before instant blame was activated. Change-Id: I8a8acf6dc58cb25f7c10c1dfa08e3b7f6bae3e76 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Git: Stop blame attempts for unmanaged files in the repositoryOrgad Shaneh2022-11-211-5/+10
| | | | | | | | A file that is in the repository directory, but not managed by Git should not attempt to run instant blame on every cursor change. Change-Id: Ia7daa2ae9980cea4363e010a98fb1e2f2a3ec05f Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Git: use unique_ptr for instant blame marksAndre Hartmann2022-11-211-16/+9
| | | | | | | | Also simplifies the code. Change-Id: I5da0aeb86ba5a28c9016cde11aab9dcee922d908 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Git: Add instant line annotation (blame)Andre Hartmann2022-11-196-13/+272
| | | | | | | | | | | | | | | | | Inspired by the Visual Studio Code plugin GitLens. Add an annotation to the editor line the cursor is currently in. A tooltip contains the commit data and allows to invoke git show for the commit. When the automatic annotation is turned off, it can still be forced for the current line with an action. The default shortcut for this action is: Alt+G,Alt+I Task-number: QTCREATORBUG-23299 Change-Id: I58eef9efcf531afb11470e5f5456e19f282b18d0 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Remove unused includes of QLayoutJarek Kobus2022-11-181-1/+0
| | | | | Change-Id: I12777e07f3d6fcc639b48f02080e73b1a0a3ea30 Reviewed-by: hjk <hjk@qt.io>
* Remove unused includes of Q[H/V]BoxLayoutJarek Kobus2022-11-182-2/+0
| | | | | | | Change-Id: Ia90b30b634281414268e00722771470f1e7b69c0 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Git: GerritPushDialog: Use LayoutingJarek Kobus2022-11-185-366/+143
| | | | | Change-Id: I5b0a95680e683cf6e5b938b4a4a74bfc0c5b45e2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Remove unused includes of QFormLayoutJarek Kobus2022-11-181-1/+0
| | | | | | | Change-Id: Ia877cb57037342f2a7b332b29d9cb45e9b01c4bc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Vcs: Proliferate FilePath a bit furtherhjk2022-11-092-5/+3
| | | | | Change-Id: I8490917bf0bde59b1cef2509ec14c3ca985fa43d Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Merge remote-tracking branch 'origin/9.0'Eike Ziller2022-11-031-7/+6
|\ | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp Change-Id: I154a9ababa9e166cb06e98652d481fe6234f6399
| * Git: Fix focus issue in LogChangeWidgetOrgad Shaneh2022-10-271-7/+6
| | | | | | | | | | | | | | | | Workaround QTBUG-89156. Change-Id: Ia128db1c0c2ee85985b6a725b6cb849d87844668 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | VCS: Simplify submit editor accept/close flowOrgad Shaneh2022-10-251-2/+2
| | | | | | | | | | | | | | | | | | * Replace message box with an error on the output pane. * Separate logic for accept and close. Change-Id: Ib9fa201a1a67ee195086f7a22bc6678a9642452a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | Utils: Add sorted() functionChristian Kandeler2022-10-251-2/+1
| | | | | | | | | | | | | | | | | | For simpler calling code. Change-Id: Ia0a16a28770fd172f74d06a626148248bf5d3c0c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | VCS: Remove "Commit" option when closing commit editorOrgad Shaneh2022-10-211-1/+0
| | | | | | | | | | | | Fixes: QTCREATORBUG-22233 Change-Id: I1270cc58a823b919475fc51ac5fc71b892b379b6 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | Merge remote-tracking branch 'origin/9.0'Eike Ziller2022-10-181-3/+5
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp src/plugins/vcsbase/vcscommand.cpp Change-Id: I2d33113bfb2ea7134550cda1de4e2c21e6711778
| * Git: Pass only files after -- on BlameOrgad Shaneh2022-10-141-1/+2
| | | | | | | | | | | | | | It works, but is likely to break at some point. Change-Id: I97952a7cb6cd3569adc694db7537fab807bda0ea Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| * Git: Respect text encoding in project settings on diffOrgad Shaneh2022-10-141-2/+3
| | | | | | | | | | | | Fixes: QTCREATORBUG-21794 Change-Id: Ib4be9811c0ab1cba5cad4adbfe740a6d99f420d1 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | VCS: Simplify promptSubmit a bit moreOrgad Shaneh2022-10-181-0/+1
| | | | | | | | | | | | | | | | | | + fix regression for Git, which allowed to commit invalid commits. Amends commit 9b61e484bed797f0424440bce5c87172a832eda4. Change-Id: I7571863bb982bfae1aa040e08f8c68010b14b147 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | VCS: Deduplicate some submit editor closing logicOrgad Shaneh2022-10-171-26/+1
| | | | | | | | | | Change-Id: I622f5703c222a48606fcca3b99e87f9398e6a815 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | VCS: Remove "Prompt to submit" settingsOrgad Shaneh2022-10-171-1/+1
| | | | | | | | | | | | Task-number: QTCREATORBUG-22233 Change-Id: Ifbfd738281066af7913357ff9e2466a6c983452c Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | Git: Improve tracking of external changes to HEADOrgad Shaneh2022-10-142-36/+25
| | | | | | | | | | | | | | | | | | | | | | | | Instead of using FileSystemWatcher, emit repositoryChanged when refreshTopic is called. This reverts commit 2a8c48cb15d50b8686e5cb4f29a96f4431a0ec37. Fixes: QTCREATORBUG-21089 Change-Id: Iaee8a895f3bc087583cbdea11c6dc2c263694a86 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | VCS: Resolve symlinks on blameOrgad Shaneh2022-10-141-2/+6
|/ | | | | | Fixes: QTCREATORBUG-20792 Change-Id: I60ac64957b23b80826c93ba73ff17a265549811f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Git: Fix removing nested filesOrgad Shaneh2022-10-112-2/+5
| | | | | | | | | * Add -- before file list on add/remove. * Run in the correct directory. Fixes: QTCREATORBUG-27405 Change-Id: Ie04cd19981dac465cf70dba8b089fd18a4ecdf8b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Git: Fix adding existing files in nested directoriesOrgad Shaneh2022-10-111-5/+6
| | | | | | | | Amends 48c56416f5e128c04f2d2d867b518775e0527607. Fixes: QTCREATORBUG-27644 Change-Id: I4ef58c017e4fcf8fa48905f7e0b649433b3cac0f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* VCS: Fix misuses of parentDir().absolutePath()Orgad Shaneh2022-10-111-1/+1
| | | | | | | absolutePath() *is* the parent directory. Change-Id: I59f2c4ae65b265270d432f381258b95c65e53581 Reviewed-by: hjk <hjk@qt.io>
* Git: Fix pattern for commit hash matchingOrgad Shaneh2022-10-111-1/+1
| | | | | | | | | | | * Avoid matching mid-word. * Avoid matching after "mode ". * Change to raw string literals. Fixes: QTCREATORBUG-24768 Fixes: QTCREATORBUG-28268 Change-Id: I68abbf3de7928c60e0fe2d944adedaa6db94b1a4 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* VcsCommand: Simplify ProgressParserJarek Kobus2022-10-071-16/+9
| | | | | | | | | | | Get rid of abstract base ProgressParser and replace it with ProgressParser function. The only one former subclass GitProgressParser is now functor object. Pass future interface directly to the ProgressParser function, along with input text to be parsed. Change-Id: Icbcf0b6e55097f8b38eb8a32ceaa4414723116d0 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-078-14/+14
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <hjk@qt.io>
* Git: VcsBase: Squish: Make tst_git_local run againRobert Löhning2022-10-071-0/+4
| | | | | | | | | | | Amends 1548eef10b8987142bf1cafa27278e5b816a11b7 Amends 69f4cb86dd7a4f5f72f6111702b2db9d5779e2da Amends 9ad5c4254d83b0adceed45fd8da84f8f9c271dd9 Amends e070d826e5f87fe48804dd14a04bae83c06f2764 Change-Id: I584b1b9b662144899d0292b887e8cb3386f80d4b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Git: Fix include directiveChristian Kandeler2022-10-071-1/+1
| | | | | | | | Change-Id: I35aff37fff00f020044c84ef288234146ebd5ade Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Git: Convert to Tr::trAlessandro Portale2022-10-0647-758/+660
| | | | | Change-Id: I7fb1753109a9263c70c01713f5f4895db6b73662 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* VcsBase: Move RunFlags into separate headerJarek Kobus2022-10-066-59/+59
| | | | | | | | | It is going to be used outside of VcsCommand, too. Use RunFlags enum as an argument to several functions instead of unsigned. Change-Id: I355c80a845a9b5982108fbde3412754392dce702 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Git: Restore object names for dialogRobert Löhning2022-10-061-0/+4
| | | | | | | Amends ffcf85958feaae416fc5b6cb5aed0c22695cb901 Change-Id: Ia48b114137d722df5f72add818d5729adff94110 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* VcsManager: Use more FilePathJarek Kobus2022-10-052-15/+12
| | | | | Change-Id: I255372c47e6d3ea55e5f8060c3c2fdd9bd155c75 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* VcsCommand: Change the default logic for fully syncJarek Kobus2022-10-051-1/+1
| | | | | | | | | | | | | | | Remove VcsCommand::FullySynchronous flag. Rename VcsCommand::NoFullySync into UseEventLoop. By default the command will run fully synchronous (i.e. without nested event loop). Only when UseEventLoop is specified, and the command runs in main thread, the nested event loop will be used. This change should preserve the current behavior on all code paths. Change-Id: Id4bbaf68402ceed5e3fcc6f294521e87eb0b8d4d Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* VcsBasePlugin: Use more FilePathJarek Kobus2022-10-042-6/+6
| | | | | | Change-Id: I7bc80245b093b210439efdf3ea353b52b288dcc0 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CleanDialog: Use more FilePathJarek Kobus2022-10-021-14/+14
| | | | | Change-Id: Id545b8c412d55d8e1976cbe0bbdad36e22eb93a0 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* GitPlugin: Limit the usage of qMakePairJarek Kobus2022-09-301-6/+6
| | | | | | Change-Id: I9a164d951c43a9fc30bbdfffada22d9876d35e3f Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Various plugins: Limit the usage of qMakePairJarek Kobus2022-09-301-1/+1
| | | | | Change-Id: I9113dd47fb4f9026f3a732aebbd0aee31651b727 Reviewed-by: hjk <hjk@qt.io>
* VcsBaseEditor: Get rid of diffChunkApplied()Jarek Kobus2022-09-291-3/+1
| | | | | | | Drop unused arg from diffChunkReverted(). Change-Id: I5531645d317d62ae92cd0e63dadd583f8ab8996d Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* PatchTool: Introduce PatchAction enumJarek Kobus2022-09-292-8/+7
| | | | | | | | | | Add static PatchTool::confirmPatching() and reuse it in two places. Use Tr::tr() inside PatchTool. Change-Id: I70779619dbb58ab6e46a585bbeff51588ccb2f53 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* DiffEditor: Cleanup includesJarek Kobus2022-09-291-2/+0
| | | | | Change-Id: Id8127b9b0c99ee2a0d5d367cb551a1d5779c5d38 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* VcsCommand: Rename execute() to start()Jarek Kobus2022-09-211-1/+1
| | | | | | | In order to conform to QtcProcess API. Change-Id: I71fcc03846f32cd3c2df39824ce3f6730c20ebbb Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* VcsPlugin: Use VcsCommand::done() signal instead of finished()Jarek Kobus2022-09-202-20/+19
| | | | | | | Conform to QtcProcess interface. Use result() when needed. Change-Id: Idd4c71d9a103e8649b08ec7787c2f286423a31ec Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* PushHandler: Use cleanedStdErr()Jarek Kobus2022-09-201-29/+33
| | | | | | | | Instead of connecting to stdErrText() signal. Change-Id: Ib9fb94ca3fb0b5cbf4871e0ea3b06a047c31d272 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* ConflictHandler: Use cleanedStdOut() and cleanedStdErr()Jarek Kobus2022-09-201-2/+4
| | | | | | | | Instead of connecting to stdOutText() and stdErrText() signals. Change-Id: I3a90fe2a6b17eb804dbd67691a4685e236232456 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* GitBaseDiffEditorController: Use cleanedStdOut()Jarek Kobus2022-09-191-2/+2
| | | | | | | | Instead of connecting to stdOutText() signal. Change-Id: Ia9d1d38934e254a8824620947a409fc52f7f531f Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* GitPlugin: Drop unneeded namespace specifiersJarek Kobus2022-09-061-44/+44
| | | | | | | We have using namespace in this file. Change-Id: I6e9f1259c917c446e52c5e407ec2139cc29c7216 Reviewed-by: Orgad Shaneh <orgads@gmail.com>