Re: [PATCH] Introduce a hook to run after formatting patches

2014-11-20 Thread Christian Couder
On Fri, Nov 21, 2014 at 12:33 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> So I have read the man page on the trailers and it seems like the solution >> to my problem in removing parts from the commit message. >> However I did not find out, if it can be run automatically, whenever >> ca

[PATCH 3/3] mergetool: simplify conditionals

2014-11-20 Thread David Aguilar
Combine the $last_status checks into a single conditional. Replace $last_status and $rollup_status with a single variable. Signed-off-by: David Aguilar --- git-mergetool.sh | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/git-mergetool.sh b/git-mergetool.sh i

[PATCH 2/3] difftool--helper: add explicit exit statement

2014-11-20 Thread David Aguilar
git-difftool--helper returns a zero exit status unless --trust-exit-code is in effect. Add an explicit exit statement to make this clearer. Signed-off-by: David Aguilar --- git-difftool--helper.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-difftool--helper.sh b/git-difftool--help

[PATCH 1/3] mergetool--lib: remove use of $status global

2014-11-20 Thread David Aguilar
Remove return statements and rework check_unchanged() so that the exit status from the last evaluated expression bubbles up to the callers. Signed-off-by: David Aguilar --- git-mergetool--lib.sh | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/git-mergeto

[PATCH 0/3] mergetool/difftool cleanup

2014-11-20 Thread David Aguilar
This is a cleanup series to remove the use of the $status global variable in mergetool/difftool. This should wait until after the current RC series is over but figured I'd send it out. David Aguilar (3): mergetool--lib: remove use of $status global difftool--helper: add explicit exit statemen

[PATCH] refs.c: move reflog updates into its own function

2014-11-20 Thread Stefan Beller
From: Ronnie Sahlberg write_ref_sha1 tries to update the reflog while updating the ref. Move these reflog changes out into its own function so that we can do the same thing if we write a sha1 ref differently, for example by writing a ref to the packed refs file instead. No functional changes int

[RFC 1/4] Fix i18n -o option in msvc engine.pl

2014-11-20 Thread Philip Oakley
The i18n 5e9637c6 introduced an extra '-o' option into the make file, which broke engine.pl code for extracting the git.sln for msvc gui-IDE. add tests for 'msgfmt' and its precursor 'mkdir' (in same vein as 74cf9bdda6). Signed-off-by: Philip Oakley --- contrib/buildsyste

[RFC 3/4] engine.pl: split the .o and .obj processing

2014-11-20 Thread Philip Oakley
Commit 4b623d80f7352 added an .obj file (invalidcontinue.obj) which was not processed correctly. The generate engine then mistakenly did a s/.o/.c/ to create a request to compile invalidcontinue.cbj. Split the '/\.(o|obj)$' in engine.pl#L353 into: } elsif ($part =~ /\.o$/) { # was '/\.(

[RFC 4/4] Improve layout and reference msvc-build script

2014-11-20 Thread Philip Oakley
Layout the 'either/or' with more white space to clarify which alternatives are matched up. Reference the build script which automates one sequence of options. Signed-off-by: Philip Oakley --- compat/vcbuild/README | 29 + 1 file changed, 21 insertions(+), 8 deletions

[RFC 0/4] Fix the Visual Studio 2008 .sln generator

2014-11-20 Thread Philip Oakley
Potential Windows developers are likely to be using Visual Studio as their IDE. The tool stack required for Windows can be tortuous as it crosses the boundaries between platforms and philosophies. This RFC seeks to maintain the tools that could assist such developers. In particular, those tools tha

[RFC 2/4] Properly accept quoted space in filenames

2014-11-20 Thread Philip Oakley
the engine.pl script barfs on the properly quoted space in filename options prevalent on Windows. Use quotewords() rather than split() to separate such options. Signed-off-by: Philip Oakley --- contrib/buildsystems/engine.pl | 11 --- 1 file changed, 8 insertions(+), 3 de

Re: [PATCH] Introduce a hook to run after formatting patches

2014-11-20 Thread Junio C Hamano
Stefan Beller writes: > So I have read the man page on the trailers and it seems like the solution > to my problem in removing parts from the commit message. > However I did not find out, if it can be run automatically, whenever > calling format-patch > > Maybe all that is missing here is an opti

