Commit Graph

19 Commits

Author SHA1 Message Date
Orgad Shaneh
202d40f256 Git: Modernize
* Use auto
* Use override
* Use some member initializers

Change-Id: I3ca000d1c8e4d02331d58b85e68e4d771c636b29
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-19 19:47:07 +00:00
Laurent Montel
ac6055eeb0 Git: clean forward declaration
Change-Id: Ic8e988d9fa27f9e92fdcfe111220a5c929998afb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-28 07:05:19 +00:00
Orgad Shaneh
4ed00a348b Git: Make mergetool parsing more robust
Symbolic link conflict is printed in 2 phases: First "  {remote}", and
then "a symbolic link -> 'foo.cpp'".

This happens because this message involves an additional cat process:

  elif is_symlink "$mode"
  then
      echo "a symbolic link -> '$(cat "$file")'"

For local/remote line, wait for a full line before parsing.

Change-Id: I641cde12aa44dee2f7dff8fdae70da0c443e55d3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-09 08:55:04 +00:00
Orgad Shaneh
ff963bc184 Git: Avoid QProcess::waitForReadyRead in MergeTool
It's unreliable on Windows with Qt 5.7.

Change-Id: I0703ae825e9db80ac8063d9f6962863a68591ed6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-20 13:23:35 +00:00
Orgad Shaneh
c64b3f9882 Git: Do not rely on QProcess::readData/writeData in MergeTool
readData always returns 0 in Qt 5.7 (unless the process is not
running)...

Instead, write to the VCS output pane when reading from/writing to the
process.

Change-Id: Ie832d813d5a859b4ff5841fd2888783833c97945
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-20 13:23:30 +00:00
Orgad Shaneh
573958e79f Git: Prompt for unchanged file after custom mergetool fails
To reproduce, create a conflict and configure a custom mergetool that does
nothing:

git config mergetool.my.cmd true
git config merge.tool my

Then execute merge tool from Qt Creator. The merge tool process hangs
while asking how to handle the unchanged file, and can only be killed
externally.

Change-Id: I4d2a91061bd7549e308f6a25f106e6a7afc5cadb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-06-24 03:00:43 +00:00
Tobias Hunger
b4195d5174 Git: Modernize
* pragma once
* member initialization
* s/struct/class/
* Introduce a static GitPlugin::client() method and use it

Change-Id: Ifdcac86dd16f3cdba11d564d03e9a15f00a6afdb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-10 15:01:57 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Tobias Hunger
7b3aa16dc6 Git: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I60dcd378419b92f96dc681921701c9231ef8ee57
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 14:48:09 +00:00
Tobias Hunger
4f7844d6f5 Git: s/GitPlugin::gitClient/GitPlugin::client/
... same name as with almost all other plugins.

Change-Id: I964159044d86685735e8b1e816a0bf67e0576fd8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-08 09:52:25 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Orgad Shaneh
17019955cd Git: Move some functions from MergeTool to GitClient
Needed for interactive rebase

Change-Id: I5ba82735f6521087e7d23d8ee3e1beacd10db30a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-03-01 15:25:35 +01:00
Orgad Shaneh
34fd5ca532 Git: Handle "no changes" case on conflict resolving
Change-Id: I75bb18c9564ffac3de2654bd388465794481b487
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-12 18:41:39 +01:00
Robert Loehning
a040424d2a Incremented year in copyright info
Change-Id: Ia11f4d7a94465de7f12cc390855e54e3256e5455
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-02-01 09:19:26 +01:00
Petar Perisin
65aef73ec4 Git: Added Revert and cherry-pick
Change-Id: Ic8ba7434e79b12eca680a67c2845c82915dc0088
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-21 10:41:01 +01:00
Orgad Shaneh
7ba0433b2b Git: Write mergetool input/output to VCS output window
Change-Id: I75fdf1535da610e6300c76a0b11b3ae032899484
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:12:11 +01:00
Orgad Shaneh
cf6298ff32 Git: Introduce MergeTool support
Change-Id: I906c3c692d9f4819bdf2a1489c42ae04f292894d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-07 16:12:27 +01:00