summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* gpush: add support for specifying multiple push sourcesOswald Buddenhagen2024-01-091-32/+59
| | | | | | | | | so far i assumed that --all would be enough, but now that i'm submitting kernel patches in batches to avoid utterly flooding the list, being able to explicitly specify multiple series seems quite useful. Change-Id: I119745f95b079de6d1cbfed84184641ffcbc29c2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: make chaining series comfortableOswald Buddenhagen2024-01-092-50/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is for series that have local dependencies, but are nonetheless logically separate. a base that refers to a local Change will now get translated to that Change's latest PatchSet at the time the push happens, regardless of whether it was actually specified as that PatchSet's sha1, the Change-Id, or the current sha1 of the local commit. i can't think of a reason why that would be undesirable, so there is no opt-out from that. we don't auto-rebase when the parent is re-pushed, to minimize churn. instead, the new option --rebase-chained needs to be used for that. this is in the spirit of --minimal (it may make sense to link the behavior to that option, but things get a bit messy then). we don't automatically push the parent series, either. but if we did, in combination with auto-rebasing, this would effectively create atomic series whose parts can have different attributes, for example different reviewers (but note that we currently don't persist these locally anyway). however, such auto-chaining would be rather tricky in conjunction with --minimal when a series has multiple children. and realistically, push --all mode should be adequate in practice. Change-Id: I7a9608c99091a8a373c36af8ba95559234a5857c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: delay (re-)setting the push base to the local branch's baseOswald Buddenhagen2024-01-091-1/+10
| | | | | | | | | | | | | | when the series isn't pushed right away, but only (re-)grouped, then it is more intuitive to postpone resetting the base until the actual push, lest one will have to rebase again (when the local series receives another conflicted rebase in between). the wording of the help text is intentionally very broad, as it will soon cover more cases. Change-Id: I3ca99bc5d011b546e9f014c176c3c1bbc0f7a8e7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush/gpick: try to preserve group idsOswald Buddenhagen2024-01-092-5/+37
| | | | | | | | | | | | | | | | a subsequent commit will require the gids to stay stable. it also improves the optics, making debugging somewhat easier: git diff refs/gpush/state@{1}..refs/gpush/state now returns something that actually looks sane in most cases. if we actually versioned the state file, this would also save space, but as there is no need for versioning beyond what the reflog provides, this is kinda moot. Change-Id: If222c4763527bcfe3629bc181339176de095db39 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush/gpick: enable specifying 'all' with --move/--copy/--hideOswald Buddenhagen2024-01-092-15/+40
| | | | | Change-Id: Id6c00ac74b8892f498e70a23e65a143ca79753c7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush/gpick: compress output from local branch trackingOswald Buddenhagen2024-01-091-38/+70
| | | | | | | | | | | | | | it is rather common that many Changes are affected by the same event/ error, so reporting them individually would lead to quite noisy output. so instead collect them in hashes indexed by the event, and output them only at the end. "regular" error reports are now also delayed, so notices are always printed prior to error messages, so the actionable items are most likely to remain in view. Change-Id: I2c130fe3f5053283e9ee4bfb66d67bbb5beb2716 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: remove support for legacy from:to syntaxOswald Buddenhagen2024-01-091-13/+0
| | | | | | | | commit 14431b408 introduced the new syntax and warnings about use of the legacy syntax six years ago, which really should be enough. Change-Id: Ieeedb8fe85a79a108e654c9ba9f7464789735b61 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: don't reject a plain tip revspec with --allOswald Buddenhagen2024-01-091-2/+0
| | | | | | | | | | this is documented to work, and is actually useful. code which correctly rejects the specification of ranges is already present further down. amends b36c69ea. Change-Id: I6ab153f2ccc601a6317a5cb96999e4f987e55562 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: introduce option to add missing Change-Id footersOswald Buddenhagen2024-01-092-12/+129
| | | | | | | | | | it's not exactly rare to try to push something to Gerrit, only to discover that the commit-msg hook wasn't installed. of course one can fix that and then simply run 'git rebase -i' and 'reword' each commit, but that gets a bit tedious with a lot of Changes ... Change-Id: I5a47f615452cc929dacbe621cc3116d2d8cc7b2d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush/gpick: split analyze_local_branch()Oswald Buddenhagen2024-01-093-11/+20
| | | | | | | | | | this is preparatory refactoring, but it has an immediate side effect on gpick: we now process the branch tracking options (--move & co.) even if there are no local Changes, so we can print error messages about their over-use. Change-Id: If1bb8a3734234d90d5121a3286a9c94e4b96b86e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush/gpick: reshuffle sanity check in analyze_local_branch() somewhatOswald Buddenhagen2024-01-091-18/+19
| | | | | | | | | | | run it on the re-enumerated commits rather than the raw ones. most visibly, this saves one loop. it also has the effect of checking only along the 1st parents, which is consistent with the overall operation of the scripts. another effect will manifest only after a subsequent patch: no double-examination of some commits. Change-Id: I60b612a52b9e86470f7b75241e45dae4e8637e77 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush/gpick: resolve branch names internallyOswald Buddenhagen2024-01-091-1/+3
| | | | | | | | | | | | we have the local refs loaded up, so we can resolve them in-process, just like we already did with HEAD. this is an optimization, but the real intent is a prospective bug fix (if we manipulated the refs only in memory (due to --dry-run) prior to using them). consequently, we don't do ancestry traversal (e.g., HEAD~3) in-process (yet). Change-Id: I1930c61c986d846b37f02ca00aaa5a6c6a5d9bac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: revamp initialize_get_changes()Oswald Buddenhagen2024-01-092-104/+61
| | | | | | | | | | | | try to extract the branch from the $from revspec prior to trying to resolve it. this has roughly the same cost in case of expected failure (that is, when the revspec uses a Change-Id), but it is a lot cleaner, as we need only a little more code in determine_local_branch() (and by extension branch_for_commit()), while parse_local_rev_id() disappears, which enables a massive consolidation of parse_local_rev(). Change-Id: If864848c302809e3ba444be9f4ac2a4133e26111 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: pull ahead the normalization of rev-specs with omitted HEADOswald Buddenhagen2024-01-091-2/+2
| | | | | | | | | | ... like "~4", or even "". this kinda falsifies possible error messages, but arguably it's better to report what we thought the user wants, rather than just echoing the input - and parse_local_rev() already does it that way, too. Change-Id: I6b0d3b3977833818cf81a6a9d9e44b1dfb168334 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush/gpick: revamp querying value of HEADOswald Buddenhagen2024-01-093-50/+60
| | | | | | | | | | | | | | don't invoke git symbolic-ref on-demand, but just load it up in-process in load_state(), which is a lot cheaper. in conjunction with the local branch heads which we already loaded up, we can simplify quite some code at no runtime cost. this also fixes the corner case of _parse_local_rev_sym() returning the tip of the wrong branch for a plain HEAD revspec when the $from revspec refers to another branch than HEAD does. Change-Id: Iffcb153f5888293c7df7a62dc692bb6196b18c93 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: don't let rebasing detached HEAD confuse our branch guessingOswald Buddenhagen2024-01-091-0/+1
| | | | | Change-Id: Ib3b9d306c811a3ddafd45f2c97d7d2237aa93907 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: make `from` commit source classification more exactOswald Buddenhagen2024-01-091-6/+14
| | | | | | | | makes things somewhat less magical, which will become even more relevant in subsequent commits. Change-Id: I93644a00001a71eed4d48d1d06c8e932165877ac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: try to determine a source branch more aggressively, part 2Oswald Buddenhagen2024-01-091-6/+16
| | | | | | | | | | | | | originally, the only purpose of determining the source branch was deriving the target branch from it, so it made sense to consider only branches with upstreams. however, since commit 6cc199457, and even more since commit 535da8885f, we try to "overshoot" the specified tip, for which it makes sense to determine the branch even if it has no upstream. also, since commit 7d020859f, and even more since commit 03c8458dd, the local branch matters for state tracking. Change-Id: Iec9dddddef4b9577516392c36c2d454fcb4a23a6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: try to determine a source branch more aggressively, part 1Oswald Buddenhagen2024-01-091-1/+4
| | | | | | | | | | | so far, we stopped the iteration over `git branch --contains` when git told us that HEAD is detached (which it would do as the first thing). this would lead to ignoring the branch HEAD was detached from, thus causing somewhat spurious "no upstream" notices. so don't do that anymore. Change-Id: I7ed341e875f307951eb110b3ca5e30e62a71879b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush/gpick: return found commits from analyze_local_branch()Oswald Buddenhagen2024-01-092-4/+4
| | | | | | | | | | ..., so gpick doesn't need to invoke get_commits_free($local_tip) again. the historical reason for this apparent sillyness is that prior to a3a05fe72, we returned the raw rev-list without --first-parent (and in 97259060d, we stopped returning commits altogether). Change-Id: I1fb8f636019f86214ac320d2ecc4ee7128cd4523 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpick: fix incorrect rejection of ROOT and @{upstream} parent commitsOswald Buddenhagen2024-01-091-2/+2
| | | | | | | | | don't try to validate 'ROOT' and '' (upstream) as real commits, as this would obviously fail. this would affect only the use as SPEC_PARENT, as SPEC_BASE is whitelisted anyway. Change-Id: I7a4f76c5e6a550c03d58f9042bd0f911c39007c0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpick: try to deduce remote series base from topicOswald Buddenhagen2024-01-092-6/+38
| | | | | | | | | | | | | | | | | in lieu of gerrit actually saving the base of a series for us, consider inconsistent topics to be a marker for a series ending before hitting upstream, and therefore being based on another pending series. gpush gets a complementary check that the chained series have different topics. an alternative would be auto-generated topics, but that wouldn't be too friendly to reviewers. as a drive-by, we don't try to aggregate the 'hidden' property on loose Changes any more - these have no persistent properties, so it was pointless. Change-Id: I2c538fe91d9c50fcf87fc6284f621fb3e633b2df Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpick: revamp tails of advance_*_series()Oswald Buddenhagen2024-01-091-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | the pushed/picked commit is already resolved by map_queries(), and with it comes the base assigned by set_base_{imposed,deduced}(). using this allows us to remove two indirections and conditionals. more importantly, the processed data becomes authoritative, which a subsequent commit will make use of. this doesn't change anything for remote series; the base fallback chain which this would have broken was removed in a prior commit. for pushed series things are more complicated. firstly, the following affects only Changes that have been rebased out of the local branch, as the remaining ones are in the initial set and are therefore handled further up. when gerrit imposes no base (that is, currently always) we would now set the deduced base, while formerly we'd have inherited the one from the child commit. to avoid a regression (ignoring the separation of chained series), we now fall back to imposing the locally recorded push base instead. Change-Id: I1703f614b6571ee7adf6a9452b8f7a404d3b30f1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpick: simplify timestamp determination when completing pushed seriesOswald Buddenhagen2024-01-091-31/+24
| | | | | | | | | | | create a mapping in complete_spec_tails() like we already did for pushed and base commits. this removes the error checking redundancy between advance_pushed_series() and complete_pushed_series(), and avoids that errors are printed repeatedly if multiple attempts are made at completing the series. Change-Id: Ieef2395afff32b42f2a74dc3c1d8d74989265e1e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpick: remove series base fallback from advance_pushed_series()Oswald Buddenhagen2024-01-091-2/+1
| | | | | | | | | each pushed Change also has a matching base, so the fallback chain was pointless. (and a missing base will just cause traversal until hitting upstream, so incomplete state data would be harmless.) Change-Id: I78ecea6fa30155aeabfff3af8b40589c5e7d9042 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpick: expand comment on complete_pushed_series()Oswald Buddenhagen2024-01-091-1/+10
| | | | | | | | | it took me long enough to figure out again why i did it that way ... amends 143b73c14. Change-Id: Ic87fe6083944e79710f5dea12d4157a614cec293 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpick: remove local base hinting when assembling remote seriesOswald Buddenhagen2024-01-091-21/+21
| | | | | | | | | | | | | | | | | | | | | | the idea was to augment the remote series with a possibly present local base (when series are chained), in case gerrit doesn't save it for us (which currently is always, as the feature isn't even implemented yet). however, this had three problems: - using sha1s is a non-starter for remote series that have been rebased. - due to missing integration with set_base_deduced(), do_adjust_changes() would be unaware of the base. - the remote side may have re-grouped the series, at which point local hinting would make quite a mess. the first two problems would be fixable with a Change-Id based implementation in set_base_deduced(), but the last one is inherent. so just rip it out. we'll introduce topic-based series splitting in a later commit, which avoids anomalies and is actually visible on gerrit. Change-Id: I5d56f0498e190ac51d2000f89b570f55e48c7ef7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: add option to include range-diff into patch re-rollsOswald Buddenhagen2024-01-093-7/+66
| | | | | | | | | | unlike on gerrit for two PatchSets, one cannot simply view the diff between two patch versions. to address this issue, git format-patch has the --range-diff option to include the delta into the new version of the patch series itself. Change-Id: I3f044fe0da36c0e309701b5bb17f0f05956b5db1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush/gpick: save tip Change of each pushOswald Buddenhagen2024-01-094-5/+38
| | | | | | | | for the time being, this only enables more accurate reconstruction of the pushed series in gpick in case Changes were dropped from the end. Change-Id: I1f1ef9a8b1108e9a425db8cdeff6253c6b7ef7ff Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: make setting the In-Reply-To: header in mail mode comfortableOswald Buddenhagen2024-01-092-3/+49
| | | | | | | | | | | unlike the generic format options that should persist, this is a one-shot parameter that should auto-destruct after each roll. i pondered coupling the application and reset to --keep-version, but was unable to come up with sensible semantics. Change-Id: I9524ce5138fe62166c6a2d7e4685b20e4690d7a9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: make it possible to set a description on each seriesOswald Buddenhagen2024-01-092-6/+131
| | | | | | | | this can be much more verbose than a topic name, and is aimed at authoring cover letters in mail mode. Change-Id: I65f769ee0c018e840a7561065f6da0da3bb94417 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: make it possible to set format-patch options in mail modeOswald Buddenhagen2024-01-092-10/+105
| | | | | | | | | | | this is required for setting mail receivers and actual patch formatting options. the relevant options are identical for send-email and format-patch, so we don't differentiate these. Change-Id: Ie7f35b3402531ecec7762e07b32526c909589809 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: introduce infra for displaying additional group meta-dataOswald Buddenhagen2024-01-091-6/+18
| | | | | | | | | | | | | | | | | | print additional info between a series' caption and list of Changes. this will be used for info that is (potentially) way too big to fit into the caption itself. to be able to suppress this, we make --list compatible with --quiet. note that in --group and push modes this is not possible, as there --quiet just completely suppresses the listing. this seems fine, as these don't have the different levels of --list/-rebase/-online, either. as a drive-by, --list becomes compatible with --verbose as well - there isn't really a reason for it not to be, and since the recent introduction of --list-rebase it is actually somewhat useful. Change-Id: I5b4f9a91b73ea4816ac9631d2662765aaa3df7df Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush/gpick: introduce infra for indirect propertiesOswald Buddenhagen2024-01-092-0/+51
| | | | | | | | | | | | | | | | | | | | | | | rather than having the same (potentially big) value in each Change it was assigned to, duplicate only a small id. an arguably cleaner way to approach this would be saving actual group properties rather than aggregating them on the fly from Change properties. but when i implemented this, it turned out that we'd have to be able to resolve conflicts resulting from merging groups in rather inopportune places: gpick calls assign_series() from deduce_series() (though a conflict occurring due to this is a rather academical case) and from _source_map_finish_initial() via analyze_local_branch(). this means that we'd have to add the property-overriding command line options to gpick (which is ugly) or we'd have to croak in gpick and tell the user to use gpush first instead (which is also ugly). more broadly, group properties aren't a very good fit for gerrit, where groups aren't even a thing. this is why we don't use them in the first place. Change-Id: I555360de0fc08b698213e56045ca408c1ee47851 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: add patch series versioning in mail modeOswald Buddenhagen2024-01-092-11/+61
| | | | | | | | | it's customary to tag re-rolls of patch series with a modified subject like "[PATCH v2 1/13]", which this implements. this is equivalent to Gerrit's PatchSet numbers. Change-Id: I1ad34e90956835a6b4540ce93c0a2633e1455522 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: introduce "mail" modeOswald Buddenhagen2024-01-093-58/+241
| | | | | | | | | | | i work on the linux kernel and git, both of which still use patch-based workflows, at least for non-maintainer contributions. there are various other tools which support the "stacked branches" workflow gpush centers around, but none of them is nearly as comfortable as gpush. so there we go: a gerrit-free mode in "git-gerrit-push". Change-Id: Ifb2d603a06d0b7825392a37967a5f6c28ed79455 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: skip advance_base() when there are no upstreamed ChangesOswald Buddenhagen2024-01-091-13/+16
| | | | | | | | | this is technically a minor optimization, but will be actually a bugfix after the next commit (when the commits in 'pushed' don't necessarily have Change-Ids). Change-Id: Ie4b6a18150cbecd7889f221ceb8719f12b31c9a7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: annotate excluded series as much as possibleOswald Buddenhagen2024-01-091-5/+7
| | | | | | | | | these series are excluded from pushing --all, but are otherwise very much "alive" and can be pushed any time. therefore, it's counter-productive to omit their meta data from the listing. Change-Id: I64acb16f284edeb879ede13c7c482c65460fa2e6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: make --all compatible with --groupOswald Buddenhagen2024-01-091-7/+23
| | | | | | | | the primary target for this is the future --rebase-chained option, but bulk (re-)setting some other group properties may also make sense. Change-Id: I9e584a4994f39b1623d74e98a9c7c30c063364e9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: make --group preserve pending propertiesOswald Buddenhagen2024-01-091-6/+19
| | | | | | | | | | | | | | | | | | | | second step towards making --all compatible with --group. --group resetting the pending properties seemed reasonable at the time, but as more persistent properties are added, this becomes increasingly annoying. also, it's inconsistent with "committed" (already pushed out) properties being preserved. this is a backwards-incompatible behavior change, but this is likely to be actually a good thing, as the old behavior was unexpectedly destructive. this also introduces the --reset-props option which has the behavior plain --group had previously. the utility of this is debatable, as it maintains the inconsistent behavior, but whatever. Change-Id: I35162138e34c885ef200a315a797f531d2c079a5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: split off --include from --groupOswald Buddenhagen2024-01-091-12/+19
| | | | | | | | | | | | | | | | first step towards making --all compatible with --group, which requires the latter to be "neutral" in itself. this is a backwards-incompatible behavior change, as --group will now do less than historically expected. this is non-destructive and can be easily noticed on the next push --all, so i think it's acceptable. the error messages don't mention --exclude any more (or --include, for that matter), as these options are now documented to explicitly imply --group. Change-Id: I38c44beb306606286e889ab3173ae9e74ed8573a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: permit setting more attributes in --all modeOswald Buddenhagen2024-01-091-7/+10
| | | | | | | | one may reasonably want to (re-)set the target branch of all series. un-setting the topic of all series may be useful as well. Change-Id: I079566c8d809ebc0ab4da6f2e18713df48248ef0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: add --list-rebase modeOswald Buddenhagen2024-01-091-14/+50
| | | | | | | | | --group doesn't test whether pushing with the specified base would actually work, as that would be slow and is usually not necessary. the latter will change with some upcoming features. Change-Id: I545c611bfc48f44350e4eb0fd16853b985b7d4ec Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: permit base-modifying options with --list-onlineOswald Buddenhagen2024-01-091-2/+5
| | | | | | | | it may be useful to test the effect of a rebase without committing to it yet. Change-Id: I99bf6c2c6661a08becf04f61c80b361ea6609d93 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* gpush: reuse trees more aggressivelyOswald Buddenhagen2024-01-091-7/+13
| | | | | | | | | handle the case of rebasing the same diff to the same base tree. this occurs when ancestors are amended without tree modification, are split or joined, or hunks are moved between them. Change-Id: I75aaea557884658a4a4dcad7502360b61f590a9a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: cache rebased commits more aggressivelyOswald Buddenhagen2024-01-092-41/+134
| | | | | | | | | | | we now save the rebased commits even if they are not actually pushed out, which is the case with --list-online, and even on a regular push attempt that errors out due to failing to rebase another series. this vastly accelerates repeated listing and the subsequent push for series that are not rebased meanwhile. Change-Id: I1c9df94193a07d827d7cfea5a51980ff3f47f58a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: simplify parent_trees_equal()'s parameter listOswald Buddenhagen2024-01-091-4/+5
| | | | | | | | don't pass the resolved parent commit. saving the hash lookup doesn't buy much, but makes the calls more convoluted. Change-Id: I414093fb3cd441429e0a7b16e23c527ca0dcd7ca Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: inline get_1st_commit()Oswald Buddenhagen2024-01-092-8/+1
| | | | | | | it's trivial and there was only one caller. Change-Id: If1c1d925470a377e08ade71bdf888161fd798970 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush/gpull: return ROOT early in get_1st_parent_tree()Oswald Buddenhagen2024-01-091-1/+2
| | | | | | | | this clarifies the code by not pretending that we may get a commit for it. Change-Id: I4d76b914774c5dae0b5c57720071faacca689aac Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* gpush: don't forget to update series' topicOswald Buddenhagen2024-01-091-6/+3
| | | | | | | | amends c4d197e489, which enabled setting the topic even on unmodified Changes. Change-Id: Ifd2c254da8a989708a014cfe5e6dcab73c37fbbe Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>