Skip to content

Instantly share code, notes, and snippets.

@yanick
Created February 14, 2020 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yanick/2610ff333a4b60dde0d4fc12655d3448 to your computer and use it in GitHub Desktop.
Save yanick/2610ff333a4b60dde0d4fc12655d3448 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use 5.30.0;
use List::MoreUtils qw/ first_index /;
my $index = first_index { $_ eq '--' } @ARGV;
$index = 0 if $index== -1;
push @ARGV, '--message', join " ", grep { $_ ne '--' } splice @ARGV, $index;
exec 'git', 'commit', @ARGV;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment