We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af4c42d commit 113aa27Copy full SHA for 113aa27
1 file changed
src/test/integration/git.test.ts
@@ -198,12 +198,21 @@ const makeFileChanges = async (
198
dir: repoDirectory,
199
filepath: "some-dir/nested",
200
});
201
- await git.commit({
+ const newCommit = await git.commit({
202
fs,
203
204
message: "Add symlink",
205
author: { name: "Test", email: "test@test.com" },
206
207
+ // In detached HEAD state, isomorphic-git doesn't update HEAD after commit.
208
+ // Use writeRef to update HEAD to point to the new commit.
209
+ await git.writeRef({
210
+ fs,
211
+ dir: repoDirectory,
212
+ ref: "HEAD",
213
+ value: newCommit,
214
+ force: true,
215
+ });
216
217
if (changegroup === "with-changed-symlink") {
218
await fs.promises.rm(path.join(repoDirectory, "some-dir", "nested"));
0 commit comments