[PATCH] git-svn: trim leading and trailing whitespaces in author name

2019-09-23 Thread Tobias Klauser
ix this by trimming the author name retreived from svn before using it in check_author. Helped-by: Eric Sunshine Signed-off-by: Tobias Klauser --- perl/Git/SVN.pm | 4 1 file changed, 4 insertions(+) diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm index 76b29659057d..4b28b8778474 100644 ---

[PATCH v3] git-svn: trim leading and trailing whitespaces in author name

2019-09-13 Thread Tobias Klauser
ix this by trimming the author name retreived from svn before using it in check_author. Signed-off-by: Tobias Klauser --- v3: - check author string length after whitespace trimming - trim leading and trailing whitespaces in two separate steps perl/Git/SVN.pm | 4 1 file changed, 4 insertion

Re: [PATCH v2] git-svn: trim leading and trailing whitespaces in author name

2019-09-13 Thread Tobias Klauser
Thank you for the review Eric! On 2019-09-12 at 20:20:11 +0200, Eric Sunshine wrote: > On Thu, Sep 12, 2019 at 10:56 AM Tobias Klauser wrote: > > v2: > > - move whitespace trimming below defined'ness check as per Eric Sunshine's > >review comment > > di

[PATCH v2] git-svn: trim leading and trailing whitespaces in author name

2019-09-12 Thread Tobias Klauser
ix this by trimming the author name retreived from svn before using it in check_author. Signed-off-by: Tobias Klauser --- v2: - move whitespace trimming below defined'ness check as per Eric Sunshine's review comment perl/Git/SVN.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/pe

Re: [PATCH] git-svn: trim leading and trailing whitespaces in author name

2019-09-12 Thread Tobias Klauser
On 2019-09-12 at 16:47:41 +0200, Eric Sunshine wrote: > On Thu, Sep 12, 2019 at 7:59 AM Tobias Klauser wrote: > > In some cases, the svn author names might contain leading or trailing > > whitespaces, leading to messages such as: > > > > Author: user1 > &

[PATCH] git-svn: trim leading and trailing whitespaces in author name

2019-09-12 Thread Tobias Klauser
ix this by trimming the author name retreived from svn before using it in check_author. Signed-off-by: Tobias Klauser --- perl/Git/SVN.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm index 76b29659057d..db412c653d1d 100644 --- a/perl/Git/SVN.pm +++ b/perl/

Re: [PATCH] git-rebase--{interactive,preserve-merges}: fix formatting of todo help message

2018-07-04 Thread Tobias Klauser
Hi Johannes Thanks for your detailed answer. On 2018-07-04 at 15:09:34 +0200, Johannes Schindelin wrote: > On Wed, 4 Jul 2018, Tobias Klauser wrote: > > > Part of the todo help message in git-rebase--interactive.sh and > > git-rebase--preserve-merges.sh is unnecessarily in

[PATCH] git-rebase--{interactive,preserve-merges}: fix formatting of todo help message

2018-07-04 Thread Tobias Klauser
THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted. # # Note that empty commits are commented out Signed-off-by: Tobias Klauser --- git-rebase--interactive.sh | 4 ++-- git-rebase--preserve-merges.sh | 4 ++-- 2 files changed, 4 insertions

Re: [PATCH] strbuf: Remove unused stripspace function alias

2017-11-29 Thread Tobias Klauser
; all topic branches had time to switch over. They have had time, so remove > the old alias. > > Signed-off-by: Elijah Newren Reviewed-by: Tobias Klauser Thanks!

Re: [PATCH] RelNotes: typo fix in 2.11.0 notes

2016-11-29 Thread Tobias Klauser
On 2016-11-29 at 19:35:38 +0100, Junio C Hamano wrote: > Tobias Klauser writes: > > > s/paht/path/ in the "Backwards compatibility notes" section of the > > 2.11.0 release notes. > > > > Signed-off-by: Tobias Klauser > > --- > > This loo

[PATCH] RelNotes: typo fix in 2.11.0 notes

2016-11-29 Thread Tobias Klauser
s/paht/path/ in the "Backwards compatibility notes" section of the 2.11.0 release notes. Signed-off-by: Tobias Klauser --- Documentation/RelNotes/2.11.0.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/RelNotes/2.11.0.txt b/Documentation/RelNotes/

[PATCH v2] diffcore-delta: remove unused parameter to diffcore_count_changes()

