S7MPXAPHFSUUUUDEDGGUHOJXMEPYCWKYEVK4FVWQLRJLXGBQ4MRQC
From zulip
I wanted to import a rather small repository (90 commits) to pijul and it got messed up. This is the shell script to reproduce an MWE:
rm -rf gittest
git init gittest
cd gittest
mkdir vdir wdir
echo file >vdir/file
echo file >wdir/file
git add .
git commit -m 'Initial commit'
pijul git
pijul diff -u
In a working version, the output of pijul diff -u
should be only .ignore
, but it also contains vdir/file
and wdir/file
.
file
which is inside vdir
or wdir
but only adds the directoriespijul git
does not create a separate root change like a normal pijul record
in an empty repository would do. Though, the first change contains a “Root add” hunk as its first hunk.vdir/file
in a later commit leads to a complete addition of the file as if it was new. This, obviously, changes the content and meaning of that change but “fixes” pijul’s file tracking.Add a commit before all the others which only adds files but no directories. Afterwards, commits adding files and directories are imported as expected.
Thanks for the report and for the very helpful MWE. This is fixed (at least I think).
I imported a rather small git repository with pijul git. The first commit in the repository adds some files at the root and one directory containing one other directory and some files. Alphabetically, the directory is the last item in the tree, all files at the root come before it.
Pijul git misses it and records it as a binary file or an empty directory, I’m not sure. This is the part of the change:
The change ends here, and none of the files inside it (and the one directory) get added to the change.
Files that are changed in later git commits get added in full (in the wrong, later changes). Files that were added in this first git commit and were never changed are missed by pijul git and end up untracked.
Pijul git did not seem to have made any errors in later commits (apart from whole files added in later commits as a consequence of missing them earlier), just the first one.