topdir.mk: Make target git-import idempotent #129

Merged
Jan Lindemann merged 1 commit from jan/feature/20260928-topdir-mk-make-target-git-import-idempotent into master 2026-09-28 10:58:09 +02:00 AGit
Owner

topdir.mk: Make target git-import idempotent

Target git-import adds everything it finds in the current directory. If it's already a Git project, that fails over git commit -m First commit. Since it's a prerequisite of target git-init-remote, it breaks that target, too for non-empty git repos, which isn't helpful when trying to run make git-init-remote to publish an an already existing project.

So only do something meaningful in git-import if the project it's run in doesn't already contain files.

#### topdir.mk: Make target git-import idempotent Target git-import adds everything it finds in the current directory. If it's already a Git project, that fails over git commit -m `First commit`. Since it's a prerequisite of target git-init-remote, it breaks that target, too for non-empty git repos, which isn't helpful when trying to run make git-init-remote to publish an an already existing project. So only do something meaningful in git-import if the project it's run in doesn't already contain files.
topdir.mk: Make target git-import idempotent
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m33s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 6m41s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m32s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 8m42s
CI / Packaging test (push) Successful in 0s
1bab2573d0
Target git-import adds everything it finds in the current directory. If
it's already a Git project, that fails over git commit -m "First commit".
Since it's a prerequisite of target git-init-remote, it breaks that target,
too for non-empty git repos, which isn't helpful when trying to run make
git-init-remote to publish an an already existing project.

So only do something meaningful in git-import if the project it's run in
doesn't already contain files.

Signed-off-by: Jan Lindemann <jan@janware.com>
Jan Lindemann scheduled this pull request to auto merge when all checks succeed 2026-09-28 10:45:50 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
janware/jw-pkg!129
No description provided.