2016-11-14 Thread Tobias Klauser
The delta_limit parameter to diffcore_count_changes() has been unused since commit ba23bbc8e ("diffcore-delta: make change counter to byte oriented again.", 2006-03-04). Remove the parameter and adjust all callers. Signed-off-by: Tobias Klauser --- v2: In the commit message, ref

Re: [PATCH] diffcore-delta: remove unused parameter to diffcore_count_changes()

2016-11-04 Thread Tobias Klauser
On 2016-11-04 at 17:37:14 +0100, Jeff King wrote: > On Fri, Nov 04, 2016 at 11:24:36AM +0100, Tobias Klauser wrote: > > > The delta_limit parameter to diffcore_count_changes() has been unused > > since commit c06c79667c95 ("diffcore-rename: somewhat optimized.").

Re: [PATCH] branch: remove unused parameter to create_branch()

2016-11-04 Thread Tobias Klauser
On 2016-11-04 at 17:30:12 +0100, Jeff King wrote: > On Fri, Nov 04, 2016 at 04:19:49PM +0100, Tobias Klauser wrote: > > > The name parameter to create_branch() has been unused since commit > > 55c4a673070f ("Prevent force-updating of the current branch"). Remove >

[PATCH] branch: remove unused parameter to create_branch()

2016-11-04 Thread Tobias Klauser
The name parameter to create_branch() has been unused since commit 55c4a673070f ("Prevent force-updating of the current branch"). Remove the parameter and adjust the callers accordingly. Also remove the parameter from the function's documentation comment. Signed-off-by:

[PATCH] diffcore-delta: remove unused parameter to diffcore_count_changes()

2016-11-04 Thread Tobias Klauser
The delta_limit parameter to diffcore_count_changes() has been unused since commit c06c79667c95 ("diffcore-rename: somewhat optimized."). Remove the parameter and adjust all callers. Signed-off-by: Tobias Klauser --- diff.c| 2 +- diffcore-break.c | 1 - diffcore-de

Re: [PATCH] interpret-trailers: add option for in-place editing

2016-01-07 Thread Tobias Klauser
On 2016-01-06 at 20:02:23 +0100, Eric Sunshine wrote: > On Wed, Jan 6, 2016 at 8:34 AM, Tobias Klauser > wrote: > > Add a command line option --in-place to support in-place editing akin to > > sed -i. This allows to write commands like the following: > > > > gi

Re: [PATCH] interpret-trailers: add option for in-place editing

2016-01-06 Thread Tobias Klauser
Thanks for your feedback Matthieu! On 2016-01-06 at 15:19:45 +0100, Matthieu Moy wrote: > Tobias Klauser writes: > > > From: Tobias Klauser > > > > Add a command line option --in-place to support in-place editing akin to > > sed -i. This allows to wri

[PATCH] interpret-trailers: add option for in-place editing

2016-01-06 Thread Tobias Klauser
From: Tobias Klauser Add a command line option --in-place to support in-place editing akin to sed -i. This allows to write commands like the following: git interpret-trailers --trailer "X: Y" a.txt > b.txt && mv b.txt a.txt in a more concise way: git interpret-tra

Re: [PATCH 1/5] gc: remove unused #include "sigchain.h"

2015-10-23 Thread Tobias Klauser
On 2015-10-22 at 22:14:29 +0200, Junio C Hamano wrote: > Tobias Klauser writes: > > > After switching to use the tempfile module in commit ebebeaea (gc: use > > tempfile module to handle gc.pid file), no declarations from sigchain.h > > are used in builtin/gc.c a

[PATCH 5/5] shallow: remove unused #include "sigchain.h"

2015-10-22 Thread Tobias Klauser
After switching to use the tempfile module in commit 6e122b44 (setup_temporary_shallow(): use tempfile module), no declarations from sigchain.h are used in read-cache.c anymore. Thus, remove the #include. Signed-off-by: Tobias Klauser --- shallow.c | 1 - 1 file changed, 1 deletion(-) diff

[PATCH 3/5] diff: remove unused #include "sigchain.h"

2015-10-22 Thread Tobias Klauser
After switching to use the tempfile module in commit 284098f1 (diff: use tempfile module), no declarations from sigchain.h are used in diff.c anymore. Thus, remove the #include. Signed-off-by: Tobias Klauser --- diff.c | 1 - 1 file changed, 1 deletion(-) diff --git a/diff.c b/diff.c index