Re: [PATCH] Introduce a hook to run after formatting patches

2014-11-20 Thread Stefan Beller
On Tue, Nov 18, 2014 at 07:40:07AM +0100, Christian Couder wrote: > On Mon, Nov 17, 2014 at 8:20 PM, Junio C Hamano wrote: > > Junio C Hamano writes: > > > >> (I am not saying that there should be an easy way to drop cruft left > >> by third-party systems such as "Change-id:" line) ... > > > > He

Re: [L10N] please review a batch l10n update for Git 2.2.0 final

2014-11-20 Thread Junio C Hamano
Jiang Xin writes: > 2014-11-20 16:04 GMT+08:00 Jiang Xin : >> 2014-11-20 14:31 GMT+08:00 Ralf Thielow : NOTE for Ralf: After I updated de.po, there are 3 fuzzies instead of one. I can only fix one of them. >>> >>> I just send a pull-request to you. It seems I have forgotten o

Re: [PATCH RFC] t0027: check the eol conversion warnings

2014-11-20 Thread Junio C Hamano
Torsten Bögershausen writes: > Add tests to check the warnings when adding file with eol=lf and eol=crlf. > > Add a function check_warning() to check the warnings on stderr > "CRLF will be replaced..." or "LF will be replaced..." > > Signed-off-by: Torsten Bögershausen > --- At a glance it is v

Re: [PATCH v4] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Junio C Hamano
Jonathan Nieder writes: > Stefan Beller wrote: > >> Signed-off-by: Ronnie Sahlberg >> Signed-off-by: Stefan Beller >> --- > [...] >> refs.c | 48 ++-- >> 1 file changed, 30 insertions(+), 18 deletions(-) > > The --patience diff makes review of this v

Re: [PATCH v3] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Junio C Hamano
Jonathan Nieder writes: > In this case, it is about readability. It's perhaps irrational, but I > find text much more readable and the intent to be clearer when > paragraphs are wrapped to a consistent width instead of lines breaking > at arbitrary points. Yeah I agree with that. Also a blank

Re: [PATCH v4] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Jonathan Nieder
Stefan Beller wrote: > Signed-off-by: Ronnie Sahlberg > Signed-off-by: Stefan Beller > --- [...] > refs.c | 48 ++-- > 1 file changed, 30 insertions(+), 18 deletions(-) The --patience diff makes review of this version very simple. Reviewed-by: Jonat

Re: [PATCH v3] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Jonathan Nieder
Stefan Beller wrote: > From 4bec12b878ca02a1e80af3c265e7e7ab52ba17ce Mon Sep 17 00:00:00 2001 The above line causes "git am" to be unable to parse the message downloaded as an mbox, if I remember correctly. [...] > * break lines of commit message again to appease the taste of Jonathan ;) I hop

[PATCH v4] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Stefan Beller
From: Ronnie Sahlberg Move code to create the string for a ref and write it to a file descriptor from log_ref_write and add it into a new dedicated function log_ref_write_fd. For now the new function is only used from log_ref_write, but later on we will call this function from reflog transaction

Re: [PATCH v3] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Stefan Beller
>From 4bec12b878ca02a1e80af3c265e7e7ab52ba17ce Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Thu, 20 Nov 2014 13:48:14 -0800 Subject: [PATCH v4] refs.c: add a function to append a reflog entry to a fd Move code to create the string for a ref and write it to a file descriptor from log_ref_w

Re: [PATCH v3] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Junio C Hamano
Stefan Beller writes: > From: Ronnie Sahlberg > > Move code to create the string for a ref and write it to a file descriptor > from log_ref_write and add it into a new dedicated function > log_ref_write_fd. > > For now the new function is only used from log_ref_write, but later > on we will call

Re: [PATCH v3] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Jonathan Nieder
Stefan Beller wrote: > On Thu, Nov 20, 2014 at 1:20 PM, Jonathan Nieder wrote: >> I don't understand why the above writes to a temporary variable and >> checks it, never to read that temporary again. >> >> I don't think that alone is a reason to block the patch, but it >> worries me in that the r

[PATCH RFC] t0027: check the eol conversion warnings

