git fetch: add --verbose flag to show abandoned commit details#8571
git fetch: add --verbose flag to show abandoned commit details#8571sjawhar merged 1 commit intojj-vcs:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
4ee42e3 to
81ede34
Compare
PhilipMetzger
left a comment
There was a problem hiding this comment.
please remove the pluralization again, also I don't think that you can attribute the authorship to Claude since that will fail the CLA check.
Also the project has no AI policy yet, but it'd be helpful to know if you understand the code change you submitted.
|
What does it do when the global |
81ede34 to
3eb4ac7
Compare
sjawhar
left a comment
There was a problem hiding this comment.
I have reviewed the code but I'm new to this project, so I won't claim to know all the implications downstream. 😅
|
When |
3eb4ac7 to
c71efc9
Compare
PhilipMetzger
left a comment
There was a problem hiding this comment.
LG, thanks for your contribution. You need Yuya's approval though.
c71efc9 to
ae5b61d
Compare
|
Done! Thanks for the quick review. |
ae5b61d to
ea7aa12
Compare
|
Sorry, still getting the hang of things 😅 |
ea7aa12 to
bb79cb4
Compare
bb79cb4 to
5f71ef9
Compare
|
Restored the pub fn print_git_import_stats(
ui: &Ui,
tx: Option<&WorkspaceCommandTransaction<'_>>,
stats: &GitImportStats,
detailed: bool,
)Call sites are now clearer:
|
eb75996 to
ca7d8af
Compare
|
Oops, sorry, I clicked request re-review but haven't fully done a self-review yet. Sorry for all the back and forth, but thank you for helping me get my bearing. I love jj!! |
1e6ac3d to
5dfa3d0
Compare
|
Done! I removed the test. I'm curious - how do you think about when a new test is needed vs. when existing test coverage is sufficient? I initially added the test because it felt like a "new behavior" that deserved explicit coverage, but I can see now that the existing tests already exercise the same code path and verify the output. Would love any tips on developing better intuition for this - trying to make future contributions smoother! 😅 |
|
Nit: Please move (or copy) most of the PR description to the commit description so the information is available to anyone looking at the commit in the future (including if we move the repo off of GitHub) |
As Yuya said, it's not needed because it's covered by existing tests. That means that if we have a regression in this code, we will notice it because those tests will fail. However, it's important that the tests don't just happen to test this functionality, because then the test might change in the future to no longer test this code. In this case, there are several tests that cover, and in particular the |
Closes jj-vcs#3081 Abandoned commits are now shown with their change IDs and descriptions when fetching, matching the `jj abandon` output format. Example output: bookmark: main@origin [updated] tracked Abandoned 2 commits that are no longer reachable: qpvuntsm 12345678 local work that was rebased kkmpptxz 87654321 another local commit Changes: - Split print_git_import_stats() into two functions: - print_git_import_stats(ui, tx, stats) - detailed version with commit summaries - print_git_import_stats_summary(ui, stats) - summary only (for init/auto-import) - Abandoned commit details shown by default (limited to 10 commits) - Uses print_updated_commits() with commit_summary_template() for consistent formatting - Failed refs are always shown, even in quiet mode (bug fix)
5dfa3d0 to
458f742
Compare
Summary
Closes #3081
Abandoned commits are now shown with their change IDs and descriptions when fetching, matching the
jj abandonoutput format.Example output:
Changes
print_updated_commits()withcommit_summary_template()for consistent formatting--quietis specified, no abandoned commit information is shownTest Plan
--quietsuppresses output