git-rexec 1.0.2__tar.gz → 1.0.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-rexec
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Locate Git repositories and execute commands against them in parallel.
5
5
  Author: James Cherti
6
6
  License-Expression: GPL-3.0-or-later
@@ -101,7 +101,7 @@ pip install colorama setproctitle
101
101
  ## Usage
102
102
 
103
103
  ```bash
104
- git-rexec [OPTIONS] [exec_cmd ...]
104
+ git-rexec [OPTIONS] -- [exec_cmd ...]
105
105
  ```
106
106
 
107
107
  *(Assuming the `git-rexec` script is executable and in your PATH.)*
@@ -112,14 +112,31 @@ git-rexec [OPTIONS] [exec_cmd ...]
112
112
 
113
113
  ### Options
114
114
 
115
- - `-C, --directory <path>`: The root directory to start searching for Git repositories. Defaults to the current working directory (`.`).
116
- - `--exclude-dir <path>`: Exclude a specific directory and all of its subdirectories from the search. This option can be provided multiple times.
117
- - `-p, --parallel`: Execute the command in parallel using threads.
118
- - `-i, --if-exec <command>`: Execute the main command only if this check command returns an exit code of `0`.
119
- - `-j, --jobs <int>`: The maximum number of concurrent workers/processors to use for parallel execution. Defaults to the number of CPU cores available.
120
- - `-s, --include-sub-repos`: Include sub-repositories (e.g., Git worktrees and submodules) in the search target list.
121
- - `-h, --help`: Show the help message and exit.
122
- - `-q, --quiet`: Quiet mode. Suppresses the informational tracking headers (`[EXEC]` and `[EXEC-P]`) that prefix execution output. In sequential mode, it hides the `[EXEC]` repository delimiter line entirely; in parallel mode (`-p`), it strips the yellow `[EXEC-P]` header track and removes the four-space indentation, printing only the raw, unindented stdout and stderr streams. This flag has no effect when no execution command is supplied, allowing discovered repository paths to print normally.
115
+ ```
116
+ usage: git-rexec [-h] [-C DIRECTORY] [--exclude-dir EXCLUDE_DIR] [-p] [-i IF_EXEC] [-j MAX_WORKERS] [-q] [-s] [--print] [--print0] [exec_cmd ...]
117
+
118
+ Find Git repositories and execute commands against them in parallel.
119
+
120
+ positional arguments:
121
+ exec_cmd The command to execute. You can use -- to pass options.
122
+
123
+ options:
124
+ -h, --help show this help message and exit
125
+ -C, --directory DIRECTORY
126
+ Root directory to search (defaults to current directory)
127
+ --exclude-dir EXCLUDE_DIR
128
+ Exclude a specific directory and all of its subdirectories
129
+ -p, --parallel Execute the command in parallel using threads
130
+ -i, --if-exec IF_EXEC
131
+ Execute commands only if this check returns exit code 0.
132
+ -j, --jobs MAX_WORKERS
133
+ Maximum number of processors/workers to use
134
+ -q, --quiet Quiet mode. Suppresses the informational log prefixes ([EXEC] and [EXEC-P]) that precede execution output.
135
+ -s, --include-sub-repos
136
+ Include sub-repositories (e.g., Git worktrees and submodules)
137
+ --print Print the paths (only when no command is provided)
138
+ --print0 Separate the paths with a null character (only when no command is provided)
139
+ ```
123
140
 
124
141
  ## License
125
142
 
@@ -83,7 +83,7 @@ pip install colorama setproctitle
83
83
  ## Usage
84
84
 
85
85
  ```bash
86
- git-rexec [OPTIONS] [exec_cmd ...]
86
+ git-rexec [OPTIONS] -- [exec_cmd ...]
87
87
  ```
88
88
 
89
89
  *(Assuming the `git-rexec` script is executable and in your PATH.)*
@@ -94,14 +94,31 @@ git-rexec [OPTIONS] [exec_cmd ...]
94
94
 
95
95
  ### Options
96
96
 
