Re: [PATCH 60/68] prefer memcpy to strcpy

2015-09-28 Thread Rasmus Villemoes
On Thu, Sep 24 2015, Jeff King wrote: > This also eliminates calls to strcpy, which make auditing > the code base harder. Maybe may English parser is broken, but this doesn't immediately sound like what you meant to say. Also, in 29/68 you say "We drop calls to strcpy, which makes auditing the c

[PATCH 3/4] shallow.c: bit manipulation tweaks

2016-12-02 Thread Rasmus Villemoes
27;s just help less smart compilers generate good code anyway. Signed-off-by: Rasmus Villemoes --- shallow.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shallow.c b/shallow.c index 8b1c35d..5aec5a5 100644 --- a/shallow.c +++ b/shallow.c @@ -464,7 +464,7 @@ static

[PATCH 4/4] shallow.c: remove useless test

2016-12-02 Thread Rasmus Villemoes
It seems to be odd to do x=y if x==y. Maybe there's a bug somewhere near this, but as is this is somewhat confusing. Signed-off-by: Rasmus Villemoes --- shallow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shallow.c b/shallow.c index 5aec5a5..7c28239 100644

[PATCH 1/4] shallow.c: make paint_alloc slightly more robust

2016-12-02 Thread Rasmus Villemoes
and size. Signed-off-by: Rasmus Villemoes --- shallow.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shallow.c b/shallow.c index 4d0b005..e21534a 100644 --- a/shallow.c +++ b/shallow.c @@ -445,11 +445,13 @@ static uint32_t *paint_alloc(struct paint_info *info)

[PATCH 2/4] shallow.c: avoid theoretical pointer wrap-around

2016-12-02 Thread Rasmus Villemoes
hat the LHS could wrap around 0, giving a false negative. This might as well be written using pointer subtraction avoiding these issues. Signed-off-by: Rasmus Villemoes --- shallow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shallow.c b/shallow.c index e21534a..8b1

Re: [PATCH] git-send-email: Add auto-cc to all body signatures

2015-12-02 Thread Rasmus Villemoes
On Thu, Dec 08 2011, Joe Perches wrote: > On Thu, 2011-12-08 at 11:37 -0800, Junio C Hamano wrote: >> Joe Perches writes: >> > Many types of signatures are used by various projects. >> > The most common type is formatted: >> >"[some_signature_type]-by: First Last " >> > e.g: >> >"Reporte

Re: [PATCH] send-email: don't cc *-by lines with '-' prefix

2019-04-04 Thread Rasmus Villemoes
On 04/04/2019 11.27, Baruch Siach wrote: > Hi Junio, > > On Thu, Apr 04 2019, Junio C. Hamano wrote: >> Baruch Siach writes: >> Independently, I think it makes sense to do something like /^([a-z][a-z-]*-by|Cc): (.*)/i to tighten the match to exclude a non-trailer; that

[PATCH] help: allow redirecting to help for aliased command

2018-09-26 Thread Rasmus Villemoes
which is different from the current behaviour of using stdout. I'm not sure what the most correct thing is, but I assume --help is mostly used interactively with stdout and stderr pointing at the same place. Signed-off-by: Rasmus Villemoes --- Documentation/config.txt | 10 +

Re: [PATCH] help: allow redirecting to help for aliased command