2014-11-20 Thread Torsten Bögershausen
Add tests to check the warnings when adding file with eol=lf and eol=crlf. Add a function check_warning() to check the warnings on stderr "CRLF will be replaced..." or "LF will be replaced..." Signed-off-by: Torsten Bögershausen --- t/t0027-auto-crlf.sh | 103 +++

Re: [PATCH v3] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Stefan Beller
On Thu, Nov 20, 2014 at 1:20 PM, Jonathan Nieder wrote: >> >> For now the new function is only used from log_ref_write, but later >> on we will call this function from reflog transactions too. That means >> that we will end up with only a single place, where we write a >> reflog entry to a file in

Re: [PATCH v3] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Jonathan Nieder
Stefan Beller wrote: > From: Ronnie Sahlberg > > Move code to create the string for a ref and write it to a file descriptor > from log_ref_write and add it into a new dedicated function > log_ref_write_fd. > > For now the new function is only used from log_ref_write, but later > on we will call t

Re: [PATCH v6] refs.c: use a string_list for repack_without_refs

2014-11-20 Thread Jonathan Nieder
Stefan Beller wrote: > Signed-off-by: Ronnie Sahlberg > Signed-off-by: Stefan Beller > Reviewed-by: Jonathan Nieder > --- Yep, looks good now. Thanks for bearing with me. [...] > +++ b/refs.h > @@ -163,8 +163,16 @@ extern void rollback_packed_refs(void); [...] > +/* > + * Remove the refs lis

Re: [PATCH 5/7] parse_color: support 24-bit RGB values

2014-11-20 Thread Junio C Hamano
Jeff King writes: > On Thu, Nov 20, 2014 at 11:44:26AM -0800, Junio C Hamano wrote: > >> > @@ -32,10 +32,13 @@ struct color { >> >COLOR_UNSPECIFIED = 0, >> >COLOR_NORMAL, >> >COLOR_ANSI, /* basic 0-7 ANSI colors */ >> > - COLOR_256 >> > + COLO

Re: [PATCH 5/7] parse_color: support 24-bit RGB values

2014-11-20 Thread Jeff King
On Thu, Nov 20, 2014 at 11:44:26AM -0800, Junio C Hamano wrote: > > @@ -32,10 +32,13 @@ struct color { > > COLOR_UNSPECIFIED = 0, > > COLOR_NORMAL, > > COLOR_ANSI, /* basic 0-7 ANSI colors */ > > - COLOR_256 > > + COLOR_256, > > + C

[PATCH v6] refs.c: use a string_list for repack_without_refs

2014-11-20 Thread Stefan Beller
From: Ronnie Sahlberg This patch doesn't intend any functional changes. It is just a refactoring, which replaces a char** array by a stringlist in the function repack_without_refs. This is easier to read and maintain as it delivers the same functionality with less lines of code and more lines of

Re: [PATCH 6/7] parse_color: recognize "no$foo" to clear the $foo attribute

2014-11-20 Thread Junio C Hamano
Jeff King writes: > You can turn on ANSI text attributes like "reverse" by > putting "reverse" in your color spec. However, you cannot > ask to turn reverse off. > > For common cases, this does not matter. You would turn on > "reverse" at the start of a colored section, and then clear > all attri

Re: [PATCH 5/7] parse_color: support 24-bit RGB values

2014-11-20 Thread Junio C Hamano
Jeff King writes: > Some terminals (like XTerm) allow full 24-bit RGB color > specifications using an extension to the regular ANSI color > scheme. Let's allow users to specify hex RGB colors, > enabling the all-important feature of hot pink ref > decorations: > > git log --format="%h%C(#ff69b4

Re: [PATCH 4/7] parse_color: refactor color storage

2014-11-20 Thread Junio C Hamano
Jeff King writes: > The result is also slightly less efficient to store, but > that's OK; we only store this intermediate state during the > parse, after which we write out the actual ANSI bytes. You need up to 24 bits for the value and then 2 bits for what type of color specification you have (

Re: [PATCH v5 1/1] refs.c: use a stringlist for repack_without_refs

2014-11-20 Thread Stefan Beller
On Thu, Nov 20, 2014 at 11:01 AM, Junio C Hamano wrote: > > I think this matches more-or-less what I've locally tweaked after > following the discussion between you and Jonathan. Thanks. Do you want me to resend the patch with Jonathans nits fixed? Jonathan wrote: >> Change-Id: Id7eaa821331f2ab

Re: [PATCH v5 1/1] refs.c: use a stringlist for repack_without_refs

2014-11-20 Thread Junio C Hamano
Stefan Beller writes: > Junio, I'll address your proposed changes in a different patch. > If err is passed in as NULL, we'll just skip all the error string > formatting and return silent and fast. Huh, I lost track, but I never meant to say "the functions should return silently with error c

Re: [PATCH 3/7] t4026: test "normal" color

2014-11-20 Thread Jeff King
On Thu, Nov 20, 2014 at 10:53:56AM -0800, Junio C Hamano wrote: > Jeff King writes: > > > If the user specifiers "normal" for a foreground color, this Argh, s/specifiers/specifies/ > > We also check that color "-1" does the same thing. This is > > not documented, but has worked forever, so let

Re: [PATCH] refs.c: repack_without_refs may be called without error string buffer

2014-11-20 Thread Stefan Beller
ok, will drop the patch due to bad design. On Thu, Nov 20, 2014 at 10:36 AM, Ronnie Sahlberg wrote: > On Thu, Nov 20, 2014 at 10:35 AM, Jonathan Nieder wrote: >> Stefan Beller wrote: >> >>> If we don't pass in the error string buffer, we skip over all >>> parts dealing with preparing error messa

Re: [PATCH 3/7] t4026: test "normal" color

2014-11-20 Thread Junio C Hamano
Jeff King writes: > If the user specifiers "normal" for a foreground color, this > should be a noop (while this may sound useless, it is the > only way to specify an unchanged foreground color followed > by a specific background color). > > We also check that color "-1" does the same thing. This

Re: [PATCH v5 1/1] refs.c: use a stringlist for repack_without_refs

2014-11-20 Thread Jonathan Nieder
On Thu, Nov 20, 2014 at 10:04:26AM -0800, Stefan Beller wrote: > [Subject: refs.c: use a stringlist for repack_without_refs] One more nitpick. :) s/stringlist/string_list/ Thanks, Jonathan -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vg

[PATCH v3] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Stefan Beller
From: Ronnie Sahlberg Move code to create the string for a ref and write it to a file descriptor from log_ref_write and add it into a new dedicated function log_ref_write_fd. For now the new function is only used from log_ref_write, but later on we will call this function from reflog transaction

Re: [PATCH] refs.c: repack_without_refs may be called without error string buffer

2014-11-20 Thread Ronnie Sahlberg
On Thu, Nov 20, 2014 at 10:35 AM, Jonathan Nieder wrote: > Stefan Beller wrote: > >> If we don't pass in the error string buffer, we skip over all >> parts dealing with preparing error messages. > > Please no. > > We tried this with the ref transaction code. When someone wants > to silence the me

Re: [PATCH] refs.c: repack_without_refs may be called without error string buffer

2014-11-20 Thread Jonathan Nieder
Stefan Beller wrote: > If we don't pass in the error string buffer, we skip over all > parts dealing with preparing error messages. Please no. We tried this with the ref transaction code. When someone wants to silence the message, it is cheap enough to do struct strbuf ignore = STRBUF_

Re: [PATCH v5 1/1] refs.c: use a stringlist for repack_without_refs

