* [9front] git crash (related to file becoming directory?)
@ 2024-11-09 23:47 James Cook
2024-11-10 0:00 ` ori
0 siblings, 1 reply; 4+ messages in thread
From: James Cook @ 2024-11-09 23:47 UTC (permalink / raw)
To: 9front
The following steps cause git/commit to die. Specifically, git/save fails with "assert failed: s[off] != '".
1. Make a copy of the 9front repo (I used commit e4373dd1038fd8e0369d595283b032d011f28e59).
2. In a new branch, add a file at lib/ndb/local.
3. Go back to the front branch and make any other change.
3. Go back to the new branch and try to merge front.
I've included a script to reproduce below my signature. For it to
work, ./plan9front should be a freshly cloned plan9front; my script
starts with dircp because I don't want to clone from upstream every
time I test my script.
I am running into this because I maintain a private branch where I
keep things like lib/ndb/local, and I (try to) merge front into it
every time I update. I have been able to work around this bug with
dirty manual intervention. (At one point I think it was enough to
fudge the INDEX9 file by removing the entry claiming lib/ndb was
removed, but more recently I've had to fiddle with the paths passed
to git/save by git/commit; IIRC I moved lib/ndb/local to after
lib/ndb/)
--
James
#!/bin/rc -ex
rfork en
mkdir -p bug
dircp plan9front bug
cd bug
git/branch -n myhead
mkdir lib/ndb
touch lib/ndb/local
git/add lib/ndb/local
git/commit -m 'Add lib/ndb/local' lib/ndb/local
git/branch front
echo cromulent >> lib/words
git/commit -m 'Some change on front' lib/words
git/branch myhead
git/merge front
git/commit -m 'Merge front'
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9front] git crash (related to file becoming directory?)
2024-11-09 23:47 [9front] git crash (related to file becoming directory?) James Cook
@ 2024-11-10 0:00 ` ori
2024-11-10 1:32 ` ori
0 siblings, 1 reply; 4+ messages in thread
From: ori @ 2024-11-10 0:00 UTC (permalink / raw)
To: 9front
this doesn't seem to reproduce for me; are you running
the most recent version of git?
if so, can you get a stack trace?
Quoth James Cook <falsifian@falsifian.org>:
> The following steps cause git/commit to die. Specifically, git/save fails with "assert failed: s[off] != '".
>
> 1. Make a copy of the 9front repo (I used commit e4373dd1038fd8e0369d595283b032d011f28e59).
> 2. In a new branch, add a file at lib/ndb/local.
> 3. Go back to the front branch and make any other change.
> 3. Go back to the new branch and try to merge front.
>
> I've included a script to reproduce below my signature. For it to
> work, ./plan9front should be a freshly cloned plan9front; my script
> starts with dircp because I don't want to clone from upstream every
> time I test my script.
>
> I am running into this because I maintain a private branch where I
> keep things like lib/ndb/local, and I (try to) merge front into it
> every time I update. I have been able to work around this bug with
> dirty manual intervention. (At one point I think it was enough to
> fudge the INDEX9 file by removing the entry claiming lib/ndb was
> removed, but more recently I've had to fiddle with the paths passed
> to git/save by git/commit; IIRC I moved lib/ndb/local to after
> lib/ndb/)
>
> --
> James
>
>
> #!/bin/rc -ex
> rfork en
>
> mkdir -p bug
> dircp plan9front bug
> cd bug
> git/branch -n myhead
> mkdir lib/ndb
> touch lib/ndb/local
> git/add lib/ndb/local
> git/commit -m 'Add lib/ndb/local' lib/ndb/local
> git/branch front
> echo cromulent >> lib/words
> git/commit -m 'Some change on front' lib/words
> git/branch myhead
> git/merge front
> git/commit -m 'Merge front'
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9front] git crash (related to file becoming directory?)
2024-11-10 0:00 ` ori
@ 2024-11-10 1:32 ` ori
2024-11-10 2:10 ` James Cook
0 siblings, 1 reply; 4+ messages in thread
From: ori @ 2024-11-10 1:32 UTC (permalink / raw)
To: 9front
ignore that, I suck; found and fixed.
Quoth ori@eigenstate.org:
> this doesn't seem to reproduce for me; are you running
> the most recent version of git?
>
> if so, can you get a stack trace?
>
> Quoth James Cook <falsifian@falsifian.org>:
> > The following steps cause git/commit to die. Specifically, git/save fails with "assert failed: s[off] != '".
> >
> > 1. Make a copy of the 9front repo (I used commit e4373dd1038fd8e0369d595283b032d011f28e59).
> > 2. In a new branch, add a file at lib/ndb/local.
> > 3. Go back to the front branch and make any other change.
> > 3. Go back to the new branch and try to merge front.
> >
> > I've included a script to reproduce below my signature. For it to
> > work, ./plan9front should be a freshly cloned plan9front; my script
> > starts with dircp because I don't want to clone from upstream every
> > time I test my script.
> >
> > I am running into this because I maintain a private branch where I
> > keep things like lib/ndb/local, and I (try to) merge front into it
> > every time I update. I have been able to work around this bug with
> > dirty manual intervention. (At one point I think it was enough to
> > fudge the INDEX9 file by removing the entry claiming lib/ndb was
> > removed, but more recently I've had to fiddle with the paths passed
> > to git/save by git/commit; IIRC I moved lib/ndb/local to after
> > lib/ndb/)
> >
> > --
> > James
> >
> >
> > #!/bin/rc -ex
> > rfork en
> >
> > mkdir -p bug
> > dircp plan9front bug
> > cd bug
> > git/branch -n myhead
> > mkdir lib/ndb
> > touch lib/ndb/local
> > git/add lib/ndb/local
> > git/commit -m 'Add lib/ndb/local' lib/ndb/local
> > git/branch front
> > echo cromulent >> lib/words
> > git/commit -m 'Some change on front' lib/words
> > git/branch myhead
> > git/merge front
> > git/commit -m 'Merge front'
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9front] git crash (related to file becoming directory?)
2024-11-10 1:32 ` ori
@ 2024-11-10 2:10 ` James Cook
0 siblings, 0 replies; 4+ messages in thread
From: James Cook @ 2024-11-10 2:10 UTC (permalink / raw)
To: 9front
ori@eigenstate.org wrote:
> ignore that, I suck; found and fixed.
Thanks! But there is still a bug: lib/ndb/local isn't included in
the commit. New repro script follows. The last "git/diff" shows
lib/ndb/local is missing from the merge commit.
--
James
#!/bin/rc -ex
rfork en
mkdir bug
dircp plan9front bug
cd bug
git/branch -n myhead
mkdir lib/ndb
echo stuff > lib/ndb/local
git/add lib/ndb/local
git/commit -m 'Add lib/ndb/local' lib/ndb/local
git/branch front
echo cromulent >> lib/words
git/commit -m 'Some change on front' lib/words
git/branch myhead
git/merge front
git/commit -m 'Merge front'
git/diff lib/ndb/local # should have no output
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-10 2:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-09 23:47 [9front] git crash (related to file becoming directory?) James Cook
2024-11-10 0:00 ` ori
2024-11-10 1:32 ` ori
2024-11-10 2:10 ` James Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).