97
- - `-C, --directory <path>`: The root directory to start searching for Git repositories. Defaults to the current working directory (`.`).
98
- - `--exclude-dir <path>`: Exclude a specific directory and all of its subdirectories from the search. This option can be provided multiple times.
99
- - `-p, --parallel`: Execute the command in parallel using threads.
100
- - `-i, --if-exec <command>`: Execute the main command only if this check command returns an exit code of `0`.
101
- - `-j, --jobs <int>`: The maximum number of concurrent workers/processors to use for parallel execution. Defaults to the number of CPU cores available.
102
- - `-s, --include-sub-repos`: Include sub-repositories (e.g., Git worktrees and submodules) in the search target list.
103
- - `-h, --help`: Show the help message and exit.
104
- - `-q, --quiet`: Quiet mode. Suppresses the informational tracking headers (`[EXEC]` and `[EXEC-P]`) that prefix execution output. In sequential mode, it hides the `[EXEC]` repository delimiter line entirely; in parallel mode (`-p`), it strips the yellow `[EXEC-P]` header track and removes the four-space indentation, printing only the raw, unindented stdout and stderr streams. This flag has no effect when no execution command is supplied, allowing discovered repository paths to print normally.
97
+ ```
98
+ usage: git-rexec [-h] [-C DIRECTORY] [--exclude-dir EXCLUDE_DIR] [-p] [-i IF_EXEC] [-j MAX_WORKERS] [-q] [-s] [--print] [--print0] [exec_cmd ...]
99
+
100
+ Find Git repositories and execute commands against them in parallel.
101
+
102
+ positional arguments:
103
+ exec_cmd The command to execute. You can use -- to pass options.
104
+
105
+ options:
106
+ -h, --help show this help message and exit
107
+ -C, --directory DIRECTORY
108
+ Root directory to search (defaults to current directory)
109
+ --exclude-dir EXCLUDE_DIR
110
+ Exclude a specific directory and all of its subdirectories
111
+ -p, --parallel Execute the command in parallel using threads
112
+ -i, --if-exec IF_EXEC
113
+ Execute commands only if this check returns exit code 0.
114
+ -j, --jobs MAX_WORKERS
115
+ Maximum number of processors/workers to use
116
+ -q, --quiet Quiet mode. Suppresses the informational log prefixes ([EXEC] and [EXEC-P]) that precede execution output.
117
+ -s, --include-sub-repos
118
+ Include sub-repositories (e.g., Git worktrees and submodules)
119
+ --print Print the paths (only when no command is provided)
120
+ --print0 Separate the paths with a null character (only when no command is provided)
121
+ ```
105
122
 
106
123
  ## License
107
124
 
@@ -6,7 +6,7 @@
6
6
  #
7
7
  # Author: James Cherti
8
8
  # URL: https://github.com/jamescherti/git-rexec
9
- # Version: 1.0.2
9
+ # Version: 1.0.3
10
10
  #
11
11
  # Copyright (C) 2019-2026 James Cherti
12
12
  #
@@ -376,7 +376,8 @@ def parse_args() -> argparse.Namespace:
376
376
  :return: Parsed arguments.