2014-11-20 Thread Jonathan Nieder
Stefan Beller wrote: > Change-Id: Id7eaa821331f2ab89df063e1e76c8485dbcc3aed Change-id snuck in. [...] > --- a/refs.h > +++ b/refs.h > @@ -163,8 +163,16 @@ extern void rollback_packed_refs(void); > */ > int pack_refs(unsigned int flags); > > -extern int repack_without_refs(const char **refna

Re: [RFD/PATCH] add: ignore only ignored files

2014-11-20 Thread Jeff King
On Thu, Nov 20, 2014 at 09:23:21AM -0800, Junio C Hamano wrote: > > diff --git a/builtin/add.c b/builtin/add.c > > index ae6d3e2..1074e32 100644 > > --- a/builtin/add.c > > +++ b/builtin/add.c > > @@ -284,7 +284,7 @@ static int add_files(struct dir_struct *dir, int flags) > > for (i =

Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-20 Thread Jeff King
On Thu, Nov 20, 2014 at 10:03:15AM -0800, Jonathan Nieder wrote: > Jeff King wrote: > > On Wed, Nov 19, 2014 at 01:40:23PM -0800, Stefan Beller wrote: > > >> - if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) { > >> - strbuf_addf(err, "refusing to create ref with bad name %s",

Re: [PATCH v3 00/14] ref-transactions-reflog

2014-11-20 Thread Jonathan Nieder
Michael Haggerty wrote: > On 11/20/2014 12:22 AM, Stefan Beller wrote: >> 3. Delete the reflog when the corresponding reference is deleted [1]. >> >> also as one transaction? > > It would be a side-effect of committing a transaction that contains a > reference deletion. The deletion of the reflog

Re: [PATCH] refs.c: repack_without_refs may be called without error string buffer

2014-11-20 Thread Ronnie Sahlberg
On Thu, Nov 20, 2014 at 10:10 AM, Stefan Beller wrote: > If we don't pass in the error string buffer, we skip over all > parts dealing with preparing error messages. > > Signed-off-by: Stefan Beller > --- > > This goes ontop of [PATCH v5] refs.c: use a stringlist for repack_without_refs > if that

[PATCH] refs.c: repack_without_refs may be called without error string buffer

2014-11-20 Thread Stefan Beller
If we don't pass in the error string buffer, we skip over all parts dealing with preparing error messages. Signed-off-by: Stefan Beller --- This goes ontop of [PATCH v5] refs.c: use a stringlist for repack_without_refs if that makes sense. refs.c | 8 refs.h | 1 - 2 files changed, 4

[PATCH v5 1/1] refs.c: use a stringlist for repack_without_refs

2014-11-20 Thread Stefan Beller
From: Ronnie Sahlberg This patch doesn't intend any functional changes. It is just a refactoring, which replaces a char** array by a stringlist in the function repack_without_refs. This is easier to read and maintain as it delivers the same functionality with less lines of code and more lines of

Re: [PATCH v2 2/2] refs.c: make ref_transaction_delete a wrapper for ref_transaction_update

2014-11-20 Thread Junio C Hamano
Thanks; I think these match what I locally amended just now ;-) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-20 Thread Jonathan Nieder
Jeff King wrote: > On Wed, Nov 19, 2014 at 01:40:23PM -0800, Stefan Beller wrote: >> -if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) { >> -strbuf_addf(err, "refusing to create ref with bad name %s", >> -refname); >> -return -1; >> -

Re: [PATCH v2] Improve the filemode trustability check

2014-11-20 Thread Junio C Hamano
Torsten Bögershausen writes: > Some file systems do not support the executable bit: > a) The user executable bit is always 0, e.g. VFAT mounted with -onoexec > b) The user executable bit is always 1, e.g. cifs mounted with > -ofile_mode=0755 > c) There are system where user executable bit is 1 e

[PATCH v2 2/2] refs.c: make ref_transaction_delete a wrapper for ref_transaction_update

2014-11-20 Thread Stefan Beller
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Stefan Beller Reviewed-by: Michael Haggerty Reviewed-by: Jonathan Nieder --- no changes in code, just removing Jonathans sign off, adding reviewed-by by Michael and Jonathan refs.c | 22 ++ refs.h | 2

[PATCH v2 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-20 Thread Stefan Beller
From: Ronnie Sahlberg The ref_transaction_update function can already be used to create refs by passing null_sha1 as the old_sha1 parameter. Simplify by replacing transaction_create with a thin wrapper. Signed-off-by: Ronnie Sahlberg Signed-off-by: Stefan Beller Reviewed-by: Michael Haggerty

Re: [PATCH v3 00/14] ref-transactions-reflog

2014-11-20 Thread Junio C Hamano
Jonathan Nieder writes: > I also have some thoughts about how those operations can be > implemented without such a performance hit (reading the whole > reflog into memory as part of the transaction seems problematic to > me), but that should probably wait for a separate message (and > I've talked

Re: [RFD/PATCH] add: ignore only ignored files

2014-11-20 Thread Junio C Hamano
Jeff King writes: > On Thu, Nov 20, 2014 at 10:42:16AM +0100, Michael J Gruber wrote: > >> >> Perhaps we could do a hybrid: add the files that were not ignored, but >> >> then still exit non-zero. Careful scripts need to check the exit status >> >> of "git add" anyway, and sloppy humans with over

Re: [PATCH] git-new-workdir: Don't fail if the target directory is empty

2014-11-20 Thread Junio C Hamano
Paul Smith writes: > Allow new workdirs to be created in an empty directory (similar to "git > clone"). Provide more error checking and clean up on failure. > > Signed-off-by: Paul Smith > --- > contrib/workdir/git-new-workdir | 54 > +++-- > 1 file changed

Re: [PATCH] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Junio C Hamano
Jonathan Nieder writes: >> Break out the code to create the string and writing it to the file >> descriptor from log_ref_write and add it into a dedicated function >> log_ref_write_fd. > > (grammar) I'm having trouble parsing the above. Yeah, I can see what it wants to say, but still... >> Let'

Re: [PATCH v4] refs.c: use a stringlist for repack_without_refs

2014-11-20 Thread Junio C Hamano
Jonathan Nieder writes: > [...] >> +++ b/builtin/remote.c > [...] >> @@ -1361,8 +1352,9 @@ static int prune_remote(const char *remote, int >> dry_run) >> abbrev_ref(refname, "refs/remotes/")); >> } >> >> -warn_dangling_symrefs(stdout, dangling_msg, &delete_

Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-20 Thread Jeff King
On Wed, Nov 19, 2014 at 01:40:23PM -0800, Stefan Beller wrote: > { > - struct ref_update *update; > - > - assert(err); > - > - if (transaction->state != REF_TRANSACTION_OPEN) > - die("BUG: create called for transaction that is not open"); > - > - if (!new_sha1 || is_nu

Re: [RFD/PATCH] add: ignore only ignored files

2014-11-20 Thread Jeff King
On Thu, Nov 20, 2014 at 10:42:16AM +0100, Michael J Gruber wrote: > >> Perhaps we could do a hybrid: add the files that were not ignored, but > >> then still exit non-zero. Careful scripts need to check the exit status > >> of "git add" anyway, and sloppy humans with over-broad wildcards > >> typi

[PATCH] git-new-workdir: Don't fail if the target directory is empty

2014-11-20 Thread Paul Smith
Allow new workdirs to be created in an empty directory (similar to "git clone"). Provide more error checking and clean up on failure. Signed-off-by: Paul Smith --- contrib/workdir/git-new-workdir | 54 +++-- 1 file changed, 36 insertions(+), 18 deletions(-)

Re: [PATCH] git-new-workdir: Don't fail if the target directory is empty

2014-11-20 Thread Paul Smith
On Wed, 2014-11-19 at 09:32 -0800, Junio C Hamano wrote: > Paul Smith writes: > I took a look at this again, and I do not agree with one design > decision it makes, namely: > > >> I split the creation of the directories from the symlinks: see the new > >> loop above. This allows us to avoid the

[PATCH 7/7] diff-highlight: allow configurable colors

2014-11-20 Thread Jeff King
Until now, the highlighting colors were hard-coded in the script (as "reverse" and "noreverse"), and you had to edit the script to change them. This patch teaches diff-highlight to read from color.diff-highlight.* to set them. In addition, it expands the possiblities considerably by adding two fea

[PATCH 6/7] parse_color: recognize "no$foo" to clear the $foo attribute

2014-11-20 Thread Jeff King
You can turn on ANSI text attributes like "reverse" by putting "reverse" in your color spec. However, you cannot ask to turn reverse off. For common cases, this does not matter. You would turn on "reverse" at the start of a colored section, and then clear all attributes with a "reset". However, yo

[PATCH 5/7] parse_color: support 24-bit RGB values

2014-11-20 Thread Jeff King
Some terminals (like XTerm) allow full 24-bit RGB color specifications using an extension to the regular ANSI color scheme. Let's allow users to specify hex RGB colors, enabling the all-important feature of hot pink ref decorations: git log --format="%h%C(#ff69b4)%d%C(reset) %s" Signed-off-by:

[PATCH 4/7] parse_color: refactor color storage

2014-11-20 Thread Jeff King
When we parse a color name like "red" into its ANSI color value, we pack the storage into a single int that may take on many values: 1. If it's "-2", no value has been specified. 2. If it's "-1", the value is "normal" (i.e., no color). 3. If it's 0 through 7, the value is a standard ANSI

[PATCH 3/7] t4026: test "normal" color

2014-11-20 Thread Jeff King
If the user specifiers "normal" for a foreground color, this should be a noop (while this may sound useless, it is the only way to specify an unchanged foreground color followed by a specific background color). We also check that color "-1" does the same thing. This is not documented, but has work

[PATCH 2/7] config: fix parsing of "git config --get-color some.key -1"

2014-11-20 Thread Jeff King
Most of git-config's command line options use OPT_BIT to choose an action, and then parse the non-option arguments in a context-dependent way. However, --get-color and --get-colorbool are unlike the rest of the options, in that they are OPT_STRING, taking the option name as a parameter. This gener

[PATCH 1/7] docs: describe ANSI 256-color mode

2014-11-20 Thread Jeff King
Our color specifications have supported the 256-color ANSI extension for years, but we never documented it. Signed-off-by: Jeff King --- I have no clue which terminals do and don't support this. I would hope the answer is "everything" by now, but I have seen some pretty awful terminal emulators i

[PATCH 0/7] color fixes and configurable diff-highlight

2014-11-20 Thread Jeff King
On Wed, Nov 12, 2014 at 09:59:35AM -0800, Scott Baker wrote: > It's 2014, most terminals are at least 256 colors. I'm fine if the > defaults are 16 colors (that's safest), but it would be really cool if > we could have an option for: > > line add color > line remove color > word add color > word

[PATCH v2] Improve the filemode trustability check

2014-11-20 Thread Torsten Bögershausen
Some file systems do not support the executable bit: a) The user executable bit is always 0, e.g. VFAT mounted with -onoexec b) The user executable bit is always 1, e.g. cifs mounted with -ofile_mode=0755 c) There are system where user executable bit is 1 even if it should be 0 like b), but the

