oXygen (+ git add-on?) seem to modify files unasked

Having trouble installing Oxygen? Got a bug to report? Post it all here.
piotrb
Posts: 15
Joined: Fri Jan 09, 2009 9:18 pm

oXygen (+ git add-on?) seem to modify files unasked

Post by piotrb »

Hi all, do forgive this somewhat sketchy report and an unusual test suite. I'm seeing some kind of issue connected to the git add-on, but it doesn't come up for all repositories. I observed it in the last last 26.0 build for linux, with its corresponding git add-on, and today I see the same under 26.1, after add-on upgrade.

The reason I chose to post here is that the weird behaviour of the add-on may be triggered by something that oXygen does, correcting "offending" characters in filenames. In our case, it was the "è" in "phonothèque" that oXygen apparently wasn't able to tolerate. And it seems that oXygen's escaping the character and changing the filename made the add-on lose it completely.

Issue: after I try to switch branches in the git plugin, the plugin hangs (with a rotating disc), the branch is not switched, but, instead "git status" in the cmdline reports modified files. It looks like it reverts at least two last commits.

how to recreate:
  1. git clone https://github.com/clarin-eric/standards.git
  2. git checkout formats , git checkout dev (they differ very slightly, but maybe crucially)
  3. "dev" is the clean branch, so open oXygen to look at the files in this branch; I opened some files from under clarin/data/ just to make the editor scan the directory or whatever it's doing (was just groping in the dark)
  4. switch to the git add-on and attempt to switch the branch to "formats"
  5. note the rotating disc, kill oXygen, do "git status" in the command line
I have repeated the above while starting with "formats" and trying to check out "dev". Same thing. Unlike the "dev" branch, the "formats" branch has a file with a non-ASCII name, and it looks like oXygen is adamant that it should get normalised/encoded:
Screenshot_20240325_194458.png
Screenshot_20240325_194458.png (8.03 KiB) Viewed 200 times
I am not able to stash the above (rotating disc, no changes in git), and if I do checkout on the commandline, the add-on window gets updated (although the disc keeps rotating). But if I try to do checkout from inside the add-on, the branch remains unchanged and "git status" yields the following:

Code: Select all

On branch dev
Your branch is up to date with 'origin/dev'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   ../../../.github/ISSUE_TEMPLATE/incorrect-missing-format-description.md
        modified:   recommendations/FIN-CLARIN-recommendation.xml
        deleted:    recommendations/MMSHs-Phonotheque-recommendation.xml

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        formats/fCWB-VRT.xml
        formats/fGZIP.xml
        formats/fLMF.xml
        formats/fTAR.xml
        formats/fTSV.xml
        formats/fZIP.xml
        recommendations/._MMSHs-Phonoth?que-recommendation.xml2151942400694989099.tmp
These are not random objects, they are on top of the commit tree. It looks like the add-on reverts the repo to an earlier state when I try to switch branches. I am not sure how relevant the "Phonoth?que" file is, in all that. That was my freshest commit against the "dev" branch (I went to plain ASCII, to avoid the hassle). The "fGZIP" and friends were one commit earlier and not by me, this isn't local corruption.

Ah, I have run git fsck and git-repair on the modified repo, but they didn't report errors.

And let me stress: I used the git add-on yesterday, with another repo, and with no issues at all. Everything started when I noticed that oXygen tries oh so hard to modify the "offending" file name, which, I guess, shouldn't be offending.
Let me also add the state of my options, in case that matters. I have changed the first from ASCII to UTF-8, not really hoping for an effect. And there was no effect indeed.
Screenshot_20240325_200455.png
Screenshot_20240325_200455.png (15.91 KiB) Viewed 200 times
Sometimes (like, now, as I was triple-checking this report) a dialog opens, asking me if I want to stash or move changes when I checkout. Stashing doesn't succeed, and this time I had to click a few more times, and eventually the add-on again dug out the previous commits and untracked them. Moving changes to the branch to be checked out didn't succeed either.

HTH, thanks!
sorin_carbunaru
Posts: 402
Joined: Mon May 09, 2016 9:37 am

Re: oXygen (+ git add-on?) seem to modify files unasked

Post by sorin_carbunaru »

Hi,

Do you have the possibility to check the same scenario on Windows? For me it worked on my machine (wich is a Windows machine) and I'd like to see if the OS makes any difference.

Best wishes,
Sorin Carbunaru
Oxygen XML Editor
piotrb
Posts: 15
Joined: Fri Jan 09, 2009 9:18 pm

Re: oXygen (+ git add-on?) seem to modify files unasked

Post by piotrb »

Hi Sorin,
No, no chance, I'm sorry about that -- I don't touch Windows and can't think of whom I could ask for such a test (gonna think some more).
Best,
Piotr
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: oXygen (+ git add-on?) seem to modify files unasked

Post by Radu »

Hi Piotr,
I tried to reproduce the problem on Mac OS which should have a similar file system with Linux, I'm afraid I am not able to. I even switched to the "formats" branch, made a change, the Git add-on properly presents the modified file's name.
Screenshot 2024-04-03 at 07.55.34.png
Screenshot 2024-04-03 at 07.55.34.png (210.19 KiB) Viewed 72 times
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply