https://github.com/createyourpersonalaccount closed
https://github.com/llvm/llvm-project/pull/123926
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
createyourpersonalaccount wrote:
I don't know what you're talking about. I know however that you're
bikeshedding. Sad.
https://github.com/llvm/llvm-project/pull/123926
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
createyourpersonalaccount wrote:
> Diagnostic output should go to stderr, but the informational output of
> git-clang-format is sent to stdout instead.
What does that mean? The printing of null-terminated paths on stdout is pretty
standard on unix utilities. What's "diagnostic" and "information
createyourpersonalaccount wrote:
@owenca ping
https://github.com/llvm/llvm-project/pull/123926
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -260,15 +265,13 @@ def main():
"Ignoring the following files (wrong extension, symlink, or "
"ignored by clang-format):"
)
-for filename in ignored_files:
-print("%s" % filename)
+print_f
createyourpersonalaccount wrote:
> > > From #123921, it seems that you only want the new option to work with
> > > `--staged`, but should it also work with other options that may print a
> > > list of filenames?
> >
> >
> > I don't know; I only use `git clang-format` as in #123921 and I am no
https://github.com/createyourpersonalaccount edited
https://github.com/llvm/llvm-project/pull/123926
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -260,15 +265,13 @@ def main():
"Ignoring the following files (wrong extension, symlink, or "
"ignored by clang-format):"
)
-for filename in ignored_files:
-print("%s" % filename)
+print_f
createyourpersonalaccount wrote:
@owenca @mydeveloperday @HazardyKnusperkeks I'll ping now that it's the
weekend, perhaps you have some time to look at this more; in particular now I
got the `--null` option to work for `--staged`, but I'm not sure how you'd like
it to work for other options. I
@@ -869,5 +875,12 @@ def convert_string(bytes_input):
return str(bytes_input)
+def print_filename(filename, null=False):
createyourpersonalaccount wrote:
I removed the default value of the argument in
c47ce3ca8946f81f39757c82bfa5eb4cddc863a5.
https
https://github.com/createyourpersonalaccount updated
https://github.com/llvm/llvm-project/pull/123926
>From 9dfbb9a3cc7f6bc557bc1ccf25cc727a02c4274c Mon Sep 17 00:00:00 2001
From: Nikolaos Chatzikonstantinou
Date: Wed, 22 Jan 2025 05:43:02 -0500
Subject: [PATCH 1/8] [clang-format] Add null-term
@@ -205,6 +205,12 @@ def main():
"commits"
),
)
+p.add_argument(
+"-0",
+"--null",
+action="store_true",
+help="print the affected paths with null-terminated characters",
createyourpersonalaccount wrot
@@ -205,6 +205,12 @@ def main():
"commits"
),
)
+p.add_argument(
+"-0",
+"--null",
createyourpersonalaccount wrote:
Done in e2ecb4bfc9dc8d43d7020d0d7476e86a6a29cadf,
9bd8510d2e4739dbb0347694c84360820a5343b1.
https:
@@ -261,14 +267,14 @@ def main():
"ignored by clang-format):"
)
for filename in ignored_files:
-print("%s" % filename)
+print_filename(filename, opts.null)
createyourpersonalaccount wro
https://github.com/createyourpersonalaccount updated
https://github.com/llvm/llvm-project/pull/123926
>From 9dfbb9a3cc7f6bc557bc1ccf25cc727a02c4274c Mon Sep 17 00:00:00 2001
From: Nikolaos Chatzikonstantinou
Date: Wed, 22 Jan 2025 05:43:02 -0500
Subject: [PATCH 1/7] [clang-format] Add null-term
https://github.com/createyourpersonalaccount updated
https://github.com/llvm/llvm-project/pull/123926
>From 9dfbb9a3cc7f6bc557bc1ccf25cc727a02c4274c Mon Sep 17 00:00:00 2001
From: Nikolaos Chatzikonstantinou
Date: Wed, 22 Jan 2025 05:43:02 -0500
Subject: [PATCH 1/4] [clang-format] Add null-term
https://github.com/createyourpersonalaccount updated
https://github.com/llvm/llvm-project/pull/123926
>From 9dfbb9a3cc7f6bc557bc1ccf25cc727a02c4274c Mon Sep 17 00:00:00 2001
From: Nikolaos Chatzikonstantinou
Date: Wed, 22 Jan 2025 05:43:02 -0500
Subject: [PATCH 1/3] [clang-format] Add null-term
createyourpersonalaccount wrote:
> From #123921, it seems that you only want the new option to work with
> `--staged`, but should it also work with other options that may print a list
> of filenames?
I don't know; I only use `git clang-format` as in #123921 and I am not familiar
with all its
https://github.com/createyourpersonalaccount updated
https://github.com/llvm/llvm-project/pull/123926
>From 9dfbb9a3cc7f6bc557bc1ccf25cc727a02c4274c Mon Sep 17 00:00:00 2001
From: Nikolaos Chatzikonstantinou
Date: Wed, 22 Jan 2025 05:43:02 -0500
Subject: [PATCH 1/2] [clang-format] Add null-term
@@ -205,6 +205,12 @@ def main():
"commits"
),
)
+p.add_argument(
+"-0",
+"--null",
+action="store_true",
+help="print the affected paths with null-terminated characters",
createyourpersonalaccount wrot
createyourpersonalaccount wrote:
> > > This seems reasonable to me, but wait for the others, maybe @owenca
> >
> >
> > I'm wondering if `-0` should turn off all informational messaging as well
> > and _only_ print the paths. As it is, it will print things like _Running
> > clang-format on the
createyourpersonalaccount wrote:
> This seems reasonable to me, but wait for the others, maybe @owenca
I'm wondering if `-0` should turn off all informational messaging as well and
*only* print the paths. As it is, it will print things like _Running
clang-format on the following files:_, even
https://github.com/createyourpersonalaccount edited
https://github.com/llvm/llvm-project/pull/123926
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -869,5 +875,12 @@ def convert_string(bytes_input):
return str(bytes_input)
+def print_filename(filename, null=False):
createyourpersonalaccount wrote:
I think that was a reflex, I set it to `False`, which is what `opts.null` is by
default. Do you
@@ -869,5 +875,12 @@ def convert_string(bytes_input):
return str(bytes_input)
+def print_filename(filename, null=False):
+if null:
+print(filename + "\0", end="")
createyourpersonalaccount wrote:
I don't think so, because indentation is m
https://github.com/createyourpersonalaccount created
https://github.com/llvm/llvm-project/pull/123926
This makes the `git clang-format` tool compose nicely with other shell
utilities in case of maliciously (or innocently) crafted filenames.
>From 9dfbb9a3cc7f6bc557bc1ccf25cc727a02c4274c Mon Se
26 matches
Mail list logo