Update/refresh index for a path (alias for reindex). When *quiet* is True (e.g. when invoked from Git hooks with --quiet), Rich console output, including progress rendering, is suppressed.
(path: str, context: Optional[str] = None, quiet: bool = False)
| 904 | |
| 905 | |
| 906 | def update_helper(path: str, context: Optional[str] = None, quiet: bool = False): |
| 907 | """Update/refresh index for a path (alias for reindex). |
| 908 | |
| 909 | When *quiet* is True (e.g. when invoked from Git hooks with --quiet), |
| 910 | Rich console output, including progress rendering, is suppressed. |
| 911 | """ |
| 912 | if quiet: |
| 913 | console.quiet = True |
| 914 | try: |
| 915 | reindex_helper(path, context) |
| 916 | finally: |
| 917 | console.quiet = False |
| 918 | return |
| 919 | console.print("[cyan]Updating repository index...[/cyan]") |
| 920 | reindex_helper(path, context) |
| 921 | |
| 922 | |
| 923 | def clean_helper(context: Optional[str] = None): |
no test coverage detected