Re: [BUG] Incosistent repository state when trying to rename HEAD in the middle of a rebase

2017-11-01 Thread Kaartic Sivaraam
I was able to spare some time to dig into this and found a few things. First, it seems that the issue is more generic and the BUG kicks in whenever HEAD is not a symbolic ref. I noticed that because when HEAD is a symbolic ref there was a change in the error message shown by git. In (2.11.0) I

Re: [PATCH 1/2] wrapper.c: consistently quote filenames in error messages

2017-11-01 Thread Junio C Hamano
Junio C Hamano writes: > Simon Ruderich writes: > >> All other error messages in the file use quotes around the file name. >> >> This change removes two translations as "could not write to '%s'" and >> "could not close '%s'" are already translated and

Re: [PATCH 1/3] bisect: fix memory leak and document `find_bisection()`

2017-11-01 Thread Junio C Hamano
Martin Ågren writes: > `find_bisection()` rebuilds the commit list it is given by reversing it > and skipping uninteresting commits. The uninteresting list entries are > leaked. Free them to fix the leak. > > While we're here and understand what's going on, document the

Re: [PATCH 1/2] wrapper.c: consistently quote filenames in error messages

2017-11-01 Thread Junio C Hamano
Simon Ruderich writes: > All other error messages in the file use quotes around the file name. > > This change removes two translations as "could not write to '%s'" and > "could not close '%s'" are already translated and these two are the only > occurrences without quotes. >

Re: [PATCH 6/7] builtin/describe.c: describe a blob

2017-11-01 Thread Junio C Hamano
Junio C Hamano writes: > The reason why we say "-ish" is "Yes we know v2.15.0 is *NOT* a > commit object, we very well know it is a tag object, but because we > allow it to be used in a context that calls for a commit object, we > mark that use context as 'this accepts

Re: [PATCH] reduce_heads: fix memory leaks

2017-11-01 Thread Junio C Hamano
Martin Ågren writes: > diff --git a/builtin/merge-base.c b/builtin/merge-base.c > index 6dbd167d3..b1b7590c4 100644 > --- a/builtin/merge-base.c > +++ b/builtin/merge-base.c > @@ -59,6 +59,8 @@ static int handle_independent(int count, const char **args) >

Re: [PATCH] imap-send: handle NULL return of next_arg()

2017-11-01 Thread Junio C Hamano
René Scharfe writes: > @@ -807,6 +816,8 @@ static int get_cmd_result(struct imap_store *ctx, struct > imap_cmd *tcmd) > if (cmdp->cb.cont || cmdp->cb.data) > imap->literal_pending = 0; > arg = next_arg(); >

Re: [PATCH 6/7] builtin/describe.c: describe a blob

2017-11-01 Thread Junio C Hamano
Stefan Beller writes: > But now we have a path as well, the notation of > COLON > is not a unique description of the blob, because > * there can be multiple s depending on the tags and walking > * in boilerplate code cases, we might even have the blob at different >

Re: [PATCH 7/7] t6120: fix typo in test name

2017-11-01 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Beller writes: > >> Signed-off-by: Stefan Beller >> --- >> t/t6120-describe.sh | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > Good. I am guessing that you are sending this as the

Re: [PATCH 3/3] mingw: document the experimental standard handle redirection

2017-11-01 Thread Junio C Hamano
Johannes Schindelin writes: >> > I feel this is the wrong way round. `>/dev/null` may sound very intuitive >> > to you, but this feature is Windows only. Guess three times how intuitive >> > it sounds to Windows developers to write `>/dev/null` if you want to >> >

Re: [PATCH 4/7] remote-mediawiki: skip virtual namespaces

2017-11-01 Thread Junio C Hamano
Antoine Beaupré writes: > It might still worth fixing this, but I'm not sure what the process is > here - in the latest "what's cooking" Junio said this patchset would be > merged in "next". Should I reroll the patchset to fix this or not? The process is for you (the

Re: [PATCHv2 2/7] revision.h: introduce blob/tree walking in order of the commits

2017-11-01 Thread Junio C Hamano
Johannes Schindelin writes: >> > Given that the test_expect_* functions evaluate the code, it makes me >> > wonder whether those `return` statements really return appropriately, or >> > one call level too low. >> >> The test_expect functions eval the actual snippets

Re: What's cooking in git.git (Oct 2017, #07; Mon, 30)

