Re: Feature request: Configurable prefixes for git commit --fixup and --squash

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Feature request: Configurable prefixes for git commit --fixup and --squash

From: Matthieu Moy <hidden>
Date: 2016-06-15 23:08:36

John Keeping [off-list ref] writes:
On Thu, Mar 03, 2016 at 01:47:00PM +0100, Martine Lenders wrote:
quoted
I'm not sure if this was already requested somewhere (a quick - but
admittedly not thorough - search did not reveal anything in that
direction), but I really miss an option to configure the prefixes generated
by `git commit (--fixup | --squash) <commit>` and picked up by `git rebase
-i --autosquash`.

My reasoning is that in our project we use GitHub + Travis to test-build
our pull requests, but we don't want to spam the CI server with builds that
are just fixups to previous changes (which are uploaded so reviewers can
track the changes to the original PR). Now, Travis has the option to not
build a commit if there is the string `[ci skip]` in the commit message
(sadly also not configurable) so it would be really great for my workflow
if I could just add this string to the message generated by `--fixup`.
I am against the feature as you describe it, because it has the
potential to break `git rebase --autosquash` with shared fixups if two
people are using a different prefix.

However, it sounds like Travis will recognize "[ci skip]" anywhere in
the commit message.  Would a feature to allow autogenerated content in
fixup/squash commit message bodies work?
Or, alternatively: change the script used by Travis-CI to do something
like

case "$(head -n 1 "$1")" in
"fixup! "*|"squash! "*)
	: do nothing
        ;;
*)
	launch_real_tests
esac

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

Re: Feature request: Configurable prefixes for git commit --fixup and --squash

From: Martine Lenders <hidden>
Date: 2016-06-15 23:08:36

Hi Matthieu,
We already do this :-). But sadly, this won't help: [ci skip]
encourages Travis-CI to do nothing at all, while your proposed
solution will at least require Travis to boot up a VM (or in case of a
build matrix several VMs). In our case, including queueing this can
take up to 1h.

Just in case you think I did not consider this: There is an issue on
Travis' issue tracker [1], which is proposing to make this string
configurable on their side, but sadly there was no reaction to that up
until now.

Regards,
Martine

[1] https://github.com/travis-ci/travis-ci/issues/4624

2016-03-03 14:58 GMT+01:00 Matthieu Moy [off-list ref]:
John Keeping [off-list ref] writes:
quoted
On Thu, Mar 03, 2016 at 01:47:00PM +0100, Martine Lenders wrote:
quoted
I'm not sure if this was already requested somewhere (a quick - but
admittedly not thorough - search did not reveal anything in that
direction), but I really miss an option to configure the prefixes generated
by `git commit (--fixup | --squash) <commit>` and picked up by `git rebase
-i --autosquash`.

My reasoning is that in our project we use GitHub + Travis to test-build
our pull requests, but we don't want to spam the CI server with builds that
are just fixups to previous changes (which are uploaded so reviewers can
track the changes to the original PR). Now, Travis has the option to not
build a commit if there is the string `[ci skip]` in the commit message
(sadly also not configurable) so it would be really great for my workflow
if I could just add this string to the message generated by `--fixup`.
I am against the feature as you describe it, because it has the
potential to break `git rebase --autosquash` with shared fixups if two
people are using a different prefix.

However, it sounds like Travis will recognize "[ci skip]" anywhere in
the commit message.  Would a feature to allow autogenerated content in
fixup/squash commit message bodies work?
Or, alternatively: change the script used by Travis-CI to do something
like

case "$(head -n 1 "$1")" in
"fixup! "*|"squash! "*)
        : do nothing
        ;;
*)
        launch_real_tests
esac

--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help