[PATCH 2/5] credential-cache--daemon: remove unused #include "sigchain.h"

2015-10-22 Thread Tobias Klauser
After switching to use the tempfile module in commit 9e903316 (credential-cache--daemon: use tempfile module), no declarations from sigchain.h are used in credential-cache--daemon.c anymore. Thus, remove the #include. Signed-off-by: Tobias Klauser --- credential-cache--daemon.c | 1 - 1 file

[PATCH 1/5] gc: remove unused #include "sigchain.h"

2015-10-22 Thread Tobias Klauser
After switching to use the tempfile module in commit ebebeaea (gc: use tempfile module to handle gc.pid file), no declarations from sigchain.h are used in builtin/gc.c anymore. Thus, remove the #include. Signed-off-by: Tobias Klauser --- builtin/gc.c | 1 - 1 file changed, 1 deletion(-) diff

[PATCH 4/5] read-cache: remove unused #include "sigchain.h"

2015-10-22 Thread Tobias Klauser
After switching to use the tempfile module in commit f6ecc62d (write_shared_index(): use tempfile module), no declarations from sigchain.h are used in read-cache.c anymore. Thus, remove the #include. Signed-off-by: Tobias Klauser --- read-cache.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 0/5] Remove unused #include "sigchain.h"

2015-10-22 Thread Tobias Klauser
This series removes the #include of sigchain.h from several modules after they were changed to use the tempfile module and they thus no longer use any declarations from sigchain.h Tobias Klauser (5): gc: remove unused #include "sigchain.h" credential-cache--daemon: remove unuse

