* 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>
- If the git config contained old entries for submodules that were
removed (they are not cleaned from the config automatically),
it would add submodules with empty "dir", which lead to infinite
recursion
- When recursing into submodules, we need to prepend the paths from the
git output with the relative path from the main repository
Change-Id: I0bc6a1973f4cdeb1c3f09c05cd7736c25471f72e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
When executing mergetool from the commit editor it is unlikely that the user
wants to do anything but to commit.
Change-Id: I1302951c4afee554b35a261d60f402b56c077681
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Right-clicking a commit on blame shows the parent commit relevant for this file.
In case the file was renamed, fetching the parent can fail (since the file with
this name did not exist before the requested commit).
Using the direct parent is good enough, and should work for all cases.
What the user is really interested in is "how did the file look before this
commit", and the exact "previous" commit is not really interesting.
Change-Id: I7d74efce5f2b065f62e978ba5f14d3010a5f2c7f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
An asynchronous command deletes itself when it ends.
Raw pointer is a bad idea.
Task-number: QTCREATORBUG-15051
Change-Id: Ie2b3a90e308a4bb1e414f924a836d816abf1dfd1
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Remove workaround done in Branches and store copies where they're needed.
Task-number: QTCREATORBUG-14850
Change-Id: I6a81fc5ac02fb11d444906af6cfbe768695c9965
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
The config variable is not required, as Git will get the user's name
from other system settings, like the gecos field in /etc/passwd. So
adapt Qt Creator to use the same mechanism that Git does.
Change-Id: I255870833a024a36adf6ffff13ecb43cc0c45bbf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
It is internal, no reason to expose it.
Change-Id: I7612cfa58cefa22b63635cab66498186b390da8b
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Drop the connect once the editor gets killed. Remove the QSignalMapper
and replace it with a lambda to facilitate that change.
Task-number: QTCREATORBUG-14613
Change-Id: I1a5990bf37af88092933143ebb78dd5ceb9c1222
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
After a successful Cherry-Pick or Revert, a ConflictHandler needs be
instantiated in order to call endStashScope.
This was broken in b6608d0d3.
Change-Id: I2e828fa87695b9ac9972fca569e473b5f63abfec
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
A warning is currently only displayed for reset via context-menu.
Change-Id: If01c6c58dfe8ad0d066f4c6fe02ea3d7bb2c8a55
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Not all jobs of one command can run in the same directory, so
prepare for having individual working directories per job.
Change-Id: Ice43361fe54f2b7153ccd38435f6108d83570082
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Rename the signals used to report stdout/stderr to make it clearer
what they actually do. Remove some unimplemented private member
functions while at it.
Change-Id: I7e856f906ccb45964f3b1b64336d4d8ebca7b9ee
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Move the biggest chunk into Utils::ShellCommand, add some Qt Creator
specific magic in Core::ShellCommand and leave the rest in
VcsBase::VcsCommand.
Change-Id: I5fe6f7076e96023ad2164bcfaacfb3b65a7ff8a8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This is the first step to generalizing the class for wider use.
Change-Id: I40ccb5bec4fdcb9d0a67388160c867799331007b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
VcsBaseClientImpl::createVcsEditor does do the same check.
Change-Id: I89c8d954e8d104261d8ee51a098b97110b4538f4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This name makes it more clear what the method does.
Refactor to use VcsBaseClientImpl::vcsExec.
Change-Id: I4cf742c2b172d2589bd7d6740461e4a4c8d470ed
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
and rename it to vcsExec. Accept a QVariant to set as cookie on the
command instead of a int for the linenumber.
Change-Id: I8240b53e775ac3883f92bdbf7b111abeeeb39426
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
appendCommand() is already called by runVcs.
Change-Id: I215ac00d0efc36e5f62865d7d2cf9941533a160d
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
I see no reason why that should require source encoding.
Change-Id: Idd7103f09fd66f0363f8e58e04a8abdb183f74ca
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Disentangle binding to an existing command from the actual task of
the conflict handler. This makes usage more clear.
Also rename "command" to "abortCommand" which is also more clear
as to what it is used for.
Change-Id: I862cfec97fbf512a3121f0a7d58ae12f148879a6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Use that in the gitplugin in favor of fullySynchronousGit.
Change-Id: Ifd981f3fc5e87e16ad52caf32c204f81acffe586
Reviewed-by: Orgad Shaneh <orgads@gmail.com>