App::K...nt::Git(3pm)
β¨ NAME β¨
App::KGB::Client::Git β Git support for the KGB client π (yes bestie, that's the whole manual name, the header up top just truncates it because the terminal is a hater)
πΈ SYNOPSIS πΈ
my $c = App::KGB::Client::Git->new({
...
git_dir => '/some/where', # defaults to $ENV{GIT_DIR}
old_rev => 'a7c42f58',
new_rev => '8b37ed8a', });
π¦ DESCRIPTION π¦
So, App::KGB::Client::Git is the module that hands the KGB client all its Git-repository knowledge π«Ά. Its method returns a whole series of App::KGB::Commit objects β and every single one of them is the next commit in the series you received. One per commit, in order, no skips, no crumbs left behind. Periodt. β¨
ngl the manpage literally forgot to print the method's name there (there's just a lil empty gap π), so that's exactly what I'm telling you: its method. No cap.
π CONSTRUCTION π
π App::KGB::Client::Git->new( { parameters... } )
You can hand over the input data in any of these ways, pick ur fighter π₯°:
- as parameters to the constructor β the classic, single-commit, main-character move:
# a single commit
my $c = App::KGB::Client::Git->new({
old_rev => '9ae45bc',
new_rev => 'a04d3ef',
refname => 'master',
});
- as a list of revisions/refnames β when you've got several commits and you're not doing them one by one like a peasant:
# several commits
my $c = App::KGB::Client::Git->new({
changesets => [
[ '4b3d756', '62a7c8f', 'master' ],
[ '7a2fedc', '0d68c3a', 'my' ],
...
],
});
Every other way of supplying the changes data gets converted internally into this one. The pipeline says: we all end up here. π
- in a file whose name is in the
reflogparameter β a file name of"-"means standard input, and honestly that's the normal way for Git post-receive hooks to get their data.
The file has to have three words separated by spaces on every line, okay? First word = the old revision. Second = the new revision. Third = the refname. In that order, don't freestyle it. π
- on the command line β lowkey iconic for when you're testing the KGB client from the command line. If
old_rev,new_rev,refnameandchangesetsare all not given to the constructor, and@ARGVhas exactly three elements, those three become old revision, new revision and refname, respectively. Heads up though: only one commit can be represented on the command line. Just the one. π€
With literally all of the methods above, the location of the .git directory can be passed in the git_dir parameter β or it gets taken from the environment variable GIT_DIR. Your call, queen. π
π git-config parameters
These can be set in the "[kgb]" section of git-config(1). Oh and, important: if they're present, they override the settings in the configuration file and the ones given on the command line. They said "my rules now". π
project-idβ the project ID. See"project-id" in App::KGB::Clientfor details. πweb-linkβ see"web-link" in App::KGB::Clientfor details.squash-threshold numberβ this one is unique to the Git KGB client β¨. It sets a threshold for the notifications produced for a given branch update. If there are more commits in the update than that, instead of flooding everyone with a huge amount of notifications, the commits get "squashed" into one notification per branch, with a summary of the changes. Considerate of them tbh.
The default value is 20.
squash-message-template stringβ a template for constructing those squashed messages. See"message-template" in App::KGB::Clientfor details.
The default is "${{module} }${{branch} }${{commit} }${{author-name} }${{log}}".
tag-squash-threshold numberβ also unique to the Git KGB client π. This sets the threshold for notifications produced on tag creations. If more tags than that get created in the push, instead of a huge amount of notifications, the tags get "squashed" into a single notification summarizing the information.
The default value is 5.
tag-squash-message-template stringβ a template for constructing squashed tags messages. See"message-template" in App::KGB::Clientfor details.
The default is "${{module} }${{author-name} }${{log}}".
enable-branch-ff-notification boolβ turns notifications on for branch updates whose commits have already been reported. Normally that makes a notification like"fast forward"show up. If that's not ur vibe, set it to false. π«
The default is "true".
π METHODS π
describe_commitβ returns an instance of theApp::KGB::Changeclass for each commit. And when all the commits have been processed? It returnsundef. That's it, that's the whole farewell. πformat_git_stat textβ returns a colored version of text, which is expected to be the result ofgit diff --shortstat. Cute-ify that stat, bestie. π¨
π«Ά COPYRIGHT & LICENSE π«Ά
Copyright (c) 2009, 2013 Damyan Ivanov
Based on the shell post-receive hook by Andy Parkins
This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. β οΈ
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
okay that's the whole page, we ate and left absolutely no crumbs π½οΈβ¨ this lil writeup came from perl v5.40.1, dated 2026-07-10, and it lives under the page name App::KGB::Client::Git(3pm) β stan, follow, subscribe, bye bestie ππ¦
π¦ where this page comes from
- ubuntu stonking: kgb-client 1.62-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms