mattcasters commented on issue #7520:
URL: https://github.com/apache/hop/issues/7520#issuecomment-4973685791

   ## Investigation notes (2.18.1 vs 2.17.0)
   
   I looked into this report on current `main` / 2.18.x and tried to reproduce 
the stated JGit / native-git format cause.
   
   ### Confirmed
   
   1. **Regression surface vs 2.17.0 is real in practice** — not only a silent 
dependency bump:
      - **JGit:** `7.3.0.202506031305-r` (2.17) → `7.5.0.202512021534-r` (2.18 
/ 2.18.1), via the dependency update in #6721.
      - **Git UI:** 2.18 also added the full **Git Perspective** (#6914 / 
#7053). 2.17 did not have `GitPerspective` / PlotWalk-based history; it mainly 
used explorer git info + toolbar actions via `UIGit` / `GitGuiPlugin`.
   
   2. **The screenshots match Hop code.** The log line:
      > `Error checking if commit is in current branch: Missing unknown …`
      
      comes from `GitPerspective.isCommitInCurrentBranch()`, which does:
      ```java
      RevCommit headCommit = 
walk.parseCommit(repository.resolve(Constants.HEAD));
      RevCommit commitToCheck = walk.parseCommit(commit.getId());
      return walk.isMergedInto(commitToCheck, headCommit);
      ```
      So the failure is `RevWalk.parseCommit(...)` → JGit object lookup, not a 
Hop-specific object format parser.
   
   3. **`Missing unknown` means the object was not found in the object 
database** (type hint `OBJ_ANY`). That is “object absent / not readable via 
JGit’s ODB,” not “failed to decode a commit-graph chunk.”
   
   ### Not confirmed (root-cause theory)
   
   The suggestion that JGit 7.5 “can’t parse modern native Git optimization 
files” (commit-graph, multi-pack-index, pack bitmaps) was **not reproduced** 
here.
   
   JGit 7.5 includes commit-graph / multi-pack-index / pack-bitmap support. 
Against local repos with those artifacts, **both JGit 7.3 and 7.5** 
successfully:
   
   - resolved `HEAD` and `parseCommit`
   - ran `PlotWalk` (same style of walk the perspective uses)
   - ran `git.log`
   - walked history after **concurrent native** `commit` + `repack -Ad 
--write-bitmap-index` + `commit-graph write` while a JGit `Repository` stayed 
open
   - handled shallow clones (`--depth 1` / `5`)
   
   So a pure “7.5 can’t read commit-graph / midx / bitmaps” explanation is 
**not supported by these tests**. Those indexes are optional accelerators; the 
observed exception is specifically that an object id could not be opened from 
the ODB.
   
   ### Better working model
   
   - Symptom is consistent with **object-not-found** while the new 2.18 Git 
Perspective aggressively walks/parses commits (history refresh, branch 
membership checks, file diffs).
   - The JGit bump is concurrent with the regression window, but **format 
incompatibility with native optimization files has not been demonstrated**.
   - Other plausible causes still open: incomplete/corrupt local object store, 
refs pointing at objects not fully present locally, dual native-git / JGit use 
in a bad state, Windows-specific pack/path/locking issues (reporter is on 
Windows; not reproduced here).
   
   ### Questions for the reporter (to pin this down)
   
   If you can share any of the following from the **same machine/repo** that 
fails in Hop, that would help a lot:
   
   1. **Full object id** from the `Missing unknown …` dialog/stack (complete 
40-char SHA-1 if possible).
   2. Does native git see that object?
      ```bash
      git cat-file -t <object-id>
      git rev-parse HEAD
      git fsck --no-full 2>&1 | head
      ```
   3. After a failure, does removing optional indexes change Hop behavior? 
(backup first)
      ```bash
      # optional experiment
      mv .git/objects/info/commit-graph .git/objects/info/commit-graph.bak 
2>/dev/null
      mv .git/objects/pack/multi-pack-index 
.git/objects/pack/multi-pack-index.bak 2>/dev/null
      ```
      Then reopen the project in Hop. If it still fails, the indexes are 
unlikely the cause.
   4. How was the repo obtained/updated (clone/fetch/pull client, shallow 
clone, partial clone, worktree, submodule)?
   5. Does `git log -1 --oneline` and the forge UI show commits that Hop’s Git 
Perspective does not list at all, or does history partially load and only some 
actions fail?
   
   Happy to dig further once we have a concrete object id / repo shape.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to