libgit2 / libgit2/libgit2

git_clone can't parse well for path with double slash

オープン
#5,476 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C
スター
10.6k
フォーク
2.7k
PR マージ指標
30日以内にマージされた PR はありません

説明

as the topic, git_clone will parse a local path with double slash truncated from the slash.

Reproduction steps

call git_clone(repo, addr, "/home/kipade//test",attr)
would equal as calling git_clone(repo, url, "/test",attr)

Expected behavior

it should recognize "/home/kipade//test" as "/home/kipade/test"

Actual behavior
Version of libgit2 (release number or SHA1)

current

Operating system(s) tested

linux

In fact, there are many circumstances that the caller would present such a local path with double slash, and most software(bash,and other scripts included) , system api can do well with such a path. I hope libgit2 can do so. thanks.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ローカルリポジトリパスに対する git_clone の処理から始め、Linux 上で /home/kipade//test を使って問題を再現してください。パスがどこで切り詰められているかを追跡し、その後、他の clone の動作を変更せずに、完全なパスが /home/kipade/test と同等のものとして保持されることを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
c, git
領域
tooling
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
50/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。