2017-11-01 Thread Junio C Hamano
Jonathan Tan writes: > Junio, would you prefer that the combined effort be in one single patch > series or separated out into 3? The way I see it, there are two > independent patch series - this one (object filter support in rev-list > and pack-objects) and my one (repo

Re: [PATCH] config: document blame configuration

2017-11-01 Thread SZEDER Gábor
> The options are currently only referenced by the git-blame man page, > also explain them in git-config, which is the canonical page to > contain all config options. Good idea. > Signed-off-by: Stefan Beller > --- > Documentation/config.txt | 17 + > 1 file

Re: [PATCHv2 6/7] builtin/describe.c: describe a blob

2017-11-01 Thread Stefan Beller
On Wed, Nov 1, 2017 at 3:41 PM, Johannes Schindelin wrote: >> The current implementation gives C, though. >> (assuming C is HEAD, and A is ancient) >> >> With the --reverse flag one of B or D is given (not sure which, >> depends on the exact order). > > Sure, but it

Part Time Job

2017-11-01 Thread Li Jie
Be our agent in your region. Reply for more details.

Re: [PATCHv2 2/7] revision.h: introduce blob/tree walking in order of the commits

2017-11-01 Thread Stefan Beller
On Wed, Nov 1, 2017 at 3:39 PM, Johannes Schindelin wrote: >> not ok 1 - witty title >> >> That is all we want to care about here? > > We care about the loop body being executed successfully *each time*. A > better counter example: Good point. I'll use return in that

Re: [PATCHv2 6/7] builtin/describe.c: describe a blob

2017-11-01 Thread Johannes Schindelin
Hi Stefan, On Wed, 1 Nov 2017, Stefan Beller wrote: > >> I know id prefer the first commit that introduced the blob. That's > >> what describing a commit does, it finds the oldest tag prior to the > >> commit, while --contains finds the first tag that contains the commit > >> as an ancestor. > >

Re: [PATCHv2 2/7] revision.h: introduce blob/tree walking in order of the commits

2017-11-01 Thread Johannes Schindelin
Hi Stefan, On Wed, 1 Nov 2017, Stefan Beller wrote: > We do not care about the internal state, aborting early, we rather > care only if the whole loop body was executed. Running the test > > test_expect_success 'witty title' ' > for a in 1 2 3; do echo $a && false; done && echo done

Re: [PATCHv2 2/7] revision.h: introduce blob/tree walking in order of the commits

2017-11-01 Thread Johannes Schindelin
Hi, On Wed, 1 Nov 2017, Jeff King wrote: > On Wed, Nov 01, 2017 at 10:36:02PM +0100, Johannes Schindelin wrote: > > > On Wed, 1 Nov 2017, Junio C Hamano wrote: > > > > > On Wed, Nov 1, 2017 at 9:26 PM, Johannes Schindelin > > > wrote: > > > > > > > > ... >

[PATCH] config: document blame configuration

2017-11-01 Thread Stefan Beller
The options are currently only referenced by the git-blame man page, also explain them in git-config, which is the canonical page to contain all config options. Signed-off-by: Stefan Beller --- Documentation/config.txt | 17 + 1 file changed, 17 insertions(+)

Re: On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm]

