Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion SimpleGit-Provider.lvproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<Property Name="NI.DISK" Type="Bool">true</Property>
</Item>
<Item Name="support" Type="Folder">
<Property Name="NI.SortType" Type="Int">3</Property>
<Item Name="menu-operation.lvlib" Type="Library" URL="../SimpleGit/Git/_Support/menu-Operations/menu-operation.lvlib"/>
<Item Name="Close Caller FP if In LabVIEW folder.vi" Type="VI" URL="../SimpleGit/Git/_Support/Close Caller FP if In LabVIEW folder.vi"/>
<Item Name="DailyPatchBranchName.vi" Type="VI" URL="../SimpleGit/Git/_Support/DailyPatchBranchName.vi"/>
<Item Name="Git Check whether Branch exists.vi" Type="VI" URL="../SimpleGit/Git/_Support/Git Check whether Branch exists.vi"/>
Expand All @@ -34,7 +36,7 @@
<Item Name="lvgit pull.vi" Type="VI" URL="../SimpleGit/Git/_Support/lvgit pull.vi"/>
<Item Name="lvgit push.vi" Type="VI" URL="../SimpleGit/Git/_Support/lvgit push.vi"/>
<Item Name="lvgit status.vi" Type="VI" URL="../SimpleGit/Git/_Support/lvgit status.vi"/>
<Item Name="menu-operation.lvlib" Type="Library" URL="../SimpleGit/Git/_Support/menu-Operations/menu-operation.lvlib"/>
<Item Name="path to cmd argument.vi" Type="VI" URL="../SimpleGit/Git/_Support/path to cmd argument.vi"/>
<Item Name="SimpleGit Setting Dialog.vi" Type="VI" URL="../SimpleGit/Git/_Support/SimpleGit Setting Dialog.vi"/>
<Item Name="SimpleGit-Commit.vi" Type="VI" URL="../SimpleGit/Git/Command/SimpleGit-Commit.vi"/>
<Item Name="SimpleGit-LeaveDailyBranch.vi" Type="VI" URL="../SimpleGit/Git/Command/SimpleGit-LeaveDailyBranch.vi"/>
Expand Down
Binary file modified SimpleGit/Git/Command/SimpleGit-Commit.vi
Binary file not shown.
Binary file modified SimpleGit/Git/Command/SimpleGit-LeaveDailyBranch.vi
Binary file not shown.
Binary file modified SimpleGit/Git/Command/SimpleGit-Pull.vi
Binary file not shown.
Binary file modified SimpleGit/Git/Command/SimpleGit-Push.vi
Binary file not shown.
Binary file modified SimpleGit/Git/Command/SimpleGit-Settings.vi
Binary file not shown.
Binary file modified SimpleGit/Git/Command/SimpleGit-Status.vi
Binary file not shown.
Binary file modified SimpleGit/Git/Command/SimpleGit-SwitchToDailyBranch.vi
Binary file not shown.
Binary file modified SimpleGit/Git/SimpleGit_Item_OnCommand.vi
Binary file not shown.
Binary file modified SimpleGit/Git/SimpleGit_Item_OnUpdateCommand.vi
Binary file not shown.
Binary file modified SimpleGit/Git/SimpleGit_Menu_Hierachy.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/GIT-Current Local Branches.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/Git Check whether Branch exists.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/SimpleGit Setting Dialog.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/config/simplegit.DailyBranchPrefix.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/lvgit commit.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/lvgit pull.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/lvgit push.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/lvgit status.vi
Binary file not shown.
Binary file added SimpleGit/Git/_Support/path to cmd argument.vi
Binary file not shown.
19 changes: 14 additions & 5 deletions SimpleGit/Git/_scripts/Check_if_branch_exists.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ REM constrained hosts (e.g. LabVIEW System Exec).
REM
REM Usage:
REM Check_if_branch_exists.cmd <branch> Check in current dir
REM Check_if_branch_exists.cmd <branch> "D:\repo" Check in given repo
REM (quote the repo path if it contains spaces; branch
REM Check_if_branch_exists.cmd <branch> "D:\repo" Check in given repo dir
REM Check_if_branch_exists.cmd <branch> "D:\repo\a.vi" Check by file directory
REM (quote the path if it contains spaces; branch
REM names may contain slashes, e.g. "daily/2026-06-22")
REM
REM Output : prints TRUE if the local branch exists
Expand All @@ -24,16 +25,24 @@ REM ============================================================
REM --- Require a branch name (arg 1) ---
if "%~1"=="" goto :false

REM --- Optional repo path (arg 2): branch in current dir vs given repo ---
if not "%~2"=="" goto :withpath
REM --- Optional path (arg 2): current dir vs given dir/file ---
if "%~2"=="" goto :currentdir
if exist "%~2\*" goto :withdir
goto :withfile

:currentdir
git show-ref --verify --quiet "refs/heads/%~1" 2>nul
if errorlevel 1 goto :false
goto :true

:withpath
:withdir
git -C "%~2" show-ref --verify --quiet "refs/heads/%~1" 2>nul
if errorlevel 1 goto :false
goto :true

:withfile
git -C "%~dp2." show-ref --verify --quiet "refs/heads/%~1" 2>nul
if errorlevel 1 goto :false

:true
echo TRUE
Expand Down
43 changes: 43 additions & 0 deletions SimpleGit/Git/_scripts/Commit_all_changes.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
@echo off
REM ============================================================
REM Commit_all_changes.cmd
REM Stages and commits all modifications in a Git repository.
REM
REM Usage:
REM Commit_all_changes.cmd "D:\repo path" "commit message"
REM Commit_all_changes.cmd "D:\repo\a.vi" "commit message"
REM
REM Args:
REM %1 = repository directory or file path (required)
REM %2 = commit message (required)
REM
REM Output : git add / git commit output
REM Exit : 0 = commit success
REM 1 = missing args / not a Git repository / git error
REM ============================================================

if "%~1"=="" exit /b 1
if "%~2"=="" exit /b 1

if exist "%~1\*" goto :withdir
goto :withfile

:withdir
git -C "%~1" rev-parse --is-inside-work-tree >nul 2>nul
if errorlevel 1 exit /b 1

git -C "%~1" add -A
if errorlevel 1 exit /b 1

git -C "%~1" commit -m "%~2"
exit /b %errorlevel%

:withfile
git -C "%~dp1." rev-parse --is-inside-work-tree >nul 2>nul
if errorlevel 1 exit /b 1

git -C "%~dp1." add -A
if errorlevel 1 exit /b 1

git -C "%~dp1." commit -m "%~2"
exit /b %errorlevel%
19 changes: 14 additions & 5 deletions SimpleGit/Git/_scripts/Get_all_local_branches.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ REM (e.g. LabVIEW System Exec).
REM
REM Usage:
REM Get_all_local_branches.cmd List in current directory
REM Get_all_local_branches.cmd "D:\repo path" List in given repo path
REM (quote the repo path if it contains spaces)
REM Get_all_local_branches.cmd "D:\repo path" List in given repo directory
REM Get_all_local_branches.cmd "D:\repo\a.vi" List using given file directory
REM (quote the path if it contains spaces)
REM
REM Output : one branch per line; current branch prefixed with '*'
REM example:
Expand All @@ -22,13 +23,21 @@ REM Exit : 0 = success
REM 1 = not a Git repository / error
REM ============================================================

if not "%~1"=="" goto :withpath
if "%~1"=="" goto :currentdir
if exist "%~1\*" goto :withdir
goto :withfile

:currentdir
REM --- No path given: use current directory ---
git branch
exit /b %errorlevel%

:withpath
REM --- Explicit repo path ---
:withdir
REM --- Explicit repo directory ---
git -C "%~1" branch
exit /b %errorlevel%

:withfile
REM --- Explicit file path: use its directory ---
git -C "%~dp1." branch
exit /b %errorlevel%
14 changes: 11 additions & 3 deletions SimpleGit/Git/_scripts/Get_current_branch.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ REM constrained hosts (e.g. LabVIEW System Exec).
REM
REM Usage:
REM Get_current_branch.cmd Use current directory
REM Get_current_branch.cmd "D:\repo path" Use given repo path
REM Get_current_branch.cmd "D:\repo path" Use given repo directory
REM Get_current_branch.cmd "D:\repo\a.vi" Use directory of given file
REM (quote paths with spaces)
REM
REM Output : the branch name on success (e.g. "main")
Expand All @@ -24,11 +25,18 @@ REM nothing (instead of the literal "HEAD") when
REM the repository is in a detached-HEAD state.
REM ============================================================

if not "%~1"=="" goto :withpath
if "%~1"=="" goto :currentdir
if exist "%~1\*" goto :withdir
goto :withfile

:currentdir
git branch --show-current 2>nul
exit /b %errorlevel%

:withpath
:withdir
git -C "%~1" branch --show-current 2>nul
exit /b %errorlevel%

:withfile
git -C "%~dp1." branch --show-current 2>nul
exit /b %errorlevel%
14 changes: 11 additions & 3 deletions SimpleGit/Git/_scripts/Get_current_commit.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ REM constrained hosts (e.g. LabVIEW System Exec).
REM
REM Usage:
REM Get_current_commit.cmd Use current directory
REM Get_current_commit.cmd "D:\repo path" Use given repo path
REM Get_current_commit.cmd "D:\repo path" Use given repo directory
REM Get_current_commit.cmd "D:\repo\a.vi" Use directory of given file
REM (quote paths with spaces)
REM
REM Output : the 40-char commit hash on success
Expand All @@ -22,11 +23,18 @@ REM nothing instead of the literal "HEAD". For the
REM short hash use 'rev-parse --short --verify HEAD'.
REM ============================================================

if not "%~1"=="" goto :withpath
if "%~1"=="" goto :currentdir
if exist "%~1\*" goto :withdir
goto :withfile

:currentdir
git rev-parse --verify HEAD 2>nul
exit /b %errorlevel%

:withpath
:withdir
git -C "%~1" rev-parse --verify HEAD 2>nul
exit /b %errorlevel%

:withfile
git -C "%~dp1." rev-parse --verify HEAD 2>nul
exit /b %errorlevel%
14 changes: 11 additions & 3 deletions SimpleGit/Git/_scripts/Get_last_commit_message.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ REM constrained hosts (e.g. LabVIEW System Exec).
REM
REM Usage:
REM Get_last_commit_message.cmd Use current directory
REM Get_last_commit_message.cmd "D:\repo path" Use given repo path
REM Get_last_commit_message.cmd "D:\repo path" Use given repo directory
REM Get_last_commit_message.cmd "D:\repo\a.vi" Use directory of given file
REM (quote paths with spaces)
REM
REM Output : the last commit subject line on success
Expand All @@ -22,11 +23,18 @@ REM placeholder '%s' through cmd. Use '%%B' for the
REM full message body instead of just the subject.
REM ============================================================

if not "%~1"=="" goto :withpath
if "%~1"=="" goto :currentdir
if exist "%~1\*" goto :withdir
goto :withfile

:currentdir
git log -1 --format=%%s 2>nul
exit /b %errorlevel%

:withpath
:withdir
git -C "%~1" log -1 --format=%%s 2>nul
exit /b %errorlevel%

:withfile
git -C "%~dp1." log -1 --format=%%s 2>nul
exit /b %errorlevel%
54 changes: 54 additions & 0 deletions SimpleGit/Git/_scripts/List_uncommitted_files.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
@echo off
REM ============================================================
REM List_uncommitted_files.cmd
REM Lists all uncommitted files in a Git repository and prefixes
REM each path with its status class.
REM
REM Usage:
REM List_uncommitted_files.cmd Use current directory
REM List_uncommitted_files.cmd "D:\repo path" Use given repo directory
REM List_uncommitted_files.cmd "D:\repo\a.vi" Use directory of given file
REM
REM Output : one file per line with a prefix:
REM [staged] <path>
REM [unstaged] <path>
REM [untracked] <path>
REM [conflict] <path>
REM A file may appear multiple times if it belongs to
REM multiple classes (for example staged + unstaged).
REM Exit : 0 = success, 1 = not a Git repository / error
REM ============================================================

if "%~1"=="" goto :currentdir
if exist "%~1\*" goto :withdir
goto :withfile

:currentdir
git rev-parse --is-inside-work-tree >nul 2>nul
if errorlevel 1 exit /b 1

for /f "delims=" %%F in ('git diff --cached --name-only 2^>nul') do echo [staged] %%F
for /f "delims=" %%F in ('git diff --name-only 2^>nul') do echo [unstaged] %%F
for /f "delims=" %%F in ('git ls-files --others --exclude-standard 2^>nul') do echo [untracked] %%F
for /f "delims=" %%F in ('git diff --name-only --diff-filter=U 2^>nul') do echo [conflict] %%F
exit /b 0

:withdir
git -C "%~1" rev-parse --is-inside-work-tree >nul 2>nul
if errorlevel 1 exit /b 1

for /f "delims=" %%F in ('git -C "%~1" diff --cached --name-only 2^>nul') do echo [staged] %%F
for /f "delims=" %%F in ('git -C "%~1" diff --name-only 2^>nul') do echo [unstaged] %%F
for /f "delims=" %%F in ('git -C "%~1" ls-files --others --exclude-standard 2^>nul') do echo [untracked] %%F
for /f "delims=" %%F in ('git -C "%~1" diff --name-only --diff-filter=U 2^>nul') do echo [conflict] %%F
exit /b 0

:withfile
git -C "%~dp1." rev-parse --is-inside-work-tree >nul 2>nul
if errorlevel 1 exit /b 1

for /f "delims=" %%F in ('git -C "%~dp1." diff --cached --name-only 2^>nul') do echo [staged] %%F
for /f "delims=" %%F in ('git -C "%~dp1." diff --name-only 2^>nul') do echo [unstaged] %%F
for /f "delims=" %%F in ('git -C "%~dp1." ls-files --others --exclude-standard 2^>nul') do echo [untracked] %%F
for /f "delims=" %%F in ('git -C "%~dp1." diff --name-only --diff-filter=U 2^>nul') do echo [conflict] %%F
exit /b 0
19 changes: 14 additions & 5 deletions SimpleGit/Git/_scripts/Pull_with_prune.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ REM (e.g. LabVIEW System Exec).
REM
REM Usage:
REM Pull_with_prune.cmd Pull in current directory
REM Pull_with_prune.cmd "D:\repo path" Pull in given repo path
REM (quote the repo path if it contains spaces)
REM Pull_with_prune.cmd "D:\repo path" Pull in given repo directory
REM Pull_with_prune.cmd "D:\repo\a.vi" Pull using given file directory
REM (quote the path if it contains spaces)
REM
REM Output : git pull output (status, merge result, prune details)
REM error messages on failure
Expand All @@ -23,13 +24,21 @@ REM options (e.g. --rebase), invoke git directly or modify
REM the script to pass them.
REM ============================================================

if not "%~1"=="" goto :withpath
if "%~1"=="" goto :currentdir
if exist "%~1\*" goto :withdir
goto :withfile

:currentdir
REM --- No path given: use current directory ---
git pull --prune
exit /b %errorlevel%

:withpath
REM --- Explicit repo path ---
:withdir
REM --- Explicit repo directory ---
git -C "%~1" pull --prune
exit /b %errorlevel%

:withfile
REM --- Explicit file path: use its directory ---
git -C "%~dp1." pull --prune
exit /b %errorlevel%
19 changes: 14 additions & 5 deletions SimpleGit/Git/_scripts/Push_current_branch.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ REM (e.g. LabVIEW System Exec).
REM
REM Usage:
REM Push_current_branch.cmd Push in current directory
REM Push_current_branch.cmd "D:\repo path" Push in given repo path
REM (quote the repo path if it contains spaces)
REM Push_current_branch.cmd "D:\repo path" Push in given repo directory
REM Push_current_branch.cmd "D:\repo\a.vi" Push using given file directory
REM (quote the path if it contains spaces)
REM
REM Output : git push output (branch details, remote updates)
REM error messages on failure
Expand All @@ -22,13 +23,21 @@ REM as the source ref to ensure ONLY the current branch
REM is pushed, never other branches.
REM ============================================================

if not "%~1"=="" goto :withpath
if "%~1"=="" goto :currentdir
if exist "%~1\*" goto :withdir
goto :withfile

:currentdir
REM --- No path given: use current directory ---
git push origin HEAD
exit /b %errorlevel%

:withpath
REM --- Explicit repo path ---
:withdir
REM --- Explicit repo directory ---
git -C "%~1" push origin HEAD
exit /b %errorlevel%

:withfile
REM --- Explicit file path: use its directory ---
git -C "%~dp1." push origin HEAD
exit /b %errorlevel%
Binary file modified SimpleGit/Git/_scripts/Run cmd File.vi
Binary file not shown.
Loading
Loading