git-project-core-plugins 0.0.28__tar.gz → 0.0.30__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/PKG-INFO +160 -5
  2. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/_version.py +2 -2
  3. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/docs/changelog.rst +62 -1
  4. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/requirements.txt +1 -1
  5. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/src/git_project_core_plugins/__init__.py +3 -1
  6. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/src/git_project_core_plugins/artifact.py +4 -1
  7. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/src/git_project_core_plugins/run.py +5 -7
  8. git_project_core_plugins-0.0.30/src/git_project_core_plugins/worktree.py +2248 -0
  9. git_project_core_plugins-0.0.30/tests/conftest.py +195 -0
  10. git_project_core_plugins-0.0.30/tests/test_worktree.py +2642 -0
  11. git_project_core_plugins-0.0.28/src/git_project_core_plugins/worktree.py +0 -828
  12. git_project_core_plugins-0.0.28/tests/conftest.py +0 -76
  13. git_project_core_plugins-0.0.28/tests/test_worktree.py +0 -886
  14. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/.gitignore +0 -0
  15. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/COPYING +0 -0
  16. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/MANIFEST.in +0 -0
  17. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/docs/Makefile +0 -0
  18. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/docs/authors.rst +0 -0
  19. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/docs/commands.rst +0 -0
  20. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/docs/conf.py +0 -0
  21. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/docs/index.rst +0 -0
  22. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/docs/intro.rst +0 -0
  23. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/docs/license.rst +0 -0
  24. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/docs/make.bat +0 -0
  25. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/hatch_build.py +0 -0
  26. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/pyproject.toml +0 -0
  27. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/src/git_project_core_plugins/_commanddocs.py +0 -0
  28. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/src/git_project_core_plugins/branch.py +0 -0
  29. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/src/git_project_core_plugins/clone.py +0 -0
  30. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/src/git_project_core_plugins/common.py +0 -0
  31. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/src/git_project_core_plugins/config.py +0 -0
  32. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/src/git_project_core_plugins/help.py +0 -0
  33. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/src/git_project_core_plugins/init.py +0 -0
  34. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/tests/common.py +0 -0
  35. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/tests/test_artifact.py +0 -0
  36. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/tests/test_branch.py +0 -0
  37. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/tests/test_clone.py +0 -0
  38. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/tests/test_config.py +0 -0
  39. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/tests/test_help.py +0 -0
  40. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/tests/test_init.py +0 -0
  41. {git_project_core_plugins-0.0.28 → git_project_core_plugins-0.0.30}/tests/test_run.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: git-project-core-plugins
3
- Version: 0.0.28
3
+ Version: 0.0.30
4
4
  Summary: The extensible stupid project manager - core functionality
5
5
  Author-email: "David A. Greene" <dag@obbligato.org>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Topic :: Software Development :: Version Control :: Git
16
16
  Requires-Python: >=3.10
17
- Requires-Dist: git-project>=0.0.40
17
+ Requires-Dist: git-project>=0.0.42
18
18
  Requires-Dist: pytest-console-scripts
19
19
  Provides-Extra: test
20
20
  Requires-Dist: git-project; extra == 'test'
@@ -76,7 +76,9 @@ fails if ``.git`` resolves to a directory there. A repository that is already
76
76
  bare when ``init --worktree`` runs keeps its name and gets no ``.git`` file,
77
77
  and its parent directory holds the worktrees. Any conversion will abort if
78
78
  the worktree is dirty. Typically, an ordinary ``git clone`` is followed
79
- immediately by ``git <project> init --worktree``.
79
+ immediately by ``git <project> init --worktree``. A clone already in use, with
80
+ its own branches and linked worktrees, is converted with ``git <project>
81
+ worktree migrate`` instead, which keeps them all.
80
82
 
81
83
  Either route also creates a worktree for the project's main branch, so the
82
84
  layout is usable straight away. The main branch is taken from the repository
@@ -145,7 +147,10 @@ Summary::
145
147
  associated file-system object. The ``artifact rm`` command simply removes
146
148
  an artifact association, it does not remove the artifact itself. A
147
149
  <subsection> may hold several paths. With <path>, ``artifact rm`` removes
