libgit2

    0熱度

    1回答

    由於libssh2不讀我試圖實施這樣的別名我自己的支持SSH的配置文件: Host github HostName github.com 和遠程URL使用主機別名是這樣的:[email protected]:path/to/repo.git。 有沒有辦法掛接到git_remote_connect或SSH傳輸使用的主機名或URL,以便我可以將github轉換爲github.com?我正

    0熱度

    2回答

    我在一些分行的工作,但現在我想結帳到另一個指定的分支。當我設置結賬選項,如執行該 git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_FORCE; 結算和我的庫中的所有文件被更改到checkouted分支文件... 如果我已提交執行的第一個分支,一切都清楚了,

    0熱度

    1回答

    我試圖用LibGit2Sharp重建的git show-brach --independent的功能,它根據docs做到這一點:Among the <reference>s given, display only the ones that cannot be reached from any other <reference>. 我最好的嘗試,到目前爲止是這樣的: List<Commit> Ge

    0熱度

    1回答

    當我重命名文件時,我運行GetStatus()方法,在添加/檢出/恢復/重命名後,可以更新文件的狀態/等等。當我重命名以前檢出的文件時,它將返回NewInIndex而不是RenamedInIndex或RenamedInWorkingDir狀態。 這裏是我的方法: public Tuple<SourceControlStatus, LockStatus> Status(string path)

    0熱度

    1回答

    我已經設法從遠程獲取,並且正在運行下面的代碼以獲取在本地主分支中進行的更改。 git_annotated_commit * fetchhead_commit; git_annotated_commit_lookup(&fetchhead_commit, repo, oid ); git_merge(repo,&fetchhead_

    0熱度

    1回答

    我試圖編寫一些代碼,使用Libgit2庫中的git_diff_perfdata。 git_diff_perfdata s; 然而,在我的Mac編譯時出現錯誤: use of undeclared identifier 'git_diff_perfdata' 我的理解是,Libgit2,就是要通過包含git2.h獨佔使用。那是對的嗎? git_diff_perfdata在sys/diff.h

    0熱度

    1回答

    這將是 1. create file a.txt 2. commit file a.txt 3. a.txt is tracked 我能做到這一點的libgit2容易。 但是,如果我修改A.TXT,並希望將其添加到索引我會做 git add a.txt 可惜我不能效仿與libgit2。我幾乎嘗試了互聯網提供的一切,但沒有任何工作。所以我覺得我錯過了一些基本的東西。請注意,我可以添加沒有跟蹤

    1熱度

    1回答

    我在我的Ubuntu 16.04機器上創建了libgit2,並且一切都很正常。我在/examples目錄跑make,當我嘗試運行./log我得到以下幾點: ./log: error while loading shared libraries: libgit2.so.26: cannot open shared object file: No such file or directory 但是,在

    1熱度

    1回答

    我正試圖在兩個分支之間實現一個簡單的結帳操作。代碼執行沒有錯誤。 git_libgit2_init(); git_object *treeish = NULL; git_checkout_options opts; opts.checkout_strategy = GIT_CHECKOUT_SAFE; /* branchName in this case is "master" */

    -1熱度

    2回答

    我在自定義對象存儲的C++項目中使用libgit2。 我使用libgit2的git_tree_create_updated函數來更新樹。 在一次提交中,對於某些樹執行移動和更新操作時存在一個問題。 如果我在舊地方刪除舊樹,並在此之後添加新的樹到另一個地方,當然它看起來像刪除一棵樹,並在git歷史記錄中添加另一棵樹。 如果我嘗試先將新樹添加到新位置,然後在新位置更新舊樹,然後在舊位置刪除舊樹,則li