Re: [PATCH 0/2] Breaking the ref-transactions-reflog series in smaller parts

2014-11-20 Thread Michael Haggerty
On 11/19/2014 10:40 PM, Stefan Beller wrote: > so I think the patch series ref-transactions-reflog[1] sent previously to the > list > is still too large for easy review and I want to break it up more. > So in this series we'll digest only 2 small patches, which do not seem to be > controversial (

Re: [PATCH v3 00/14] ref-transactions-reflog

2014-11-20 Thread Michael Haggerty
On 11/20/2014 12:22 AM, Stefan Beller wrote: > Sorry for the long delay. > Thanks for the explanation and discussion. > > So do I understand it right, that you are not opposing > the introduction of "everything should go through transactions" > but rather the detail and abstraction level of the AP

Re: [RFD/PATCH] add: ignore only ignored files

2014-11-20 Thread Michael J Gruber
Junio C Hamano schrieb am 19.11.2014 um 22:43: > Jeff King writes: > >> Typically I keep a very neat .gitignore file and just use "git add .", >> which _does_ ignore those files. The real problem here is that git >> cannot tell the difference between "the user explicitly asked for >> foo.aux, so

Re: [L10N] please review a batch l10n update for Git 2.2.0 final

2014-11-20 Thread Jiang Xin
2014-11-20 16:04 GMT+08:00 Jiang Xin : > 2014-11-20 14:31 GMT+08:00 Ralf Thielow : >>> >>> NOTE for Ralf: After I updated de.po, there are 3 fuzzies instead of one. >>> I can only fix one of them. >>> >> >> I just send a pull-request to you. It seems I have forgotten one git.pot >> update. > > Me

Re: [L10N] please review a batch l10n update for Git 2.2.0 final

2014-11-20 Thread Jiang Xin
2014-11-20 14:31 GMT+08:00 Ralf Thielow : >> >> NOTE for Ralf: After I updated de.po, there are 3 fuzzies instead of one. >> I can only fix one of them. >> > > I just send a pull-request to you. It seems I have forgotten one git.pot > update. Merged. I also see a nice workaround in your commit.