2017-11-01 Thread Stefan Beller
On Wed, Nov 1, 2017 at 9:42 AM, Stefan Beller wrote: >> So it may make more sense just to cross-reference those merges with the >> topics that spawned them on the mailing list. I.e., instead of copying >> the cover letter contents, just record the message-id (and update it >>

Re: [PATCHv2 6/7] builtin/describe.c: describe a blob

2017-11-01 Thread Stefan Beller
>> I know id prefer the first commit that introduced the blob. That's what >> describing a commit does, it finds the oldest tag prior to the commit, >> while --contains finds the first tag that contains the commit as an >> ancestor. > > It is very easy to wish for "the oldest commit introducing a

Re: [PATCHv2 2/7] revision.h: introduce blob/tree walking in order of the commits

2017-11-01 Thread Stefan Beller
>> I think I'll go without the extra subshell and with s/return 1/false/ as >> the exact value doesn't matter. > > You mean > > for ... > do > xyz || > false > done Yes, I do. > ? That does not work. Try this: > > for a in 1 2 3; do

Re: What's cooking in git.git (Nov 2017, #01; Wed, 1)

2017-11-01 Thread Johannes Schindelin
Hi Junio, On Wed, 1 Nov 2017, Junio C Hamano wrote: > * jk/rebase-i-exec-gitdir-fix (2017-11-01) 1 commit > - sequencer: pass absolute GIT_DIR to exec commands > > A recent regression in "git rebase -i" that broke execution of git > commands from subdirectories via "exec" insn has been

Re: [PATCH 1/2] sequencer: factor out rewrite_file()

2017-11-01 Thread Jeff King
On Wed, Nov 01, 2017 at 10:46:14PM +0100, Johannes Schindelin wrote: > > - it calls die() rather than returning an error. Looking at the > > callsites, I'm inclined to say that would be fine. Failing to write > > to the todo file is essentially a fatal error for sequencer code. > > I

Re: [PATCH 2/3] http-push: use hex_to_bytes()

2017-11-01 Thread Jeff King
On Wed, Nov 01, 2017 at 10:59:49PM +0100, René Scharfe wrote: > > The hex_to_bytes() function requires that the caller make sure they have > > the right number of bytes. But for many callers, I think they'd want to > > say "parse this oid, which might be truncated; I can't tell what the > >

Re: [PATCHv2 6/7] builtin/describe.c: describe a blob

2017-11-01 Thread Johannes Schindelin
Hi, On Wed, 1 Nov 2017, Jacob Keller wrote: > On November 1, 2017 10:59:08 AM PDT, Stefan Beller wrote: > >>> Does the code describe a9dbc3f12c as v2.15.0:GIT-VERSION-GEN, or > >>> would it always be :? > >> > >> As the blob is described using this function: > >> > >> static

( Compensation Reinbursement )

2017-11-01 Thread United Nations
View the enclosed file for your Compensation Reinbursement Code Payment.pdf Description: Adobe PDF document

Re: [PATCHv2 2/7] revision.h: introduce blob/tree walking in order of the commits

2017-11-01 Thread Johannes Schindelin
Hi Stefan, On Wed, 1 Nov 2017, Stefan Beller wrote: > On Wed, Nov 1, 2017 at 5:37 AM, Junio C Hamano wrote: > > On Wed, Nov 1, 2017 at 9:26 PM, Johannes Schindelin > > wrote: > >> > >> ... > >> ( > >> for x in four

Re: [PATCH 2/3] http-push: use hex_to_bytes()

2017-11-01 Thread René Scharfe
Am 01.11.2017 um 20:55 schrieb Jeff King: > On Tue, Oct 31, 2017 at 02:49:56PM +0100, René Scharfe wrote: > >> The path of a loose object contains its hash value encoded into two >> substrings of hexadecimal digits, separated by a slash. The current >> code copies the pieces into a temporary

Re: Git 2.15.0 on OSX 10.12.6: gui multi-select stage

2017-11-01 Thread Johannes Schindelin
Hi Matthew, On Wed, 1 Nov 2017, Matthew Orres wrote: > Using 2.15.0 on OSX 10.12.6, when I open git gui, and then attempt to > stage multiple files as such: > > * Left click first file > * CMD+Shift+Click last file to multi-select all files > * CMT+T (shortcut for Stage to Commit) > > Only the

Re: [PATCH 1/2] sequencer: factor out rewrite_file()

2017-11-01 Thread Johannes Schindelin
Hi Peff, On Wed, 1 Nov 2017, Jeff King wrote: > On Tue, Oct 31, 2017 at 10:54:21AM +0100, René Scharfe wrote: > > > Reduce code duplication by extracting a function for rewriting an > > existing file. > > These patches look like an improvement on their own, but I wonder if we > shouldn't just

Re: [PATCHv2 6/7] builtin/describe.c: describe a blob

2017-11-01 Thread Stefan Beller
On Tue, Oct 31, 2017 at 9:11 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> +If the given object refers to a blob, it will be described >> +as `:`, such that the blob can be found >> +at `` in the ``. Note, that the commit is likely > > Does the

Re: [PATCHv2 2/7] revision.h: introduce blob/tree walking in order of the commits

2017-11-01 Thread Jeff King
On Wed, Nov 01, 2017 at 10:36:02PM +0100, Johannes Schindelin wrote: > Hi Junio, > > On Wed, 1 Nov 2017, Junio C Hamano wrote: > > > On Wed, Nov 1, 2017 at 9:26 PM, Johannes Schindelin > > wrote: > > > > > > ... > > > ( > > > for x in

Re: [PATCHv2 2/7] revision.h: introduce blob/tree walking in order of the commits

2017-11-01 Thread Johannes Schindelin
Hi Junio, On Wed, 1 Nov 2017, Junio C Hamano wrote: > On Wed, Nov 1, 2017 at 9:26 PM, Johannes Schindelin > wrote: > > > > ... > > ( > > for x in four three > > do > > git rm $x && > >

Re: [PATCH] sequencer: pass absolute GIT_DIR to exec commands

2017-11-01 Thread Johannes Schindelin
Hi Jake, On Tue, 31 Oct 2017, Jacob Keller wrote: > From: Jacob Keller > > When we replaced the old shell script based interactive rebase in > commmit 18633e1a22a6 ("rebase -i: use the rebase--helper builtin", > 2017-02-09) we introduced a regression of functionality in

Re: [PATCH v2] grep: take the read-lock when adding a submodule

2017-11-01 Thread Jeff King
On Wed, Nov 01, 2017 at 09:45:06PM +0100, Martin Ågren wrote: > With --recurse-submodules, we add each submodule that we encounter to > the list of alternate object databases. With threading, our changes to > the list are not protected against races. Indeed, ThreadSanitizer > reports a race when

Re: [PATCHv2 6/7] builtin/describe.c: describe a blob

2017-11-01 Thread Jacob Keller
On November 1, 2017 10:59:08 AM PDT, Stefan Beller wrote: >>> Does the code describe a9dbc3f12c as v2.15.0:GIT-VERSION-GEN, or >>> would it always be :? >> >> As the blob is described using this function: >> >> static void process_object(struct object *obj, const char *path,

Re: [PATCH 6/7] builtin/describe.c: describe a blob

2017-11-01 Thread Stefan Beller
On Tue, Oct 31, 2017 at 8:34 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> Given the difficulty in >>> coming up with the single-liner description of what it does we saw >>> above, I suspect that splitting SYNOPSIS out into two very distinct >>>

Re: [PATCH v2] grep: take the read-lock when adding a submodule

2017-11-01 Thread Brandon Williams
On 11/01, Martin Ågren wrote: > With --recurse-submodules, we add each submodule that we encounter to > the list of alternate object databases. With threading, our changes to > the list are not protected against races. Indeed, ThreadSanitizer > reports a race when we call

[PATCH v2] grep: take the read-lock when adding a submodule

2017-11-01 Thread Martin Ågren
With --recurse-submodules, we add each submodule that we encounter to the list of alternate object databases. With threading, our changes to the list are not protected against races. Indeed, ThreadSanitizer reports a race when we call `add_to_alternates_memory()` around the same time that another

[PATCH 2/3] bisect: fix off-by-one error in `best_bisection_sorted()`

2017-11-01 Thread Martin Ågren
After we have sorted the `cnt`-many commits that we have selected, we place them into the commit list. We then set `p->next` to NULL, but as we do so, `p` is already pointing one beyond item number `cnt`. Indeed, we check whether `p` is NULL before dereferencing it. This only matters if there are

[PATCH 3/3] bisect: fix memory leak when returning best element

2017-11-01 Thread Martin Ågren
When `find_bisection()` returns a single list entry, it leaks the other entries. Move the to-be-returned item to the front and free the remainder. Signed-off-by: Martin Ågren --- bisect.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bisect.c

[PATCH 1/3] bisect: fix memory leak and document `find_bisection()`

2017-11-01 Thread Martin Ågren
`find_bisection()` rebuilds the commit list it is given by reversing it and skipping uninteresting commits. The uninteresting list entries are leaked. Free them to fix the leak. While we're here and understand what's going on, document the function. In particular, make sure to document that the

Re: [PATCH 7/7] remote-mediawiki: show progress while fetching namespaces

2017-11-01 Thread Eric Sunshine
On Sun, Oct 29, 2017 at 10:51 PM, Antoine Beaupré wrote: > Without this, the fetch process seems hanged while we fetch page > listings across the namespaces. Obviously, it should be possible to > silence this with -q, but that's an issue already present everywhere > in the

Re: [PATCH 6/7] remote-mediawiki: process namespaces in order

2017-11-01 Thread Eric Sunshine
On Sun, Oct 29, 2017 at 10:51 PM, Antoine Beaupré wrote: > Ideally, we'd process them in numeric order since that is more > logical, but we can't do that yet since this is where we find the > numeric identifiers in the first place. Lexicographic order is a good > compromise.

Re: [PATCH 3/3] sha1_file: use hex_to_bytes()

2017-11-01 Thread Jeff King
On Tue, Oct 31, 2017 at 02:50:06PM +0100, René Scharfe wrote: > The path of a loose object contains its hash value encoded into two > substrings of 2 and 38 hexadecimal digits separated by a slash. The > first part is handed to for_each_file_in_obj_subdir() in decoded form as > subdir_nr. The

Re: [PATCH 5/7] remote-mediawiki: support fetching from (Main) namespace

2017-11-01 Thread Eric Sunshine
On Sun, Oct 29, 2017 at 10:51 PM, Antoine Beaupré wrote: > When we specify a list of namespaces to fetch from, by default the MW > API will not fetch from the default namespace, refered to as "(Main)" > in the documentation: > >

Re: [PATCH 2/3] http-push: use hex_to_bytes()

2017-11-01 Thread Jeff King
On Tue, Oct 31, 2017 at 02:49:56PM +0100, René Scharfe wrote: > The path of a loose object contains its hash value encoded into two > substrings of hexadecimal digits, separated by a slash. The current > code copies the pieces into a temporary buffer to get rid of the slash > and then uses

Re: Colorize matches for git log --grep=pattern?

2017-11-01 Thread Sebastian Schuberth
On Wed, Nov 1, 2017 at 7:50 PM, Jeff King wrote: > The best workaround I could come up with is passing the output through a > highlighting script: > > git log --grep=foo --color | > perl -pe 's/foo/\x1b[1;31m$&\x1b[m/' | > less > > Pretty hacky. Thanks anyway. I was also

Re: [PATCHv2 6/7] builtin/describe.c: describe a blob

2017-11-01 Thread Stefan Beller
On Tue, Oct 31, 2017 at 2:49 PM, Eric Sunshine wrote: >> to make up a name for the commit. These names are ambivalent, there might > > I guess you meant s/ambivalent/ambiguous/ ? Indeed! ambivalent early 20th century: from ambivalence (from German Ambivalenz ),

Re: [PATCH 1/2] sequencer: factor out rewrite_file()

2017-11-01 Thread Jeff King
On Tue, Oct 31, 2017 at 10:54:21AM +0100, René Scharfe wrote: > Reduce code duplication by extracting a function for rewriting an > existing file. These patches look like an improvement on their own, but I wonder if we shouldn't just be using the existing write_file_buf() for this? Compared to

Re: [PATCHv2 2/7] revision.h: introduce blob/tree walking in order of the commits

2017-11-01 Thread Stefan Beller
On Wed, Nov 1, 2017 at 5:37 AM, Junio C Hamano wrote: > On Wed, Nov 1, 2017 at 9:26 PM, Johannes Schindelin > wrote: >> >> ... >> ( >> for x in four three >> do >> git rm $x &&

Re: Contribution licensing question(s)

2017-11-01 Thread Elijah Newren
Hi Peff, On Wed, Nov 1, 2017 at 11:38 AM, Jeff King wrote: > This was mostly done for the libgit2 project, which uses GPL with a > linking exception: > > https://github.com/libgit2/libgit2/blob/master/COPYING > > When that project started, they asked for dual-license permission

Git 2.15.0 on OSX 10.12.6: gui multi-select stage

2017-11-01 Thread Matthew Orres
Using 2.15.0 on OSX 10.12.6, when I open git gui, and then attempt to stage multiple files as such: * Left click first file * CMD+Shift+Click last file to multi-select all files * CMT+T (shortcut for Stage to Commit) Only the file I selected with the first Left Click is staged and my selection

Re: Colorize matches for git log --grep=pattern?

2017-11-01 Thread Jeff King
On Wed, Nov 01, 2017 at 11:57:14AM +0100, Sebastian Schuberth wrote: > is there a way to colorize / highlight the pattern matched by > > git log -E -i --grep=pattern > > in the console output? I don't think so. The grep code _does_ know about colorizing matches (which is why "git grep

Re: Contribution licensing question(s)

2017-11-01 Thread Jeff King
On Wed, Nov 01, 2017 at 08:50:00AM -0700, Elijah Newren wrote: > Background: git's README.md file points out that some parts of git are > under a license other than GPLv2 (while still GPLv2-compatible), > though it doesn't state which one(s) I think this note is mostly about code we've imported

Re: Contribution licensing question(s)

2017-11-01 Thread Stefan Beller
On Wed, Nov 1, 2017 at 8:50 AM, Elijah Newren wrote: > Hi, > > My employer has a new-ish open-source-contribution process, and is > curious about some licensing question(s) before I submit a few patch > series. cool. :) > Background: git's README.md file points out that some

Re: [PATCH 7/7] t6120: fix typo in test name

2017-11-01 Thread Stefan Beller
On Tue, Oct 31, 2017 at 6:21 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Signed-off-by: Stefan Beller >> --- >> t/t6120-describe.sh | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > Good. I am guessing that you

Re: [PATCH 1/2] quote-email populates the fields

2017-11-01 Thread Stefan Beller
On Wed, Nov 1, 2017 at 4:04 AM, Matthieu Moy wrote: > Junio C Hamano writes: > >> Payre Nathan writes: >> >>> From: Tom Russello >>> >>> --- >> >> Missing something here??? > > To clarify for

Re: [PATCHv2 6/7] builtin/describe.c: describe a blob

2017-11-01 Thread Stefan Beller
>> Does the code describe a9dbc3f12c as v2.15.0:GIT-VERSION-GEN, or >> would it always be :? > > As the blob is described using this function: > > static void process_object(struct object *obj, const char *path, void *data) > { >struct process_commit_data *pcd = data; > >if

Re: What's cooking in git.git (Oct 2017, #07; Mon, 30)

2017-11-01 Thread Jonathan Tan
On Wed, 01 Nov 2017 10:21:20 +0900 Junio C Hamano wrote: > Jeff Hostetler writes: > > >> Yes, that, together with the expectation that I will hear from both you > >> and JTan > >> once the result of combined effort becomes ready to replace

Re: [PATCH 0/3] mingw: introduce a way to avoid std handle inheritance

2017-11-01 Thread Stefan Beller
> It sounds a bit stupid to cater to myself in patches *I* submit, but I > refuse to believe that there are many people with more time on their hands > than myself (last time I tried to research this, it looked as everybody > has the same 86,400 seconds per day available, give or take the

Re: [PATCH v3 2/8] diff: convert flags to be stored in bitfields

2017-11-01 Thread Stefan Beller
On Tue, Oct 31, 2017 at 6:26 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> After some quick research our coding style on bit fields is twofold: >> Most older code is this way and more recent code seems to prefer >> >> unsigned SP : SP ; > >

[PATCH v2 3/3] mingw: document the standard handle redirection

2017-11-01 Thread Johannes Schindelin
This feature has been in Git for Windows since v2.11.0(2), as an experimental option. Now it is considered mature, and it is high time to document it properly. Signed-off-by: Johannes Schindelin --- Documentation/git.txt | 18 ++ 1 file changed, 18

[PATCH v2 1/3] mingw: add experimental feature to redirect standard handles

2017-11-01 Thread Johannes Schindelin
Particularly when calling Git from applications, such as Visual Studio's Team Explorer, it is important that stdin/stdout/stderr are closed properly. However, when spawning processes on Windows, those handles must be marked as inheritable if we want to use them, but that flag is a global flag and

[PATCH v2 0/3] mingw: introduce a way to avoid std handle inheritance

2017-11-01 Thread Johannes Schindelin
Particularly when calling Git from applications, such as Visual Studio, it is important that stdin/stdout/stderr are closed properly. However, when spawning processes on Windows, those handles must be marked as inheritable if we want to use them, but that flag is a global flag and may very well be

[PATCH v2 2/3] mingw: optionally redirect stderr/stdout via the same handle

2017-11-01 Thread Johannes Schindelin
The "2>&1" notation in Powershell and in Unix shells implies that stderr is redirected to the same handle into which stdout is already written. Let's use this special value to allow the same trick with GIT_REDIRECT_STDERR and GIT_REDIRECT_STDOUT: if the former's value is `2>&1`, then stderr will

Re: [PATCH 2/2] sequencer.c: check return value of close() in rewrite_file()

2017-11-01 Thread René Scharfe
Am 01.11.2017 um 15:45 schrieb Simon Ruderich: > Not checking close(2) can hide errors as not all errors are reported > during the write(2). > > Signed-off-by: Simon Ruderich > --- > > On Wed, Nov 01, 2017 at 02:00:11PM +0100, René Scharfe wrote: >> Most calls are not

Re: [PATCH 0/3] mingw: introduce a way to avoid std handle inheritance

2017-11-01 Thread Johannes Schindelin
Hi Jonahtan, On Tue, 31 Oct 2017, Jonathan Nieder wrote: > Johannes Schindelin wrote: > > On Mon, 30 Oct 2017, Jonathan Nieder wrote: > > >> Can this rationale go in the commit messages? > > > > I thought I had done exactly that in 1/3... > > Okay, I'll be more specific. This cover letter

[PATCH] imap-send: handle NULL return of next_arg()

2017-11-01 Thread René Scharfe
next_arg() returns NULL if it runs out of arguments. Most call sites already handle that gracefully. Check in the remaining cases as well. Replace the NULL pointer with an empty string at the bottom of get_cmd_result() -- it's nicely reported as an unexpected response a few lines down. Error

Re: [PATCH 4/7] remote-mediawiki: skip virtual namespaces

2017-11-01 Thread Antoine Beaupré
On 2017-11-01 09:52:09, Eric Sunshine wrote: > On Sun, Oct 29, 2017 at 10:51 PM, Antoine Beaupré wrote: >> Virtual namespaces do not correspond to pages in the database and are >> automatically generated by MediaWiki. It makes little sense, >> therefore, to fetch pages from

Re: On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm]

2017-11-01 Thread Stefan Beller
On Wed, Nov 1, 2017 at 12:14 AM, Jeff King wrote: > On Mon, Oct 30, 2017 at 11:29:37AM -0700, Stefan Beller wrote: > >> > I can live with fancily-formatted cover letters. BUT. I would say if >> > your cover letter is getting quite long, you might consider whether some >> > of its

Re: [PATCH 3/3] mingw: document the experimental standard handle redirection

2017-11-01 Thread Johannes Schindelin
Hi Junio, On Wed, 1 Nov 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> > +Two special values are supported: `off` will simply close the > >> > +corresponding standard handle, and if `GIT_REDIRECT_STDERR` is > >> > +`2>&1`, standard error will be

Git Open Source Weekend London 11th/12th November

2017-11-01 Thread Thomas Gummerer
Hi, Bloomberg is hosting an Open Source Weekend in London on the 11th & 12th November 2017 to contribute to the Git project. We have also confirmed that Peff will be amongst the mentors on hand to guide attendees through their efforts! Some of you may notice that we tried to organize this

Contribution licensing question(s)

2017-11-01 Thread Elijah Newren
Hi, My employer has a new-ish open-source-contribution process, and is curious about some licensing question(s) before I submit a few patch series. Background: git's README.md file points out that some parts of git are under a license other than GPLv2 (while still GPLv2-compatible), though it

Re: [PATCH 2/2] sequencer: use O_TRUNC to truncate files

2017-11-01 Thread Johannes Schindelin
Hi René, On Tue, 31 Oct 2017, René Scharfe wrote: > Cut off any previous content of the file to be rewritten by passing the > flag O_TRUNC to open(2) instead of calling ftruncate(2) at the end. > That's easier and shorter. Sure. Thanks, Dscho

Re: [PATCH 1/2] sequencer: factor out rewrite_file()

2017-11-01 Thread Johannes Schindelin
Hi René, On Tue, 31 Oct 2017, René Scharfe wrote: > Reduce code duplication by extracting a function for rewriting an > existing file. Fine by me. Thanks, Dscho

[PATCH 2/2] sequencer.c: check return value of close() in rewrite_file()

2017-11-01 Thread Simon Ruderich
Not checking close(2) can hide errors as not all errors are reported during the write(2). Signed-off-by: Simon Ruderich --- On Wed, Nov 01, 2017 at 02:00:11PM +0100, René Scharfe wrote: > Most calls are not checked, but that doesn't necessarily mean they need > to (or

[PATCH 1/2] wrapper.c: consistently quote filenames in error messages

2017-11-01 Thread Simon Ruderich
All other error messages in the file use quotes around the file name. This change removes two translations as "could not write to '%s'" and "could not close '%s'" are already translated and these two are the only occurrences without quotes. Signed-off-by: Simon Ruderich ---

Re: [PATCH 4/7] remote-mediawiki: skip virtual namespaces

2017-11-01 Thread Eric Sunshine
On Sun, Oct 29, 2017 at 10:51 PM, Antoine Beaupré wrote: > Virtual namespaces do not correspond to pages in the database and are > automatically generated by MediaWiki. It makes little sense, > therefore, to fetch pages from those namespaces and the MW API doesn't > support

Re: [PATCH 1/2] sequencer: factor out rewrite_file()

2017-11-01 Thread René Scharfe
Am 01.11.2017 um 12:10 schrieb Simon Ruderich: > On Tue, Oct 31, 2017 at 10:54:21AM +0100, René Scharfe wrote: >> +static int rewrite_file(const char *path, const char *buf, size_t len) >> +{ >> +int rc = 0; >> +int fd = open(path, O_WRONLY); >> +if (fd < 0) >> +return

Re: [PATCHv2 2/7] revision.h: introduce blob/tree walking in order of the commits

2017-11-01 Thread Junio C Hamano
On Wed, Nov 1, 2017 at 9:26 PM, Johannes Schindelin wrote: > > ... > ( > for x in four three > do > git rm $x && > git commit -m "remote $x" || >

Re: [PATCHv2 6/7] builtin/describe.c: describe a blob

2017-11-01 Thread Johannes Schindelin
Hi Junio, On Wed, 1 Nov 2017, Junio C Hamano wrote: > Stefan Beller writes: > > > +If the given object refers to a blob, it will be described > > +as `:`, such that the blob can be found > > +at `` in the ``. Note, that the commit is likely > > Does the code describe

Re: [PATCHv2 2/7] revision.h: introduce blob/tree walking in order of the commits

2017-11-01 Thread Johannes Schindelin
Hi, On Wed, 1 Nov 2017, Junio C Hamano wrote: > Stefan Beller writes: > > > diff --git a/t/t6100-rev-list-in-order.sh b/t/t6100-rev-list-in-order.sh > > new file mode 100755 > > index 00..651666979b > > --- /dev/null > > +++ b/t/t6100-rev-list-in-order.sh > > @@

[PATCH] travis-ci: don't build Git for the static analysis job

2017-11-01 Thread SZEDER Gábor
The static analysis job on Travis CI builds Git ever since it was introduced in d8245bb3f (travis-ci: add static analysis build job to run coccicheck, 2017-04-11). However, Coccinelle, the only static analysis tool in use, only needs Git's source code to work and it doesn't care about built Git

[PATCH] travis-ci: fix running P4 and Git LFS tests in Linux build jobs

2017-11-01 Thread SZEDER Gábor
Linux build jobs on Travis CI skip the P4 and Git LFS tests since commit 657343a60 (travis-ci: move Travis CI code into dedicated scripts, 2017-09-10), claiming there are no P4 or Git LFS installed. The reason is that P4 and Git LFS binaries are not installed to a directory in the default $PATH,

Re: [PATCH 2/2] send-email: quote-email quotes the message body

2017-11-01 Thread Matthieu Moy
Junio C Hamano writes: > Hmmm. I have a strong suspicion that people want an option to > trigger the feature from just 1/2 but not 2/2 some of the time. > Sure, removing the unwanted lines in the compose editor may be easy, > but it feels wasteful use of user's time to

Re: [PATCH 1/2] sequencer: factor out rewrite_file()

2017-11-01 Thread Simon Ruderich
On Tue, Oct 31, 2017 at 10:54:21AM +0100, René Scharfe wrote: > +static int rewrite_file(const char *path, const char *buf, size_t len) > +{ > + int rc = 0; > + int fd = open(path, O_WRONLY); > + if (fd < 0) > + return error_errno(_("could not open '%s' for writing"),

Re: [PATCH 1/2] quote-email populates the fields

2017-11-01 Thread Matthieu Moy
Junio C Hamano writes: > Payre Nathan writes: > >> From: Tom Russello >> >> --- > > Missing something here??? To clarify for Nathan, Thimothee and Danial: the cover-letter is an introduction send before the patch

Colorize matches for git log --grep=pattern?

2017-11-01 Thread Sebastian Schuberth
Hi, is there a way to colorize / highlight the pattern matched by git log -E -i --grep=pattern in the console output? Regards, Sebastian

RE: Is it possible to convert a Json file to xml file with Git

2017-11-01 Thread Jason Pyeron
> -Original Message- > From: Eyjolfur Eyjolfsson > Sent: Wednesday, November 1, 2017 6:10 AM > To: Randall S. Becker > Cc: Kevin Daudt; git@vger.kernel.org > Subject: Re: Is it possible to convert a Json file to xml > file with Git > > Hi > > Thank you for your response and help. I am

Re: [PATCH] t5580: add Cygwin support

2017-11-01 Thread Adam Dinwoodie
On Wed, Nov 01, 2017 at 10:44:22AM +0900, Junio C Hamano wrote: > Adam Dinwoodie writes: > > > t5580 tests that specifying Windows UNC paths works with Git. Cygwin > > supports UNC paths, albeit only using forward slashes, not backslashes, > > so run the compatible tests on

Re: Is it possible to convert a Json file to xml file with Git

2017-11-01 Thread Eyjolfur Eyjolfsson
Hi Thank you for your response and help. I am new to Git. The reason for my question is that I am using Git or Bash.exe (cURl) to call a REST web service (open for test) and retrieving Json from the web service and storing it into file. This works fine from the Git Bash command line . My Git

[PATCH] reduce_heads: fix memory leaks

2017-11-01 Thread Martin Ågren
We currently have seven callers of `reduce_heads(foo)`. Six of them do not use the original list `foo` again, and actually, all six of those end up leaking it. Introduce and use `reduce_heads_replace()` as a leak-free version of `foo = reduce_heads(foo)` to fix several of these. Fix the remaining

(From: Mr.James Tan (Urgent & Confidential)

2017-11-01 Thread James Tan
-- From: Mr James Tan (Urgent & Confidential) Good Day, Please Read. My name is Mr. James Tan, I am the Bill and Exchange manager here in Bank of Africa (BOA) Lome-Togo,West-Africa. I have a business proposal in the tune of $9.7m, (Nine Million Seven hundred Thousand United States Dollars)only,

Re: [PATCH 5/7] refs: tidy up and adjust visibility of the `ref_update` flags

2017-11-01 Thread Martin Ågren
On 28 October 2017 at 11:49, Michael Haggerty wrote: > The constants used for `ref_update::flags` were rather disorganized: > * The documentation wasn't very consistent and partly still referred > to sha1s rather than oids. > @@ -478,22 +462,23 @@ struct ref_transaction

Re: [PATCH v2 0/2] Avoid rewriting "packed-refs" unnecessarily

2017-11-01 Thread Jeff King
On Sat, Oct 28, 2017 at 11:16:00AM +0200, Michael Haggerty wrote: > This reroll make some logically small changes to v1 [1] that are > textually very big: > > * Invert the sense of `is_packed_transaction_noop()` and rename it to > `is_packed_transaction_needed()`. This makes the logic easier

Re: On the nature of cover letters [WAS Re: [PATCH 0/6] Create Git/Packet.pm]

2017-11-01 Thread Jeff King
On Mon, Oct 30, 2017 at 11:29:37AM -0700, Stefan Beller wrote: > > I can live with fancily-formatted cover letters. BUT. I would say if > > your cover letter is getting quite long, you might consider whether some > > of its content ought to be going elsewhere (either into commit messages > >

  1   2   >