Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
After a while, my local repo becomes cluttered with branches, and git branch
outputs an awkwardly
long list. I want to delete some of those branches to bring that list back under control; but I
can’t always remember which branches I want to keep from the branch names alone; and inspecting them
one at a time and then running git branch -D
in a separate step, is painful.
git curate
is intended to ease this pain. It steps you through the local branches of a repo one at
a time, outputting the following information about each:
You can then select whether to delete or keep each branch as you go.
NOTE git curate
does not run git fetch
prior to generating its output. If you want to
be sure that the “Status vs upstream” column reflects the latest state of the upstream branches
as per their remote repository, you should run git fetch
first.
You’ll need Ruby (v3.1.0 or greater) installed. Run:
gem install git_curate
to install the executable.
Note git_curate
uses the rugged library, which comes with a
native C extension, libgit2
. Installation via gem install git_curate
will trigger this extension
to be compiled; this may take a few minutes, depending on your machine.
If you receive an error like ERROR: Failed to build gem native extension
, it’s probably because
your system lacks certain prerequisites needed for building libgit2
, for example cmake
. To fix this,
first follow the installation instructions for rugged; then
run gem install git_curate
again.
From within a git repo, run:
git curate
This will step you through your local branches one at a time, outputting some information about each, and asking you whether to keep or delete each branch.
At each branch, enter “k”—or simply press Enter—to keep the branch and move to the next one; or enter “d” to select the branch for deletion.
Entering “e” will end the session immediately, deleting all selected branches; and “a” will abort the session without deleting any branches. Once the final branch has been considered, any selected branches will be immediately deleted.
Note the branch you are currently on will not be included in the list, as git
does not allow you to delete
the branch you’re on. (The same applies to any branches that are currently checked out in other
worktrees.)
If you just want to view the information about your local branches without stepping through
them interactively, enter git curate --list
or git curate -l
. Your current branch will
be included in this list in this case.
You can also pass --merged
to see only those branches merged into current HEAD
; or --no-merged
to see only those branches not merged into current HEAD
.
Bug reports and pull requests are welcome on GitHub.
To start working on git_curate
, git clone
and cd
into your fork of the repo, then run bin/setup
to
install dependencies.
To run the test suite, run bundle exec rake spec
. For a list of other Rake tasks, run bundle exec rake -T
.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that git_curate demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.