Skip to content

Commit

Permalink
Doc comment to explain the purpose of block_new_bookmark_creation_by_…
Browse files Browse the repository at this point in the history
…prefix hook

Summary: Addressing review comment in D66768700

Reviewed By: markbt

Differential Revision: D66961019

fbshipit-source-id: 4b0f2f9e5a22cea0aba77d783b757b21cb870290
  • Loading branch information
RajivTS authored and facebook-github-bot committed Dec 9, 2024
1 parent 48f6689 commit 7e39201
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
* GNU General Public License version 2.
*/

/*
* Git has this limitation that since refs are stored in the file system, a user cannot create two refs like
* `refs/heads/some_branch` and `refs/heads/some_branch/another` because storing the latter ref would require
* creating folders `refs`, `heads` and `some_branch` while creating the former would require creating `some_branch`
* as a file. We cannot have a file and a directory with the same name at the same level, hence this behavior is disallowed.
*
* Mononoke does not prevent this by default since refs (bookmarks) in Mononoke are stored as entries in a DB table
* so there is no such restriction. However, to maintain parity with vanilla Git, we have to put this check in place as a hook.
*/

use std::str::FromStr;

use anyhow::Error;
Expand Down

0 comments on commit 7e39201

Please sign in to comment.