Re: [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-20 Thread Tobias Klauser
On 2015-10-17 at 23:24:13 +0200, Junio C Hamano wrote: > Tobias Klauser writes: > > > On 2015-10-16 at 19:29:35 +0200, Junio C Hamano wrote: > >> Junio C Hamano writes: > >> > >> >> - if (mode == INVAL) > >> >> -

Re: [PATCH v2 3/4] stripspace: Implement --count-lines option

2015-10-19 Thread Tobias Klauser
On 2015-10-18 at 19:18:53 +0200, Junio C Hamano wrote: > Eric Sunshine writes: > > > Is there any application beyond git-rebase--interactive where a > > --count-lines options is expected to be useful? It's not obvious from > > the commit message that this change is necessarily a win for later >

Re: [PATCH v2 3/4] stripspace: Implement --count-lines option

2015-10-19 Thread Tobias Klauser
On 2015-10-18 at 01:57:57 +0200, Eric Sunshine wrote: > On Fri, Oct 16, 2015 at 11:16 AM, Tobias Klauser wrote: > > Implement the --count-lines options for git stripspace [...] > > > > This will make it easier to port git-rebase--interactive.sh to C later > > on. &g

Re: [PATCH 2/3] stripspace: Implement --count-lines option

2015-10-17 Thread Tobias Klauser
On 2015-10-16 at 19:35:49 +0200, Junio C Hamano wrote: > Tobias Klauser writes: > > >> So this is your output code, which gives only the number of lines > >> without the cleaned up result. > > > > This should better be a simple printf("%zu\n",

Re: [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-17 Thread Tobias Klauser
On 2015-10-16 at 19:07:34 +0200, Junio C Hamano wrote: > Tobias Klauser writes: > > > Use parse-options to parse command-line options instead of a > > hand-crafted implementation. > > > > This is a preparatory patch to simplify the introduction of the > >

Re: [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-17 Thread Tobias Klauser
On 2015-10-16 at 19:29:35 +0200, Junio C Hamano wrote: > Junio C Hamano writes: > > >> - if (mode == INVAL) > >> - usage(usage_msg); > > > > When given "git stripspace -s blorg", we used to set mode to INVAL > > and then showed the correct usage. But we no longer have a check > > that

Re: [PATCH v2 0/4] stripspace: Implement and use --count-lines option

2015-10-17 Thread Tobias Klauser
On 2015-10-16 at 18:41:31 +0200, Junio C Hamano wrote: > Tobias Klauser writes: > > Be consistent with the subjects, please. > > > strbuf: make stripspace() part of strbuf > > s/make/make/ ;-) > > > stripspace: Use parse-options for co

Re: [PATCH v2 0/4] stripspace: Implement and use --count-lines option

2015-10-17 Thread Tobias Klauser
On 2015-10-16 at 18:54:45 +0200, Matthieu Moy wrote: > Tobias Klauser writes: > > > - Split patch 2/3 into two patches: patch 2/4 switches git stripspace > > to use parse-options and patch 3/4 introduces the new option. > > Much better now. > > &g

[PATCH v2 4/4] git rebase -i: Use newly added --count-lines option for stripspace

2015-10-16 Thread Tobias Klauser
Use the newly added --count-lines option for 'git stripspace' to count lines instead of piping the entire output to 'wc -l'. Signed-off-by: Tobias Klauser --- Implements the small project idea from https://git.wiki.kernel.org/index.php/SmallProjectsIdeas#implement_.27

[PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-16 Thread Tobias Klauser
Use parse-options to parse command-line options instead of a hand-crafted implementation. This is a preparatory patch to simplify the introduction of the --count-lines option in a follow-up patch. Signed-off-by: Tobias Klauser --- builtin/stripspace.c | 56

[PATCH v2 3/4] stripspace: Implement --count-lines option

2015-10-16 Thread Tobias Klauser
easier to port git-rebase--interactive.sh to C later on. Furthermore, add the corresponding documentation and tests. Signed-off-by: Tobias Klauser --- Implements the small project idea from https://git.wiki.kernel.org/index.php/SmallProjectsIdeas#implement_.27--count-lines.27_in_.27git_stripsp

[PATCH v2 1/4] strbuf: make stripspace() part of strbuf

2015-10-16 Thread Tobias Klauser
corresponding prefix to its name. Also switch all current users of stripspace() to the new function name and keep a temporary wrapper inline function for any topic branches still using stripspace(). Reviewed-by: Matthieu Moy Signed-off-by: Tobias Klauser --- Implements the small project idea

[PATCH v2 0/4] stripspace: Implement and use --count-lines option

2015-10-16 Thread Tobias Klauser
ion. - Adjust commit messages to not include links to the wiki, fully describe the motivation in the commit message instead. Tobias Klauser (4): strbuf: make stripspace() part of strbuf stripspace: Use parse-options for command-line parsing stripspace: Implement --count-lines option git reb

Re: [PATCH 2/3] stripspace: Implement --count-lines option

2015-10-16 Thread Tobias Klauser
On 2015-10-15 at 18:52:54 +0200, Matthieu Moy wrote: > Tobias Klauser writes: > > +static const char * const usage_msg[] = { > > Stick the * to usage_msg please. Just noticed while looking at how other sub-commands define this, the vast majority use "const char * const&

Re: [PATCH 2/3] stripspace: Implement --count-lines option

2015-10-16 Thread Tobias Klauser
On 2015-10-15 at 21:21:53 +0200, Matthieu Moy wrote: > Tobias Klauser writes: > > > + * comments are considered contents to be removed or not. Returns the > > + * number of lines in the resulting buffer. > > We write comments at imperative tone, hence "Retur

Re: [PATCH 2/3] stripspace: Implement --count-lines option

2015-10-16 Thread Tobias Klauser
On 2015-10-15 at 19:58:26 +0200, Junio C Hamano wrote: > Tobias Klauser writes: > > > diff --git a/Documentation/git-stripspace.txt > > b/Documentation/git-stripspace.txt > > index 60328d5..411e17c 100644 > > --- a/Documentation/git-stripspace.txt > > ++

Re: [PATCH 2/3] stripspace: Implement --count-lines option

2015-10-16 Thread Tobias Klauser
On 2015-10-15 at 18:52:54 +0200, Matthieu Moy wrote: > Tobias Klauser writes: > > > --- a/Documentation/git-stripspace.txt > > +++ b/Documentation/git-stripspace.txt > > @@ -9,7 +9,7 @@ git-stripspace - Remove unnecessary whitespace > > SYNOPSIS > > --

Re: [PATCH 1/3] strbuf: make stripspace() part of strbuf

2015-10-16 Thread Tobias Klauser
On 2015-10-15 at 18:42:23 +0200, Matthieu Moy wrote: > Tobias Klauser writes: > > > Also switch all current users of stripspace() to the new function name > > and keep a temporary wrapper inline function for topic branches still > > using stripspace(). > >

Re: [PATCH 1/3] strbuf: make stripspace() part of strbuf

2015-10-16 Thread Tobias Klauser
Thanks for the review. On 2015-10-15 at 19:36:17 +0200, Junio C Hamano wrote: > Tobias Klauser writes: > > > Rename stripspace() to strbuf_stripspace() and move it to the strbuf > > module as suggested in [1]. > > > > Also switch all current users of stripsp

[PATCH 0/3] stripspace: Implement and use --count-lines option

2015-10-15 Thread Tobias Klauser
... | wc -l with: git stripspace --count-lines ... Tobias Klauser (3): strbuf: make stripspace() part of strbuf stripspace: Implement --count-lines option git rebase -i: Use newly added --count-lines option for stripspace Documentation/git-stripspace.txt | 13 - builtin/am.c

[PATCH 1/3] strbuf: make stripspace() part of strbuf

2015-10-15 Thread Tobias Klauser
/index.php/SmallProjectsIdeas#make_.27stripspace.28.29.27_part_of_strbuf Signed-off-by: Tobias Klauser --- builtin/am.c | 2 +- builtin/branch.c | 2 +- builtin/commit.c | 6 ++--- builtin/merge.c | 2 +- builtin/notes.c | 6 ++--- builtin/stripspace.c | 69

[PATCH 2/3] stripspace: Implement --count-lines option

2015-10-15 Thread Tobias Klauser
unt-lines < infile This will also make it easier to port git-rebase--interactive.sh to C later on. Furthermore, add the corresponding documentation and tests. [1] https://git.wiki.kernel.org/index.php/SmallProjectsIdeas#implement_.27--count-lines.27_in_.27git_stripspace.27 Signed-off-by:

[PATCH 3/3] git rebase -i: Use newly added --count-lines option for stripspace

2015-10-15 Thread Tobias Klauser
Use the newly added --count-lines option for 'git stripspace' to count lines instead of piping the entire output to 'wc -l'. Signed-off-by: Tobias Klauser --- git-rebase--interactive.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-rebase--

Re: [PATCH] pretend_sha1_file(): Change return type from int to void

2015-10-08 Thread Tobias Klauser
On 2015-10-07 at 23:22:59 +0200, Junio C Hamano wrote: > Johannes Schindelin writes: > > > As to the patch, I cannot speak for Junio, of course, but my > > preference would be to keep the return type. Traditionally, functions > > that can fail either die() or return an int; non-zero indicates an

[PATCH] Documentation/interpret-trailers: Grammar fix

2015-10-07 Thread Tobias Klauser
Signed-off-by: Tobias Klauser --- Documentation/git-interpret-trailers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-interpret-trailers.txt b/Documentation/git-interpret-trailers.txt index d6d9231..0ecd497 100644 --- a/Documentation/git-interpret

Re: [PATCH] pretend_sha1_file(): Change return type from int to void

2015-10-07 Thread Tobias Klauser
Hi Johannes On 2015-10-06 at 16:30:36 +0200, Johannes Schindelin wrote: > On 2015-10-06 15:51, Tobias Klauser wrote: > > > On 2015-10-06 at 15:16:12 +0200, Johannes Schindelin > > wrote: > >> > >> On 2015-10-06 14:15, Tobias Klauser wrote: > >> &

Re: [PATCH] pretend_sha1_file(): Change return type from int to void

2015-10-06 Thread Tobias Klauser
Hi Johannes Thanks for your feedback. On 2015-10-06 at 15:16:12 +0200, Johannes Schindelin wrote: > Hi Tobias, > > On 2015-10-06 14:15, Tobias Klauser wrote: > > prented_sha1_file() always returns 0 and its only callsite in > > builtin/blame.c doesn't use the r

[PATCH] pretend_sha1_file(): Change return type from int to void

2015-10-06 Thread Tobias Klauser
prented_sha1_file() always returns 0 and its only callsite in builtin/blame.c doesn't use the return value, so change the return type to void. Signed-off-by: Tobias Klauser --- cache.h | 2 +- sha1_file.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cach

[PATCH] connect: Fix typo in result string of prot_name()

2015-09-24 Thread Tobias Klauser
Replace 'unkown' with 'unknown'. Signed-off-by: Tobias Klauser --- connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connect.c b/connect.c index c0144d8..777f31c 100644 --- a/connect.c +++ b/connect.c @@ -254,7 +254,7 @@ static const char *pro