git log -L without diff

前端 未结 3 1438
醉酒成梦
醉酒成梦 2021-01-06 07:28

I\'m trying to use git log -L ,: but I would like to have very limited output (actually just hashes). While --pretty pri

3条回答
  •  Happy的楠姐
    2021-01-06 08:20

    The -L option is not currently (and apparently never was) compatible with -s / --no-patch, because of this code called from line_log_print, called from the top of log_tree_commit when -L is in effect. Said code simply outputs the entire chosen line-range from any matched commit. (You could patch the hack to obey the diff output options, perhaps.)

    (The other obvious workaround would be to use git rev-list instead of git log, except that -L is, as that first link notes, not properly integrated in the first place, so that git rev-list does not handle it.)

提交回复
热议问题