SShortSingh.
Back to feed

Developer Fixed Same Git Hook Three Times Without Ever Testing If Git Ran It

0
·1 views

A developer discovered that a Git prepare-commit-msg hook in their repository had been debugged and declared 'verified live' three separate times, yet none of the fixes ever confirmed whether Git actually invoked the hook. Each verification tested the hook script's internal path logic directly, bypassing the prior question of whether Git would choose to execute the file at all. The root cause turned out to be unrelated to any of the three fixes: the hook file was committed without the executable bit set (mode 100644 instead of 100755), which Git requires before it will run any hook. Because Git tracks file permission modes in the repository tree, every fresh clone reproduced the non-executable state, silently skipping the hook with an easy-to-miss hint message. A secondary install method that copies the hook and runs chmod +x worked correctly all along, but the README's recommended method of pointing core.hooksPath directly at the tracked hooks directory had never functioned through any of the three rounds of fixes.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer builds LLM pricing API, finds AI agents are its most likely users

A developer created LLM Price Watch, an API that aggregates and compares per-token pricing across major AI models including Claude, GPT, Gemini, DeepSeek, and Grok. Beyond standard pricing endpoints, a recommendation endpoint was added that suggests the best model for a given use case — such as coding assistance or document summarization — based on both cost and editorial analysis. The developer noted that AI agents performing runtime tool selection, not just human developers, emerged as a core audience for the API. Design decisions like open CORS and no API key requirement were made deliberately to reduce friction for agent-based callers. Pricing data was verified directly against each provider's official pages to avoid the lag common in third-party aggregators.

0
ProgrammingDEV Community ·

Open-source audit reveals how 18 major sites secretly filter AI crawlers

A developer built an open-source tool called geo-crawl-audit to test how major websites treat AI web crawlers such as GPTBot, ClaudeBot, and PerplexityBot compared to regular browsers. Testing 18 prominent sites on August 7, the audit found that firewall configurations often contradict stated robots.txt policies, effectively making crawler access a business decision rather than a technical one. The New York Times, currently in litigation with OpenAI, blocked nearly all AI crawlers, while The Guardian, which holds a content deal with OpenAI, selectively allowed OpenAI bots but blocked Anthropic and Perplexity crawlers. Reddit's robots.txt disallows all AI bots, yet several were served live content anyway, exposing the gap between declared policy and actual enforcement. The audit also highlighted that most major AI crawlers do not execute JavaScript, meaning heavily client-rendered sites like LinkedIn and Reddit expose near-empty pages to crawlers regardless of access permissions.

0
ProgrammingDEV Community ·

Docker Basics Explained: Images, Containers, Ports, and Volumes Demystified

Docker is a platform that packages applications along with their dependencies into isolated environments called containers, solving the common 'it works on my machine' problem. A Docker image is a read-only blueprint containing the application code, runtime, and configuration, while a container is a live, running instance created from that image. A single image can be used to spin up multiple containers simultaneously, making applications highly portable and scalable. Port mapping bridges the gap between a container's internal network and the host machine, allowing external access using the syntax -p HOST_PORT:CONTAINER_PORT. Understanding these four core concepts — images, containers, ports, and volumes — forms the foundation needed to work effectively with Docker.

0
ProgrammingDEV Community ·

WanderWallet: A Fully Offline Travel Budget App Built in .NET MAUI Without Any Backend

Horizon Software, a solo Android developer, has built WanderWallet, a travel budgeting app that operates entirely on-device with no backend, cloud services, or user account required. The app stores all data in a local SQLite database and handles currency conversion by caching exchange rates for around 155 currencies whenever a connection is available, freezing each rate at the time of expense entry to prevent historical budget drift. Receipt scanning uses on-device OCR via ML Kit through Plugin.Maui.OCR, with a custom text parser extracting amounts, dates, and merchant names without sending data to any external server. Trip mapping is achieved by rendering a bundled Creative Commons world image using a plate carrée projection rather than relying on a tile-streaming mapping SDK. The project demonstrates that features commonly assumed to require server infrastructure — currency conversion, OCR, and maps — can be fully implemented offline with careful architectural choices.

Developer Fixed Same Git Hook Three Times Without Ever Testing If Git Ran It · ShortSingh