377
377
  """
378
378
  parser: argparse.ArgumentParser = argparse.ArgumentParser(
379
- description="Find git repos and execute commands.",
379
+ description=("Find Git repositories and execute commands against "
380
+ "them in parallel."),
380
381
  formatter_class=argparse.RawDescriptionHelpFormatter
381
382
  )
382
383
  parser.add_argument(
@@ -413,8 +414,8 @@ def parse_args() -> argparse.Namespace:
413
414
  parser.add_argument(
414
415
  "-q", "--quiet",
415
416
  action="store_true",
416
- help=("Quiet mode. Suppresses the informational tracking headers "
417
- "([EXEC] and [EXEC-P]) that prefix execution output."),
417
+ help=("Quiet mode. Suppresses the informational log prefixes "
418
+ "([EXEC] and [EXEC-P]) that precede execution output."),
418
419
  default=False
419
420
  )
420
421
  parser.add_argument(
@@ -500,7 +501,7 @@ def main() -> None:
500
501
  # Check for empty action
501
502
  if not args.exec_cmd and not args.print and not args.print0:
502
503
  print("Nothing to do.", file=sys.stderr)
503
- sys.exit(0)
504
+ sys.exit(2)
504
505
 
505
506
  # Verify that the execution command exists
506
507
  if args.exec_cmd and not shutil.which(args.exec_cmd[0]):
@@ -596,6 +597,9 @@ def main() -> None:
596
597
  if __name__ == "__main__":
597
598
  try:
598
599
  main()
599
- except (KeyboardInterrupt, BrokenPipeError):
600
+ except KeyboardInterrupt:
600
601
  print("\nInterrupting...", file=sys.stderr)
601
- sys.exit(1)
602
+ sys.exit(130)
603
+ except BrokenPipeError:
604
+ print("\nInterrupting...", file=sys.stderr)
605
+ sys.exit(141)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-rexec
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Locate Git repositories and execute commands against them in parallel.
5
5
  Author: James Cherti
6
6
  License-Expression: GPL-3.0-or-later
@@ -101,7 +101,7 @@ pip install colorama setproctitle
101
101
  ## Usage
102
102
 
103
103
  ```bash
104
- git-rexec [OPTIONS] [exec_cmd ...]
104
+ git-rexec [OPTIONS] -- [exec_cmd ...]
105
105
  ```
106
106
 
107
107
  *(Assuming the `git-rexec` script is executable and in your PATH.)*
@@ -112,14 +112,31 @@ git-rexec [OPTIONS] [exec_cmd ...]
112
112
 
113
113
  ### Options
114
114
 
115
- - `-C, --directory <path>`: The root directory to start searching for Git repositories. Defaults to the current working directory (`.`).
116
- - `--exclude-dir <path>`: Exclude a specific directory and all of its subdirectories from the search. This option can be provided multiple times.
117
- - `-p, --parallel`: Execute the command in parallel using threads.
118
- - `-i, --if-exec <command>`: Execute the main command only if this check command returns an exit code of `0`.
119
- - `-j, --jobs <int>`: The maximum number of concurrent workers/processors to use for parallel execution. Defaults to the number of CPU cores available.
120
- - `-s, --include-sub-repos`: Include sub-repositories (e.g., Git worktrees and submodules) in the search target list.
121
- - `-h, --help`: Show the help message and exit.
122
- - `-q, --quiet`: Quiet mode. Suppresses the informational tracking headers (`[EXEC]` and `[EXEC-P]`) that prefix execution output. In sequential mode, it hides the `[EXEC]` repository delimiter line entirely; in parallel mode (`-p`), it strips the yellow `[EXEC-P]` header track and removes the four-space indentation, printing only the raw, unindented stdout and stderr streams. This flag has no effect when no execution command is supplied, allowing discovered repository paths to print normally.
115
+ ```
116
+ usage: git-rexec [-h] [-C DIRECTORY] [--exclude-dir EXCLUDE_DIR] [-p] [-i IF_EXEC] [-j MAX_WORKERS] [-q] [-s] [--print] [--print0] [exec_cmd ...]
117
+
118
+ Find Git repositories and execute commands against them in parallel.
119
+
120
+ positional arguments:
121
+ exec_cmd The command to execute. You can use -- to pass options.
122
+
123
+ options:
124
+ -h, --help show this help message and exit
125
+ -C, --directory DIRECTORY
126
+ Root directory to search (defaults to current directory)
127
+ --exclude-dir EXCLUDE_DIR
128
+ Exclude a specific directory and all of its subdirectories
129
+ -p, --parallel Execute the command in parallel using threads
130
+ -i, --if-exec IF_EXEC
131
+ Execute commands only if this check returns exit code 0.
132
+ -j, --jobs MAX_WORKERS
133
+ Maximum number of processors/workers to use
134
+ -q, --quiet Quiet mode. Suppresses the informational log prefixes ([EXEC] and [EXEC-P]) that precede execution output.
135
+ -s, --include-sub-repos
136
+ Include sub-repositories (e.g., Git worktrees and submodules)
137
+ --print Print the paths (only when no command is provided)
138
+ --print0 Separate the paths with a null character (only when no command is provided)
139
+ ```
123
140
 
124
141
  ## License
125
142
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "git-rexec"
7
- version = "1.0.2"
7
+ version = "1.0.3"
8
8
  description = "Locate Git repositories and execute commands against them in parallel."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
File without changes
File without changes