148
- only that association. Give <path> as it was added, before substitution.
150
+ only that association. <path> is a regular expression that git matches
151
+ against each path as it was added, before substitution. Escape characters
152
+ such as ``{`` and ``.`` to match them literally. A <path> that matches
153
+ more than one path removes none of them.
149
154
 
150
155
  For example::
151
156
 
@@ -474,6 +479,7 @@ Summary::
474
479
  git <project> worktree rm [-f] [--keep-branch] [--keep-remote-branch]
475
480
  <name>
476
481
  git <project> worktree config <ident> [--add] [--unset] <name> [<value>]
482
+ git <project> worktree migrate [--apply]
477
483
 
478
484
  ``worktree add`` creates a worktree at <name-or-path> and checks out a
479
485
  branch in it. The worktree's name is the last component of <name-or-path>.
@@ -570,12 +576,161 @@ itself as the top-level directory, where a plain clone makes a new one.
570
576
  be clean. The conversion deletes every file in the top-level directory
571
577
  except the git directory, so preserve anything there that is not part of
572
578
  the repository. Only the main branch gets a worktree, so a different
573
- checked-out branch gets none, though one is easy to add afterward.
579
+ checked-out branch gets none, though one is easy to add afterward. To
580
+ convert a clone you work in, with its branches and linked worktrees, use
581
+ ``worktree migrate`` instead.
574
582
 
575
583
  On a repository that is already bare, ``init --worktree`` deletes nothing.
576
584
  It refuses to run while a branch other than the main one exists, because it
577
585
  cannot know which remote each branch should go to.
578
586
 
587
+ ``worktree migrate`` converts a flat clone, one whose ``.git`` is a
588
+ directory, to the worktree layout. Every branch, ref, stash and config
589
+ value stays. Each linked worktree moves into the top-level directory. The
590
+ files of the main worktree, ignored ones too, move into a worktree named
591
+ for the main branch. Without ``--apply`` it prints each step and changes
592
+ nothing.
593
+
594
+ The main branch is the first branch the project configures that exists
595
+ locally. Failing that, it is ``main``, then ``master``, then the only
596
+ local branch. The main clone must have it checked out. A linked worktree
597
+ named ``<top>-<rest>``, where <top> is the name of the top-level
598
+ directory, moves to ``<rest>``. Any other moves to a directory named for
599
+ its branch, with each ``/`` turned into ``-``. So ``proj-topic`` beside
600
+ ``proj`` becomes ``proj/topic``, and a worktree on ``user/feature``
601
+ becomes ``proj/user-feature``.
602
+
603
+ It refuses when a worktree has changes or untracked files, is locked,
604
+ prunable or missing, or has a detached HEAD. It refuses during a merge,
605
+ cherry-pick, revert, rebase or bisect. It refuses a worktree with
606
+ submodules, a sparse checkout, or assume-unchanged or skip-worktree
607
+ files. It refuses a linked worktree inside <top> or on another
608
+ filesystem, and a mount point in <top>. It refuses when two worktrees
609
+ get the same target directory or worktree name, and when a target
610
+ directory exists. It refuses when ``core.worktree`` is set, or when the
611
+ main worktree's ``config.worktree`` sets ``core.bare``. It refuses when
612
+ ``extensions.relativeWorktrees`` or ``worktree.useRelativePaths`` is
613
+ true, because the repair writes absolute links. It also refuses when the
614
+ project remote has no url, when GIT_DIR or a variable like it is set,
615
+ with git older than 2.36, and on a clone already converted. It reports
616
+ every reason it finds and makes no change of its own. Some basic checks,
617
+ such as the git version, stop it before the rest run.
618
+
619
+ Each worktree's config moves with it. A ``worktreepath`` entry for an
620
+ old path stays and is reported, so remove it by hand. A project value
621
+ that holds an old path, such as ``<project>.builddir`` set to
622
+ ``<old>/build``, gets a warning that names its key and not its value. The
623
+ warning does not stop the migration, so fix the value by hand. A tool
624
+ that records absolute paths, such as a Python virtualenv, may need to be
625
+ made again.
626
+
627
+ ``worktree migrate`` also converts a store that is already bare at
628
+ <top>/.git, with its worktrees inside <top>. It renames the store to the
629
+ hidden name, writes the ``.git`` file and repairs each worktree. A
630
+ worktree's ``commondir`` file that holds an absolute path is rewritten
631
+ as ``../..``, because the repair leaves it naming the old store. No
632
+ worktree moves and no config changes. The checks above apply to each
633
+ worktree, except the sparse checkout, assume-unchanged, skip-worktree and
634
+ filesystem checks. Those matter only when files move or an index is
635
+ reset. It also refuses a worktree outside <top> or inside the store, and
636
+ a store with no worktrees. It refuses a store with an index. It looks in
637
+ <top> and in each directory between <top> and a worktree, and refuses
638
+ an entry there that holds no worktree, unless its name starts with
639
+ ``.``. An index or such an entry can mean a checkout that ``core.bare``
640
+ hides. It refuses a ``commondir`` that names another repository. A
641
+ ``core.bare`` in the store's ``config.worktree`` is allowed, since
642
+ ``git sparse-checkout`` puts it there.
643
+
644
+ For a flat clone or a bare store, the plan lists each local branch
645
+ with commits its upstream lacks, and how many. A commit the upstream
646
+ has under another id, as after a rebase or cherry-pick, does not count.
647
+ A branch with no upstream, or an upstream that is gone, is compared
648
+ with the main branch. A bare store with no main branch lists only
649
+ branches with an upstream. The list is for information and does not
650
+ stop the migration.
651
+
652
+ After a successful ``--apply`` of either kind, migrate runs the
653
+ command in ``<project>.postmigrate``, if it is set, in <top>. The value
654
+ is split into words as a shell would split it, but no shell runs it, so
655
+ pipes, redirections and variables do not work. The command runs in its
656
+ own session and gets no standard input. It has the number of seconds in
657
+ ``<project>.postmigratetimeout`` to finish, 600 when that is unset. On
658
+ a timeout or a Ctrl-C, migrate sends SIGTERM to the command's process
659
+ group, then SIGKILL after five seconds. A process that starts its own
660
+ session or process group is not stopped. Only a Ctrl-C or the timeout
661
+ stops the command. A hangup or a SIGTERM to migrate does not reach it.
662
+ The result goes in ``post.status`` in the manifest, ``ok`` or the
663
+ reason it failed. When the command fails or is interrupted, the
664
+ migration stays done and migrate exits with a failure status. The dry
665
+ run shows the step and the config file that sets the command, but does
666
+ not run it. Migrate refuses a command it cannot split, an empty one,
667
+ and a timeout that is not a whole number from 1 to 86400.
668
+
669
+ ``--apply`` writes the plan to ``git-project-migrate.json`` in the git
670
+ directory. Before each step runs, its name goes in ``current_step``.
671
+ When the step finishes, it is added to the ``steps_done`` list. The
672
+ migration stops at the first failure and names the step in
673
+ ``failed_step``. A hard stop, such as a kill, leaves no
674
+ ``failed_step``, so read ``current_step``. The error names the
675
+ failed step, its reason and the manifest. After a stop in
676
+ ``rename_store`` the manifest is at either <top>/.git or <store_new>.
677
+ When ``verify`` finds a worktree that is not clean, it names the first
678
+ 10 changed or untracked paths and counts the rest.
679
+
680
+ Manual rollback. Undo the steps that ``steps_done`` lists, in the order
681
+ below. The failed step, or the current step after a hard stop, may be
682
+ fully done, partly done, or not done. Check it as its comment below
683
+ says, and undo it when it is done or partly done. Take <top>,
684
+ <store_new>, <main> and the other values from the manifest. <main> is
685
+ ``main.new`` and each <new> and <old> is a ``linked`` entry. The steps
686
+ ``verify``, ``repair``, ``reset_index`` and ``copy_main_state`` need
687
+ nothing::
688
+
689
+ # write_pointer: done when <top>/.git is a file
690
+ rm <top>/.git
691
+ # rename_store: done when <store_new> exists
692
+ mv <store_new> <top>/.git
693
+ git -C <top> worktree repair <new>...
694
+ # detach_head: undo it either way
695
+ git --git-dir=<top>/.git symbolic-ref HEAD <head_ref>
696
+ # set_bare: done when this prints true
697
+ git --git-dir=<top>/.git config core.bare
698
+ # set_bare, when core_bare is not null
699
+ git --git-dir=<top>/.git config core.bare <core_bare>
700
+ # set_bare, when core_bare is null
701
+ git --git-dir=<top>/.git config --unset core.bare
702
+ # each move_entry <entry>: done when <main>/<entry> exists
703
+ mv <main>/<entry> <top>/<entry>
704
+ # add_main: done when <main> exists
705
+ rm -f <main>/.git
706
+ rmdir <main>
707
+ git -C <top> worktree prune
708
+ # each move_linked: done when <new> exists
709
+ git -C <top> worktree repair <new>
710
+ git -C <top> worktree move <new> <old>
711
+ # then, if any move_linked was undone
712
+ git -C <top> worktree repair <old>...
713
+ # write_config: undo it either way. Set each config_writes key
714
+ # back to its prior value, or unset it when prior is null.
715
+ # last, remove the manifest
716
+ rm -f <top>/.git/git-project-migrate.json
717
+ rm -f <top>/.git/git-project-migrate.json.tmp
718
+
719
+ A bare store at <top>/.git has a manifest with ``form`` set to
720
+ ``bare_at_root``. Each <path> is a ``linked`` entry. The ``verify`` step
721
+ needs no undo. The repair command below undoes ``repair``. The
722
+ ``rewrite_commondir`` steps need no undo, since ``../..`` names the store
723
+ at either path::
724
+
725
+ # write_pointer: done when <top>/.git is a file
726
+ rm <top>/.git
727
+ # rename_store: done when <store_new> exists
728
+ mv <store_new> <top>/.git
729
+ git --git-dir=<top>/.git worktree repair <path>...
730
+ # last, remove the manifest
731
+ rm -f <top>/.git/git-project-migrate.json
732
+ rm -f <top>/.git/git-project-migrate.json.tmp
733
+
579
734
  See also::
580
735
 
581
736
  artifact
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.0.28'
22
- __version_tuple__ = version_tuple = (0, 0, 28)
21
+ __version__ = version = '0.0.30'
22
+ __version_tuple__ = version_tuple = (0, 0, 30)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -31,6 +31,65 @@ ChangeLog
31
31
  `Unreleased`_
32
32
  -------------
33
33
 
34
+ `0.0.30`_ - 2026-10-07
35
+ ----------------------
36
+ Added
37
+ .....
38
+ - ``worktree migrate`` converts a store already bare at ``<top>/.git``
39
+ with its worktrees inside ``<top>``. It renames the store to the hidden
40
+ name, writes the ``.git`` file and repairs each worktree. An absolute
41
+ ``commondir`` becomes ``../..``, so each worktree finds the renamed
42
+ store. Worktrees may be nested, such as ``<top>/x/b1``. A file or
43
+ directory on the way to a worktree that holds no worktree is refused,
44
+ unless its name starts with ``.``. Sparse checkouts and skip-worktree
45
+ files are allowed in this form.
46
+ - ``worktree migrate`` lists each local branch with commits that its
47
+ upstream lacks. A branch with no upstream, or one that is gone, is
48
+ compared with the main branch.
49
+ - ``worktree migrate --apply`` runs the command in
50
+ ``<project>.postmigrate`` in the top-level directory after a successful
51
+ migration. ``<project>.postmigratetimeout`` sets its time limit in
52
+ seconds, 600 by default and 86400 at most. The manifest records the result.
53
+
54
+ Changed
55
+ .......
56
+ - A ``worktree migrate --apply`` failure prints the reason as well as the
57
+ step. When ``verify`` finds a worktree that is not clean, it names up to
58
+ 10 of the changed or untracked paths. Like the precheck, it ignores
59
+ ``status.showUntrackedFiles`` and ``submodule.<name>.ignore``.
60
+ - core-plugins now needs git-project 0.0.42 or later. That release lets a
61
+ command turn off its writes of the project defaults.
62
+
63
+ Fixed
64
+ .....
65
+ - A ``worktree migrate`` dry run wrote ``<project>.branch`` and
66
+ ``<project>.remote`` when they were unset. Now it writes nothing to the
67
+ config. It needs git-project 0.0.42 or later.
68
+
69
+ `0.0.29`_ - 2026-10-06
70
+ ----------------------
71
+ Added
72
+ .....
73
+ - ``worktree migrate`` converts a flat clone and its linked worktrees to the
74
+ worktree layout. It keeps every branch, ref, stash and config, and changes
75
+ nothing without ``--apply``.
76
+
77
+ Changed
78
+ .......
79
+ - core-plugins now needs git-project 0.0.41 or later. That release no
80
+ longer evaluates a config value as Python, so an expression such as
81
+ ``{branch.replace(...)}`` in a config value stays as written. Only a
82
+ plain ``{name}`` is replaced.
83
+ - The ``artifact`` manual says that the <path> given to ``artifact rm`` is
84
+ a regular expression. Escape characters such as ``{`` and ``.`` to match
85
+ them literally.
86
+
87
+ Fixed
88
+ .....
89
+ - ``worktree rm`` stopped removing directories at the first one it could
90
+ not remove. A worktree with no builddir kept its prefix and installdir.
91
+ Each directory is now removed on its own.
92
+
34
93
  `0.0.28`_ - 2026-10-05
35
94
  ----------------------
36
95
  Changed
@@ -144,7 +203,9 @@ Fixed
144
203
  404. Issues named ``unknown/greened``, a leftover from hatch's project
145
204
  template, and Documentation misspelled the package name.
146
205
 
147
- .. _Unreleased: https://github.com/greened/git-project-core-plugins/compare/v0.0.28...HEAD
206
+ .. _Unreleased: https://github.com/greened/git-project-core-plugins/compare/v0.0.30...HEAD
207
+ .. _0.0.30: https://github.com/greened/git-project-core-plugins/compare/v0.0.29...v0.0.30
208
+ .. _0.0.29: https://github.com/greened/git-project-core-plugins/compare/v0.0.28...v0.0.29
148
209
  .. _0.0.28: https://github.com/greened/git-project-core-plugins/compare/v0.0.27...v0.0.28
149
210
  .. _0.0.27: https://github.com/greened/git-project-core-plugins/compare/v0.0.26...v0.0.27
150
211
  .. _0.0.26: https://github.com/greened/git-project-core-plugins/compare/v0.0.25...v0.0.26
@@ -19,5 +19,5 @@
19
19
  # You should have received a copy of the GNU Affero General Public License along
20
20
  # with git-project. If not, see <https://www.gnu.org/licenses/>.
21
21
 
22
- git-project >= 0.0.40
22
+ git-project >= 0.0.42
23
23
  pytest-console-scripts
@@ -73,7 +73,9 @@ fails if ``.git`` resolves to a directory there. A repository that is already
73
73
  bare when ``init --worktree`` runs keeps its name and gets no ``.git`` file,
74
74
  and its parent directory holds the worktrees. Any conversion will abort if
75
75
  the worktree is dirty. Typically, an ordinary ``git clone`` is followed
76
- immediately by ``git <project> init --worktree``.
76
+ immediately by ``git <project> init --worktree``. A clone already in use, with
77
+ its own branches and linked worktrees, is converted with ``git <project>
78
+ worktree migrate`` instead, which keeps them all.
77
79
 
78
80
  Either route also creates a worktree for the project's main branch, so the
79
81
  layout is usable straight away. The main branch is taken from the repository
@@ -241,7 +241,10 @@ class ArtifactPlugin(Plugin):
241
241
  associated file-system object. The ``artifact rm`` command simply removes
242
242
  an artifact association, it does not remove the artifact itself. A
243
243
  <subsection> may hold several paths. With <path>, ``artifact rm`` removes
244
- only that association. Give <path> as it was added, before substitution.
244
+ only that association. <path> is a regular expression that git matches
245
+ against each path as it was added, before substitution. Escape characters
246
+ such as ``{`` and ``.`` to match them literally. A <path> that matches
247
+ more than one path removes none of them.
245
248
 
246
249
  For example::
247
250
 
@@ -362,8 +362,7 @@ class RunPlugin(Plugin):
362
362
  translation_table = dict.fromkeys(map(ord, "{}"), None)
363
363
 
364
364
  # An option may name a value, such as {branch}. Only a plain
365
- # {name} is looked up. The substitution evaluates what it is
366
- # given as Python, so anything else in braces stays text.
365
+ # {name} is looked up, so anything else in braces stays text.
367
366
  def substitute_names(option):
368
367
  return re.sub(
369
368
  r"\{([A-Za-z_][A-Za-z0-9_]*)\}",
@@ -382,11 +381,10 @@ class RunPlugin(Plugin):
382
381
 
383
382
  # The command runs through a shell, so each word from the
384
383
  # command line is shell-quoted, or a ';' in one would run as
385
- # shell. The quoting cannot go into the substitution itself,
386
- # which evaluates every value as a Python f-string that a
387
- # quote would break. So a plain placeholder stands in for each
388
- # word during substitution, and the quoted word replaces it
389
- # afterward.
384
+ # shell. The quoted words stay out of the substitution, which
385
+ # would expand braces in them again. So a plain placeholder
386
+ # stands in for each word during substitution, and the quoted
387
+ # word replaces it afterward.
390
388
  token = secrets.token_hex(8)
391
389
 
392
390
  def placeholder(name):