[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-05 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/74230 >From ae4097b53b90e31802be0be5c8a81fb74c81efc9 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Sat, 2 Dec 2023 23:46:58 -0800 Subject: [PATCH 1/3] [clang-format] Add "three dot" diff option to git-cla

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-04 Thread Owen Pan via cfe-commits
@@ -328,6 +337,10 @@ def compute_diff(commits, files, staged): git_tool = 'diff-tree' elif staged: extra_args += ['--cached'] + + if len(commits) > 1 and diff_common_commit: +commits = [f'{commits[0]}...{commits[1]}'] owenca wrote: ```suggestion

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-04 Thread Owen Pan via cfe-commits
@@ -153,8 +157,13 @@ def main(): else: if len(commits) > 2: die('at most two commits allowed; %d given' % len(commits)) + if len(commits) < 2 and opts.diff_from_common_commit: +die('--diff_from_common_commit is only allowed when two commits are given')

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-03 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM. Please give some time for clang-format folks to review the change as it is not my area of expertise. https://github.com/llvm/llvm-project/pull/74230 ___ cfe-commits mailing list cfe-commit

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-03 Thread Aiden Grossman via cfe-commits
@@ -153,7 +157,10 @@ def main(): else: if len(commits) > 2: die('at most two commits allowed; %d given' % len(commits)) - changed_lines = compute_diff_and_extract_lines(commits, files, opts.staged) + changed_lines = compute_diff_and_extract_lines(commits,

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-03 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/74230 >From ae4097b53b90e31802be0be5c8a81fb74c81efc9 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Sat, 2 Dec 2023 23:46:58 -0800 Subject: [PATCH 1/2] [clang-format] Add "three dot" diff option to git-cla

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-03 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/74230 >From ae4097b53b90e31802be0be5c8a81fb74c81efc9 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Sat, 2 Dec 2023 23:46:58 -0800 Subject: [PATCH] [clang-format] Add "three dot" diff option to git-clang-f

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-03 Thread via cfe-commits
@@ -153,7 +157,10 @@ def main(): else: if len(commits) > 2: die('at most two commits allowed; %d given' % len(commits)) - changed_lines = compute_diff_and_extract_lines(commits, files, opts.staged) + changed_lines = compute_diff_and_extract_lines(commits,

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Aiden Grossman (boomanaiden154) Changes This patch adds in the ability to do a "three dot" git-clang-format between two commits. This looks at the diff between the second commit and the common merge base rather than comparing at th

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-02 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/74230 This patch adds in the ability to do a "three dot" git-clang-format between two commits. This looks at the diff between the second commit and the common merge base rather than comparing at the point of th