bundle_file運用
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン | |||
| bundle_file運用 [2025/08/30 16:27] – ↷ 移動操作に合わせてリンクを書き換えました。 Minoru Kijima | bundle_file運用 [2026/07/18 11:32] (現在) – Minoru Kijima | ||
|---|---|---|---|
| 行 7: | 行 7: | ||
| * 2025/06/01 Bundleファイルの対象とするコミットを選択する機能を追加 | * 2025/06/01 Bundleファイルの対象とするコミットを選択する機能を追加 | ||
| + | * 2026/07/18 ブランチの選択機能を追加 | ||
| ===== バッチ版 ===== | ===== バッチ版 ===== | ||
| 行 14: | 行 15: | ||
| set ARCHIVE_ZIP=Git-Archive.zip | set ARCHIVE_ZIP=Git-Archive.zip | ||
| set ARCHIVE_TGZ=Git-Archive.tgz | set ARCHIVE_TGZ=Git-Archive.tgz | ||
| - | set REFNAME=refs/ | ||
| set COMMIT=HEAD | set COMMIT=HEAD | ||
| + | for /f " | ||
| + | set REFNAME=refs/ | ||
| :MENU | :MENU | ||
| cd %~dp0 | cd %~dp0 | ||
| 行 25: | 行 27: | ||
| echo L: List of commits | echo L: List of commits | ||
| echo S: Select a commit | echo S: Select a commit | ||
| + | echo B: Select a branch | ||
| echo T: Create Git tgz-archive file | echo T: Create Git tgz-archive file | ||
| echo Z: Create Git zip-archive file | echo Z: Create Git zip-archive file | ||
| echo q: Quit | echo q: Quit | ||
| - | set /P INPUT=" | + | set /P INPUT=" |
| echo. | echo. | ||
| set SELECT=%INPUT: | set SELECT=%INPUT: | ||
| 行 36: | 行 39: | ||
| if " | if " | ||
| if " | if " | ||
| + | if " | ||
| if " | if " | ||
| if " | if " | ||
| 行 62: | 行 66: | ||
| echo [ Select a commit ] | echo [ Select a commit ] | ||
| set /P COMMIT=" | set /P COMMIT=" | ||
| + | goto MENU | ||
| + | :SELECT_B | ||
| + | echo [ Select a branch ] | ||
| + | git branch | ||
| + | set /P BRANCH=" | ||
| + | if NOT " | ||
| + | git switch %BRANCH% | ||
| + | ) | ||
| goto MENU | goto MENU | ||
| :SELECT_T | :SELECT_T | ||
| 行 81: | 行 93: | ||
| ARCHIVE_ZIP=Git-Archive.zip | ARCHIVE_ZIP=Git-Archive.zip | ||
| ARCHIVE_TGZ=Git-Archive.tgz | ARCHIVE_TGZ=Git-Archive.tgz | ||
| - | REFNAME=refs/ | ||
| COMMIT=HEAD | COMMIT=HEAD | ||
| + | BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
| + | REFNAME=refs/ | ||
| # | # | ||
| # Function | # Function | ||
| 行 94: | 行 107: | ||
| L) List of commits | L) List of commits | ||
| S) Select a commit | S) Select a commit | ||
| + | B) Select a branch | ||
| T) Create Git tgz-archive file | T) Create Git tgz-archive file | ||
| Z) Create Git zip-archive file | Z) Create Git zip-archive file | ||
| 行 105: | 行 119: | ||
| } | } | ||
| menu_list | menu_list | ||
| - | echo -n " | + | echo -n "${BRANCH}:${COMMIT}>>> |
| while read input | while read input | ||
| do | do | ||
| 行 132: | 行 146: | ||
| read COMMIT | read COMMIT | ||
| test -z " | test -z " | ||
| + | ;; | ||
| + | B) | ||
| + | echo "[ Select a branch ]" | ||
| + | git branch | ||
| + | echo -n " | ||
| + | read BRANCH | ||
| + | test -n " | ||
| + | BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
| ;; | ;; | ||
| L) | L) | ||
| 行 157: | 行 179: | ||
| echo | echo | ||
| menu_list | menu_list | ||
| - | echo -n " | + | echo -n "${BRANCH}:${COMMIT}>>> |
| done | done | ||
| </ | </ | ||
bundle_file運用.1756571238.txt.gz · 最終更新: by Minoru Kijima
