| 817 | } |
| 818 | |
| 819 | VcsJob* GitPlugin::stashList(const QDir& repository, |
| 820 | KDevelop::OutputJob::OutputJobVerbosity verbosity) |
| 821 | { |
| 822 | /* The format returns 4 fields separated by a 0-byte character (%x00): |
| 823 | * |
| 824 | * %gd ... shortened reflog selector |
| 825 | * %p ... abbreviated parent hashes (separated by a space, the first is the commit |
| 826 | * on which the stash was made) |
| 827 | * %s ... subject (the stash message) |
| 828 | * %ct ... committer timestamp |
| 829 | * |
| 830 | * see man git-log, PRETTY FORMATS section and man git-stash for details. |
| 831 | */ |
| 832 | auto* job=qobject_cast<DVcsJob*>(gitStash(repository, QStringList({ |
| 833 | QStringLiteral("list"), |
| 834 | QStringLiteral("--format=format:%gd%x00%P%x00%s%x00%ct"), |
| 835 | }), verbosity)); |
| 836 | connect(job, &DVcsJob::readyForParsing, this, &GitPlugin::parseGitStashList); |
| 837 | return job; |
| 838 | } |
| 839 | |
| 840 | void GitPlugin::parseGitStashList(KDevelop::VcsJob* _job) |
| 841 | { |