2018-09-28 Thread Rasmus Villemoes
On 2018-09-26 17:16, Junio C Hamano wrote: > Rasmus Villemoes writes: > >> +/* >> + * We use split_cmdline() to get the first word of the >> + * alias, to ensure that we use the same rules as when >> + * the alias i

Re: [PATCH] help: allow redirecting to help for aliased command

2018-09-28 Thread Rasmus Villemoes
On 2018-09-26 17:19, Duy Nguyen wrote: > On Wed, Sep 26, 2018 at 4:42 PM Taylor Blau wrote: >>> + >>> + /* >>> + * We use split_cmdline() to get the first word of the >>> + * alias, to ensure that we use the same rules as when >>> + * the alias is

Re: [PATCH] help: allow redirecting to help for aliased command

2018-09-28 Thread Rasmus Villemoes
On 2018-09-26 20:12, Taylor Blau wrote: > > In the case where you are scripting (and want to know what 'git co' > means for programmatic usage), I think that there are two options. One, > which you note above, is the 'git -c help.followAlias=false ...' > approach, which I don't think is so bad for

Re: [PATCH] help: allow redirecting to help for aliased command

2018-09-28 Thread Rasmus Villemoes
On 2018-09-26 20:49, Jeff King wrote: > On Wed, Sep 26, 2018 at 08:16:36AM -0700, Junio C Hamano wrote: > >> >> If we expect users to use "git cp --help" a lot more often than "git >> help cp" (or the other way around), one way to give a nicer experience >> may be to unconditionally make "git cp -

[PATCH v2 3/3] git-help.txt: document "git help cmd" vs "git cmd --help" for aliases

2018-10-01 Thread Rasmus Villemoes
This documents the existing behaviour of "git help cmd" when cmd is an alias, as well as providing a hint to use the "git cmd --help" form to be taken directly to the man page for the aliased command. Signed-off-by: Rasmus Villemoes --- Documentation/git-help.txt | 4 +++

[PATCH v2 2/3] git.c: handle_alias: prepend alias info when first argument is -h

2018-10-01 Thread Rasmus Villemoes
rinting this line to stderr should not hurt, and can help in figuring out what is happening in a case like $ git sc -h 'sc' is aliased to '!somecommand' somecommand: invalid option '-h' Suggested-by: Jeff King Signed-off-by: Rasmus Villemoes --- git.c | 3 +++

[PATCH v2 1/3] help: redirect to aliased commands for "git cmd --help"

2018-10-01 Thread Rasmus Villemoes
itbar" case. [1] https://public-inbox.org/git/20180926102636.30691-1...@rasmusvillemoes.dk/ [2] https://public-inbox.org/git/20180926184914.gc30...@sigill.intra.peff.net/ Signed-off-by: Rasmus Villemoes --- builtin/help.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff -

Re: [PATCH v2 1/3] help: redirect to aliased commands for "git cmd --help"

2018-10-02 Thread Rasmus Villemoes
On 2018-10-03 04:13, Jeff King wrote: >> +/* >> + * If we were invoked as "git help cmd", or cmd is an >> + * alias for a shell command, we inform the user what >> + * cmd is an alias for and do nothing else. >> + */ >> +if (!e

Re: [PATCH v2 3/3] git-help.txt: document "git help cmd" vs "git cmd --help" for aliases

2018-10-02 Thread Rasmus Villemoes
On 2018-10-03 04:18, Jeff King wrote: > On Mon, Oct 01, 2018 at 01:21:07PM +0200, Rasmus Villemoes wrote: > >> >> +If an alias is given, git prints a note explaining what it is an alias >> +for on standard output. To get the manual page for the aliased >> +co

[PATCH v3 2/3] git.c: handle_alias: prepend alias info when first argument is -h

2018-10-03 Thread Rasmus Villemoes
rinting this line to stderr should not hurt, and can help in figuring out what is happening in a case like $ git sc -h 'sc' is aliased to '!somecommand' somecommand: invalid option '-h' Suggested-by: Jeff King Signed-off-by: Rasmus Villemoes --- git.c | 3 +++

[PATCH v3 0/3] alias help tweaks

2018-10-03 Thread Rasmus Villemoes
ecker reports. Use better wording in patch 3. Rasmus Villemoes (3): help: redirect to aliased commands for "git cmd --help" git.c: handle_alias: prepend alias info when first argument is -h git-help.txt: document "git help cmd" vs "git cmd --help" for aliases

[PATCH v3 3/3] git-help.txt: document "git help cmd" vs "git cmd --help" for aliases

2018-10-03 Thread Rasmus Villemoes
This documents the existing behaviour of "git help cmd" when cmd is an alias, as well as providing a hint to use the "git cmd --help" form to be taken directly to the man page for the aliased command. Signed-off-by: Rasmus Villemoes --- Documentation/git-help.txt | 4 +++

[PATCH v3 1/3] help: redirect to aliased commands for "git cmd --help"

2018-10-03 Thread Rasmus Villemoes
itbar" case. [1] https://public-inbox.org/git/20180926102636.30691-1...@rasmusvillemoes.dk/ [2] https://public-inbox.org/git/20180926184914.gc30...@sigill.intra.peff.net/ Signed-off-by: Rasmus Villemoes --- builtin/help.c | 34 +++--- 1 file changed, 31 insertions(+), 3 deletions(-)

Re: [PATCH v3 1/3] help: redirect to aliased commands for "git cmd --help"

2018-10-05 Thread Rasmus Villemoes
On 2018-10-05 10:19, Junio C Hamano wrote: > Rasmus Villemoes writes: > >> >> I believe that printing the "is aliased to" message also in case (2) has >> value: Depending on pager setup, or if the user has help.format=web, the >> message is still prese

[PATCH v4 0/3] alias help tweaks

2018-10-09 Thread Rasmus Villemoes
ecker reports. Use better wording in patch 3. v4: Reword commit log in patch 1. Rasmus Villemoes (3): help: redirect to aliased commands for "git cmd --help" git.c: handle_alias: prepend alias info when first argument is -h git-help.txt: document "git help cmd" vs &qu

[PATCH v4 1/3] help: redirect to aliased commands for "git cmd --help"

2018-10-09 Thread Rasmus Villemoes
rolled away, but being printed to stderr, it should never hurt. [1] https://public-inbox.org/git/20180926102636.30691-1...@rasmusvillemoes.dk/ [2] https://public-inbox.org/git/20180926184914.gc30...@sigill.intra.peff.net/ Signed-off-by: Rasmus Villemoes --- builtin/help.c | 34 +++

[PATCH v4 2/3] git.c: handle_alias: prepend alias info when first argument is -h

2018-10-09 Thread Rasmus Villemoes
rinting this line to stderr should not hurt, and can help in figuring out what is happening in a case like $ git sc -h 'sc' is aliased to '!somecommand' somecommand: invalid option '-h' Suggested-by: Jeff King Signed-off-by: Rasmus Villemoes --- git.c | 3 +++

[PATCH v4 3/3] git-help.txt: document "git help cmd" vs "git cmd --help" for aliases

2018-10-09 Thread Rasmus Villemoes
This documents the existing behaviour of "git help cmd" when cmd is an alias, as well as providing a hint to use the "git cmd --help" form to be taken directly to the man page for the aliased command. Signed-off-by: Rasmus Villemoes --- Documentation/git-help.txt | 4 +++

[PATCH 1/3] Documentation/git-send-email.txt: style fixes

2018-10-10 Thread Rasmus Villemoes
For consistency, add full stops in a few places and outdent a line by one space. Signed-off-by: Rasmus Villemoes --- Documentation/git-send-email.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt

[PATCH 0/3] send-email: Also pick up cc addresses from -by trailers

2018-10-10 Thread Rasmus Villemoes
7;sob' means in this line from 'git send-email -h': --suppress-cc * author, self, sob, cc, cccmd, body, bodycc, all. Rasmus Villemoes (3): Documentation/git-send-email.txt: style fixes send-email: only consider lines containing @ or <> for automatic

[PATCH 3/3] send-email: also pick up cc addresses from -by trailers

2018-10-10 Thread Rasmus Villemoes
dy has its own suppression category. It seems natural to make 'misc-by' implied by 'body'. Based-on-patch-by: Joe Perches Signed-off-by: Rasmus Villemoes --- Documentation/git-send-email.txt | 5 - git-send-email.perl | 14 -- 2 files changed,

[PATCH 2/3] send-email: only consider lines containing @ or <> for automatic Cc'ing

2018-10-10 Thread Rasmus Villemoes
ing a garbage address, insist on at least a @ or a <> pair being present. This is also preparation for the next patch, where we are likely to encounter even more non-addresses in -by lines, such as Reported-by: Coverity Patch-generated-by: Coccinelle Signed-off-by: Rasmus Villemoes -

Re: [PATCH 2/3] send-email: only consider lines containing @ or <> for automatic Cc'ing

2018-10-10 Thread Rasmus Villemoes
On 2018-10-10 14:57, Ævar Arnfjörð Bjarmason wrote: > > On Wed, Oct 10 2018, Rasmus Villemoes wrote: > >> +if ($c !~ /.+@.+|<.+>/) { >> +printf("(body) Ignoring %s from line '%s'\n", >> +

Re: [PATCH 2/3] send-email: only consider lines containing @ or <> for automatic Cc'ing

2018-10-11 Thread Rasmus Villemoes
On 2018-10-11 08:06, Junio C Hamano wrote: > Rasmus Villemoes writes: > >> I considered that (and also had a version where I simply insisted on a @ >> being present), but that means the user no longer would get prompted >> about the cases where the address was just sligh

Re: [PATCH 3/3] send-email: also pick up cc addresses from -by trailers

2018-10-11 Thread Rasmus Villemoes
On 2018-10-11 08:18, Junio C Hamano wrote: > Rasmus Villemoes writes: > we now ... > >> +next if $suppress_cc{'sob'} and $what =~ >> /^Signed-off-by$/i; > > ... must make sure what we have is _exactly_ "signed-off-by

Re: [PATCH 3/3] send-email: also pick up cc addresses from -by trailers

2018-10-16 Thread Rasmus Villemoes
On 2018-10-16 07:57, Junio C Hamano wrote: > Rasmus Villemoes writes: > >>> I wonder if it would make it easier to grok if we made the logic >>> inside out, i.e. >>> >>> if ($sc eq $sender) { >>> ... >>>

[PATCH v2 3/3] send-email: also pick up cc addresses from -by trailers

2018-10-16 Thread Rasmus Villemoes
dy has its own suppression category. It seems natural to make 'misc-by' implied by 'body'. Based-on-patch-by: Joe Perches Signed-off-by: Rasmus Villemoes --- Documentation/git-send-email.txt | 5 - git-send-email.perl | 19 --- 2 files changed,

[PATCH v2 2/3] send-email: only consider lines containing @ or <> for automatic Cc'ing

2018-10-16 Thread Rasmus Villemoes
ing a garbage address, insist on at least a @ or a <> pair being present. This is also preparation for the next patch, where we are likely to encounter even more non-addresses in -by lines, such as Reported-by: Coverity Patch-generated-by: Coccinelle Signed-off-by: Rasmus Villemoes -

[PATCH v2 0/3] send-email: Also pick up cc addresses from -by trailers

2018-10-16 Thread Rasmus Villemoes
b' means in this line from 'git send-email -h': --suppress-cc * author, self, sob, cc, cccmd, body, bodycc, all. Rasmus Villemoes (3): Documentation/git-send-email.txt: style fixes send-email: only consider lines containing @ or <> for automatic Cc'ing

[PATCH v2 1/3] Documentation/git-send-email.txt: style fixes

2018-10-16 Thread Rasmus Villemoes
For consistency, add full stops in a few places and outdent a line by one space. Signed-off-by: Rasmus Villemoes --- Documentation/git-send-email.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt

[RFC PATCH 0/5] builtin/grep.c: fix a tiny logic flaw

2019-02-12 Thread Rasmus Villemoes
aders and/or people who copy the producer/consumer logic to their own code. Rasmus Villemoes (5): builtin/grep.c: change todo_* variables to unsigned builtin/grep.c: refactor loop in work_done() slightly builtin/grep.c: add shorthand for &todo[todo_end] in add_work() builtin/grep.c: add

[RFC PATCH 4/5] builtin/grep.c: add todo_item helper

2019-02-12 Thread Rasmus Villemoes
Use a helper for indexing into the todo array with any of the todo_* variables, in preparation for not keeping those reduced mod TODO_SIZE. Signed-off-by: Rasmus Villemoes --- builtin/grep.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/builtin/grep.c b/builtin

[RFC PATCH 5/5] builtin/grep.c: fix fence-post error in add_work()

2019-02-12 Thread Rasmus Villemoes
ad of todo_done. Signed-off-by: Rasmus Villemoes --- builtin/grep.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index 35ed79b0dd..ce158cabbb 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -102,7 +102,7 @@ static void add_w

[RFC PATCH 1/5] builtin/grep.c: change todo_* variables to unsigned

2019-02-12 Thread Rasmus Villemoes
In preparation for subsequent patches that make todo_* free-running instead of reducing them mod TODO_SIZE, change their type to unsigned to avoid undefined behaviour in case anybody ever greps more than 2 billion files. Signed-off-by: Rasmus Villemoes --- builtin/grep.c | 8 1 file

[RFC PATCH 2/5] builtin/grep.c: refactor loop in work_done() slightly

2019-02-12 Thread Rasmus Villemoes
As preparation for changing all accesses to the todo array to use a helper function, do the .done check in the loop body. Signed-off-by: Rasmus Villemoes --- builtin/grep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/grep.c b/builtin/grep.c index 6c1e90d43b

[RFC PATCH 3/5] builtin/grep.c: add shorthand for &todo[todo_end] in add_work()

2019-02-12 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- builtin/grep.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index 211ae54222..92b9e6198d 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -93,18 +93,20 @@ static int skip_first_line

Re: [PATCH] send-email: don't cc *-by lines with '-' prefix

2019-03-17 Thread Rasmus Villemoes
ick up anything from that due to the anchoring. Except for the misc-by regexp that added hyphens to grab Reported-and-tested-by and similar. So this is by far the simplest fix that doesn't hurt the common use cases the misc-by handling was added to support, so Acked-by: Rasmus Villemoes Rasmus

feature request: allow commit.email config setting

2018-08-30 Thread Rasmus Villemoes
As part of my dayjob, I did and still do some work on an upstream project. A while ago, I was granted commit access to that project. However, upstream asked that I would register with their system using a private email, or at least one that wouldn't change if I changed jobs, rather than my work ema

Re: feature request: allow commit.email config setting

2018-08-30 Thread Rasmus Villemoes
On 2018-08-30 20:13, Eric Sunshine wrote: > On Thu, Aug 30, 2018 at 7:26 AM Rasmus Villemoes > wrote: >> I can set GIT_COMMITTER_EMAIL in the environment, but that is >> rather inconvenient, since that means I have to remember to do that in >> the shell I'm using for

Re: [RFC PATCH] cherry: teach git cherry to respect pathspec

2018-03-10 Thread Rasmus Villemoes
On 16 February 2018 at 02:15, Rasmus Villemoes wrote: > This is a very naive attempt at teaching git cherry to restrict > attention to a given pathspec. Very much RFC, hence no documentation > update or test cases for now. > Ping, any comments on this?

Documentation for update-index

2018-01-06 Thread Rasmus Villemoes
The man page for update-index says -q Quiet. If --refresh finds that the index needs an update, the default behavior is to error out. This option makes git update-index continue anyway. --ignore-submodules Do not try to update submodules. This option

[PATCH 0/3] a few grep patches

2018-02-15 Thread Rasmus Villemoes
I believe the first two should be ok, but I'm not sure what I myself think of the third one. Perhaps the saving is not worth the complexity, but it does annoy my optimization nerve to see all the unnecessary duplicated work being done. Rasmus Villemoes (3): grep: move grep_source_init ou

[PATCH 2/3] grep: simplify grep_oid and grep_file

2018-02-15 Thread Rasmus Villemoes
In the NO_PTHREADS or !num_threads case, this doesn't change anything. In the threaded case, note that grep_source_init duplicates its third argument, so there is no need to keep [path]buf.buf alive across the call of add_work(). Signed-off-by: Rasmus Villemoes --- builtin/grep.c | 6 ++--

[PATCH 3/3] grep: avoid one strdup() per file

2018-02-15 Thread Rasmus Villemoes
gs->identifier, and changing grep_source_clear accordingly to avoid a double free. Signed-off-by: Rasmus Villemoes --- grep.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/grep.c b/grep.c index 3d7cd0e96..b1532b1b6 100644 --- a/grep.c +++ b/grep.c @@ -1972,7 +1972,8 @

[PATCH 1/3] grep: move grep_source_init outside critical section

2018-02-15 Thread Rasmus Villemoes
(avoiding repeating the "GREP_SOURCE_OID, pathbuf.buf, path, oid" argument list); a subsequent cleanup patch will make that even more so. Signed-off-by: Rasmus Villemoes --- builtin/grep.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/builti

[RFC PATCH] cherry: teach git cherry to respect pathspec

2018-02-15 Thread Rasmus Villemoes
revealed that (1) there isn't actually any pathspec handling and (2) any argc other than 1..3 is treated as 0 - something which is probably also worth fixing. With this patch, the command above does give something reasonable, and t3500-cherry.sh also seems to pass. Signed-off-b

[PATCH v2 0/2] two small grep patches

2018-02-23 Thread Rasmus Villemoes
comment to explain why one then does the memset despite the first half of the comment. Rasmus Villemoes (2): grep: move grep_source_init outside critical section grep: simplify grep_oid and grep_file builtin/grep.c | 33 - 1 file changed, 20 insertions(+), 13

[PATCH v2 2/2] grep: simplify grep_oid and grep_file

2018-02-23 Thread Rasmus Villemoes
In the NO_PTHREADS or !num_threads case, this doesn't change anything. In the threaded case, note that grep_source_init duplicates its third argument, so there is no need to keep [path]buf.buf alive across the call of add_work(). Signed-off-by: Rasmus Villemoes --- builtin/grep.c | 6 ++--

[PATCH v2 1/2] grep: move grep_source_init outside critical section

2018-02-23 Thread Rasmus Villemoes
(avoiding repeating the long "GREP_SOURCE_OID, pathbuf.buf, path, oid" argument list); a subsequent cleanup patch will make that even more so. Signed-off-by: Rasmus Villemoes --- builtin/grep.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git

[PATCH 1/2] Documentation/config: add sendemail.tocmd to list preceding "See git-send-email(1)"

2017-11-13 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- Documentation/config.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 671fcbaa0..d88fc9f63 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -3000,6 +3000,7

[PATCH 2/2] completion: add git config sendemail.tocmd

2017-11-13 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- contrib/completion/git-completion.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index fdd984d34..10607cdf2 100644 --- a/contrib/completion/git-completion.bash +++ b

[RFC/PATCH 0/2] Introduce safe-include config feature

2014-10-02 Thread Rasmus Villemoes
e value is interpreted as a whitespace-separated list of, possibly negated, patterns. Later patterns override earlier ones. If the feature is deemed worthwhile and my approach is acceptable, I'll go ahead and try to write some documentation. For now, there is just a small test script. Rasm

[RFC/PATCH 1/2] config: Add safe-include directive

2014-10-02 Thread Rasmus Villemoes
fe-include directives, so they will effectively just ignore them. Obviously, we must ignore safe-include.whitelist directives when we are processing a safe-included file. Signed-off-by: Rasmus Villemoes --- config.c | 91 +--- 1 file changed, 88

[RFC/PATCH 2/2] config: Add test of safe-include feature

2014-10-02 Thread Rasmus Villemoes
This adds a script for testing various aspects of the safe-include feature. Signed-off-by: Rasmus Villemoes --- t/t1309-config-safe-include.sh | 96 ++ 1 file changed, 96 insertions(+) create mode 100755 t/t1309-config-safe-include.sh diff --git a/t

Re: [RFC/PATCH 1/2] config: Add safe-include directive

2014-10-06 Thread Rasmus Villemoes
Junio C Hamano wrote: > (by the way, we do not do dashes in names for configuration by > convention) OK. Actually, I now think I'd prefer a subsection [include "safe"], but I don't have any strong preferences regarding the names. > That syntax _could_ be just a relative path (e.g. project.gitco

Re: [PATCH 3/6] strbuf_getwholeline: use getc_unlocked

2015-04-07 Thread Rasmus Villemoes
On Sun, Apr 05 2015, Jeff King wrote: > which is back to the v2.0.0 number. Even with the extra strlen, it seems > that what fgets does internally beats repeated getc calls. Which I guess > is not too surprising, as each getc() will have to check for underflow > in the buffer. Perhaps there is mo

Re: [PATCH 3/6] strbuf_getwholeline: use getc_unlocked

2015-04-07 Thread Rasmus Villemoes
On Tue, Apr 07 2015, Jeff King wrote: > On Tue, Apr 07, 2015 at 03:48:33PM +0200, Rasmus Villemoes wrote: > >> Implementation-wise, I think strbuf_getwholeline could be implemented >> mostly as a simple wrapper for getdelim. If I'm reading the current code >> an

[PATCH] git-send-email: kill $prompting variable

2013-08-16 Thread Rasmus Villemoes
some unrelated item had to be prompted for. So kill $prompting. Signed-off-by: Rasmus Villemoes --- git-send-email.perl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 2162478..f608d9b 100755 --- a/git-send-email.perl +++ b/git

[RFC] git-send-email: Cache generated message-ids, use them when prompting

2013-08-16 Thread Rasmus Villemoes
ID of the earlier email (which is cumbersome in some MUAs) and then copy-paste that. If this idea is accepted, I'm certain I'll get to use the feature immediately, since the patch is not quite ready for inclusion :-) Signed-off-by: Rasmus Villemoes --- git-send-e

[PATCH v2 0/2] git-send-email: Message-ID caching

2013-08-21 Thread Rasmus Villemoes
broken anything in the process. [*] Suggestions for improving that heuristic are welcome. One thing that might be worthwhile is to give words ending in a colon higher weight. Rasmus Villemoes (2): git-send-email: add optional 'choices' parameter to the ask sub git-send-email: Cach

[PATCH 1/2] git-send-email: add optional 'choices' parameter to the ask sub

2013-08-21 Thread Rasmus Villemoes
, where the zeroth element is the choice and the first is used for the prompt. Signed-off-by: Rasmus Villemoes --- git-send-email.perl | 11 +++ 1 file changed, 11 insertions(+) diff --git a/git-send-email.perl b/git-send-email.perl index 2162478..ac3b02d 100755 --- a/git-send-email.perl

[PATCH 2/2] git-send-email: Cache generated message-ids, use them when prompting

2013-08-21 Thread Rasmus Villemoes
ch invocation of git-send-email. Signed-off-by: Rasmus Villemoes --- git-send-email.perl | 133 --- 1 file changed, 127 insertions(+), 6 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index ac3b02d..5094267 100755 --- a/git-send-