9front - general discussion about 9front
 help / color / mirror / Atom feed
From: James Cook <falsifian@falsifian.org>
To: 9front@9front.org
Subject: [9front] git crash (related to file becoming directory?)
Date: Sat, 09 Nov 2024 23:47:19 +0000	[thread overview]
Message-ID: <2CJ5RGAHSC91T.1Z1JD8188WV34@falsifian.org> (raw)

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'

             reply	other threads:[~2024-11-09 23:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-09 23:47 James Cook [this message]
2024-11-10  0:00 ` ori
2024-11-10  1:32   ` ori
2024-11-10  2:10     ` James Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2CJ5RGAHSC91T.1Z1JD8188WV34@falsifian.org \
    --to=falsifian@falsifian.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).