Skip to content

Instantly share code, notes, and snippets.

@oprypin
Created September 8, 2023 13:05
Show Gist options
  • Save oprypin/33d8b71f93bc60d8077e036e02939779 to your computer and use it in GitHub Desktop.
Save oprypin/33d8b71f93bc60d8077e036e02939779 to your computer and use it in GitHub Desktop.
Merge cimgui docking_inter branch into master and re-generate
#!/bin/bash
set -ex
to_merge="${1:-docking_inter}"
imgui_branch="${2:-master}"
git merge --no-ff --no-commit "$to_merge" || true # Always fails
# But double-check that we really ended up in a merge status
git rev-list -1 MERGE_HEAD
# Reset everything to be like the merged branch
git checkout "$to_merge" .
# Update imgui
git submodule update
(
cd imgui
git fetch
# Update to corresponding master-based version of imgui
git checkout $(git merge-base HEAD "origin/$imgui_branch")
)
# Re-generate
(
cd generator
./generator.sh
)
git add -u
# Commit with default commit message
GIT_EDITOR=true git merge --continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment