簡體   English   中英

Git日志中的一組提交

[英]Git log for a set of commits

我正在嘗試為我擁有的一組提交獲取git log --name-only 我可以使用bash腳本遍歷提交,但是我想知道是否有更好的方法。

例如:如果一個數據庫中有成千上萬的提交,我如何才能獲得隨機選擇的3個提交的git日志信息?

任何見解表示贊賞。

謝謝

好的,IIUC您要git show --name-only

git show --name-only <COMMIT_SHA1> <ANOTHER_COMMIT_SHA1>

例如,在git://w1.fi/hostap.git存儲庫中:

$  git show --name-only 1778f1e9a4c37aa2bad51f4027139625cf39783a 0fa669bcaeb8861cbf24544f18d22a8f39821f1a
commit 1778f1e9a4c37aa2bad51f4027139625cf39783a
Author: Jouni Malinen <jouni@codeaurora.org>
Date:   Fri Mar 23 17:57:14 2018 +0200

    SAE: Fix PTK derivation to use KDF-SHA256

    The previous implementation ended up defaulting to using PRF-SHA1 for
    deriving PTK from PMK when SAE was used. This is not correct since the
    SAE AKM is defined to be using SHA-256 -based KDF instead. Fix that.

    Note: This change is not backwards compatible. Both the AP and station
    side implementations will need to be updated at the same time to
    maintain functionality.

    Signed-off-by: Jouni Malinen <jouni@codeaurora.org>

src/common/defs.h
src/common/wpa_common.c

commit 0fa669bcaeb8861cbf24544f18d22a8f39821f1a
Author: Jouni Malinen <jouni@codeaurora.org>
Date:   Wed Mar 21 22:34:09 2018 +0200

    Fix a resource leak on hostapd maclist parsing error path

    The open file needs to be closed in error case. The conversion to using
    a new helper function (hostapd_add_acl_maclist) somehow managed to
    remove the neede fclose(f) call. Bring it back to fix this.

    Fixes: 3988046de538 ("hostapd: Dynamic MAC ACL management over control interface")
    Signed-off-by: Jouni Malinen <jouni@codeaurora.org>

hostapd/config_file.c

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM