Re: [PATCH v4 43/44] builtin-am: check for valid committer ident

2015-06-30 Thread Paul Tan
On Tue, Jun 30, 2015 at 4:02 AM, Stefan Beller wrote: > On Sun, Jun 28, 2015 at 7:06 AM, Paul Tan wrote: >> When commit_tree() is called, if the user does not have an explicit >> committer ident configured, it will attempt to construct a default >> committer ident based on the user's and system's

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 6:02 PM, Eric Sunshine wrote: > On Tue, Jun 30, 2015 at 5:23 AM, Duy Nguyen wrote: >> On Tue, Jun 30, 2015 at 11:56 AM, Eric Sunshine >> wrote: >>> The command "git checkout --to " is something of an anachronism, >>> encompassing functionality somewhere between "checkout

Re: [PATCH v4 01/44] wrapper: implement xopen()

2015-06-30 Thread Paul Tan
On Tue, Jun 30, 2015 at 1:18 AM, Junio C Hamano wrote: > Torsten Bögershausen writes: >> 2 remarks: >> - I don't know if and why we need the assert() here (but don't know if >> we have a strategie in Git for assert()) > > There is no bright-line rules, but I think it is sensible to remove > this.

[PATCH v2 12/13] rerere: explain the remainder

2015-06-30 Thread Junio C Hamano
Explain the internals of rerere as in-code comments, while sprinkling "NEEDSWORK" comment to highlight iffy bits and questionable assumptions. This covers the codepath that implements "rerere gc" and "rerere clear". Signed-off-by: Junio C Hamano --- rerere.c | 20 1 file ch

[PATCH v2 07/13] rerere: stop looping unnecessarily

2015-06-30 Thread Junio C Hamano
handle_cache() loops 3 times starting from an index entry that is unmerged, while ignoring an entry for a path that is different from what we are looking for. As the index is sorted, once we see a different path, we know we saw all stages for the path we are interested in. Just loop while we see

[PATCH v2 03/13] rerere: lift PATH_MAX limitation

2015-06-30 Thread Junio C Hamano
The MERGE_RR file records a collection of NUL-terminated entries, each of which consists of - a hash that identifies the conflict - a HT - the pathname We used to read this piece-by-piece, and worse yet, read the pathname part a byte at a time into a fixed buffer of size PATH_MAX. Instead, re

[PATCH v2 08/13] rerere: explain the rerere I/O abstraction

2015-06-30 Thread Junio C Hamano
Explain the internals of rerere as in-code comments. This one covers our thin I/O abstraction to read from either a file or a memory while optionally writing out to a file. Signed-off-by: Junio C Hamano --- rerere.c | 38 +++--- 1 file changed, 31 insertions(+),

[PATCH v2 06/13] rerere: drop want_sp parameter from is_cmarker()

2015-06-30 Thread Junio C Hamano
As the nature of the conflict marker line determies if there should a SP and label after it, the caller shouldn't have to pass the parameter redundantly. Signed-off-by: Junio C Hamano --- rerere.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/re

[PATCH v2 11/13] rerere: explain "rerere forget" codepath

2015-06-30 Thread Junio C Hamano
Explain the internals of rerere as in-code comments, while sprinkling "NEEDSWORK" comment to highlight iffy bits and questionable assumptions. This covers the codepath that implements "rerere forget". Signed-off-by: Junio C Hamano --- rerere.c | 24 1 file changed, 24 i

[PATCH v2 02/13] rerere: plug conflict ID leaks

2015-06-30 Thread Junio C Hamano
The merge_rr string list stores the conflict ID (a hexadecimal string that is used to index into $GIT_DIR/rr-cache) in the .util field of its elements, and when do_plain_rerere() resolves a conflict, the field is cleared. Also, when rerere_forget() recomputes the conflict ID to updates the preimag

[PATCH v2 05/13] rerere: report autoupdated paths only after actually updating them

2015-06-30 Thread Junio C Hamano
Signed-off-by: Junio C Hamano --- rerere.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/rerere.c b/rerere.c index 27b287d..304df02 100644 --- a/rerere.c +++ b/rerere.c @@ -482,6 +482,8 @@ static void update_paths(struct string_list *update)

[PATCH v2 10/13] rerere: explain the primary codepath

2015-06-30 Thread Junio C Hamano
Explain the internals of rerere as in-code comments, while sprinkling "NEEDSWORK" comment to highlight iffy bits and questionable assumptions. This one covers the codepath reached from rerere(), the primary interface to the subsystem. Signed-off-by: Junio C Hamano --- rerere.c | 95

[PATCH v2 01/13] rerere: fix an off-by-one non-bug

2015-06-30 Thread Junio C Hamano
When ac49f5ca (rerere "remaining", 2011-02-16) split out a new helper function check_one_conflict() out of find_conflict() function, so that the latter will use the returned value from the new helper to update the loop control variable that is an index into active_cache[], the new variable incremen

[PATCH v2 09/13] rerere: explain MERGE_RR management helpers

2015-06-30 Thread Junio C Hamano
Explain the internals of rerere as in-code comments, while sprinkling "NEEDSWORK" comment to highlight iffy bits and questionable assumptions. This one covers the "$GIT_DIR/MERGE_RR" file and in-core merge_rr that are used to keep track of the status of "rerere" session in progress. Signed-off-by

[PATCH v2 13/13] rerere: refactor "replay" part of do_plain_rerere()

2015-06-30 Thread Junio C Hamano
Extract the body of a loop that attempts to replay recorded resolution for each conflicted path into a helper function, not because I want to call it from multiple places later, but because the logic has become too deeply nested and hard to read. Signed-off-by: Junio C Hamano --- rerere.c | 75 +

[PATCH v2 04/13] rerere: write out each record of MERGE_RR in one go

2015-06-30 Thread Junio C Hamano
Instead of writing the hash for a conflict, a HT, and the path with three separate write_in_full() calls, format them into a single record into a strbuf and write it out in one go. As a more recent "rerere remaining" codepath abuses the .util field of the merge_rr data to store a sentinel token, m

[PATCH v2 00/13] "rerere" minor clean-up

2015-06-30 Thread Junio C Hamano
Here is an collection of various minor clean-ups in the implementation of one of my most favourite feature, rerere. This still hasn't reached the step to make the right refactoring to allow me to fix a bug I wanted to fix, which prompted me to look at this code, but it should give me a good starti

Re: [PATCH v4 01/44] wrapper: implement xopen()

2015-06-30 Thread Paul Tan
On Mon, Jun 29, 2015 at 12:48 PM, Torsten Bögershausen wrote: > - Having xopen() with 2 or 3 parameter is good, but the current may need > some tweaks for better portability: > > int xopen(const char *path, int oflag, ...) > { > mode_t mode = 0; > if (oflag & O_CREAT) { >

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-30 Thread Mikael Magnusson
On Wed, Jul 1, 2015 at 12:27 AM, Junio C Hamano wrote: > Eric Sunshine writes: > >> On Tue, Jun 30, 2015 at 12:56 AM, Eric Sunshine >> wrote >> Speaking of "git worktree new --force", should we revisit "git >> checkout --ignore-other-worktrees" before it gets set in stone? In >> particular, I'm

Re: [PATCH] --count feature for git shortlog

2015-06-30 Thread Lawrence Siebert
Vincent, I'm ccing you because of --use-bitmap-index John, Johannes, I really appreciate both your thoughts. `git rev-list --count HEAD -- "$FILENAME"` runs noticeably faster then my patch code for `git shortlog --count`, git shortlog -s "$FILENAME" | cut -f 1 | paste -sd+ -|bc, and faster than

Kedves Email felhasználói;

2015-06-30 Thread Email feljavító rendszer
Kedves email felhasználói; Túllépte a határt 23432 tárolása e-mail fiókkal által beállított Web Service / adminisztrátor, és azt szeretné, hogy sikerül a küldő és levelet fogadni, amíg meg újból érvényesíti az e-mail címre. A szükséges eljárások nyújtottak be az alábbiakban a nézetet, ellenőrizz

Re: [PATCH] Avoid the need of "--" when wildcard pathspec is used

2015-06-30 Thread Duy Nguyen
On Wed, Jul 1, 2015 at 1:10 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> When "--" is lacking from the command line and a command can take both >> revs and paths, the idea is if an argument can be seen as both an >> extended SHA-1 and a path, then "--" is required or git refuses

Re: [PATCH v4 0/4] More helpful 'git status' during 'rebase -i'

2015-06-30 Thread Junio C Hamano
Matthieu Moy writes: > This series makes "git status" provide an output like > > interactive rebase in progress; onto $ONTO > Last commands done (2 commands done): > pick $COMMIT2 two_commit > exec exit 15 > Next commands to do (2 remaining commands): > pick $COMMIT3 three_co

Re: [PATCH] revision.c: Remove unneeded check for NULL

2015-06-30 Thread Jonathan Nieder
Jeff King wrote: > On Fri, Jun 26, 2015 at 12:40:19PM -0700, Stefan Beller wrote: >>> This code seems to be underdocumented. >> >> I am not a expert in this area of the code, so I hoped Peff >> would document it if he feels like so. > > I kind of thought that the explanation in b6e8a3b covered thi

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-30 Thread Mark Levedahl
On 06/30/2015 06:11 PM, Eric Sunshine wrote: On Tue, Jun 30, 2015 at 12:56 AM, Eric Sunshine wrote: The command "git checkout --to " is something of an anachronism, encompassing functionality somewhere between "checkout" and "clone". The introduction of the git-worktree command, however, provid

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-30 Thread Junio C Hamano
Eric Sunshine writes: > On Tue, Jun 30, 2015 at 12:56 AM, Eric Sunshine > wrote > Speaking of "git worktree new --force", should we revisit "git > checkout --ignore-other-worktrees" before it gets set in stone? In > particular, I'm wondering if it makes sense to overload git-checkout's > existi

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 12:56 AM, Eric Sunshine wrote: > The command "git checkout --to " is something of an anachronism, > encompassing functionality somewhere between "checkout" and "clone". > The introduction of the git-worktree command, however, provides a proper > and intuitive place to house

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 5:23 AM, Duy Nguyen wrote: > On Tue, Jun 30, 2015 at 11:56 AM, Eric Sunshine > wrote: >> The command "git checkout --to " is something of an anachronism, >> encompassing functionality somewhere between "checkout" and "clone". >> The introduction of the git-worktree comman

Re: [PATCH v6 6/7] git-reflog: add create and exists functions

2015-06-30 Thread Junio C Hamano
David Turner writes: > On Tue, 2015-06-30 at 12:48 -0700, Junio C Hamano wrote: >> Eric Sunshine writes: >> >> >>> Alternatives would be strbuf_reset() or declaring and releasing the >> >>> strbuf within the for-loop scope. >> >> >> >> Because _reset() just rewinds the .len pointer without deal

Re: [PATCH v6 6/7] git-reflog: add create and exists functions

2015-06-30 Thread David Turner
On Tue, 2015-06-30 at 12:48 -0700, Junio C Hamano wrote: > Eric Sunshine writes: > > >>> Alternatives would be strbuf_reset() or declaring and releasing the > >>> strbuf within the for-loop scope. > >> > >> Because _reset() just rewinds the .len pointer without deallocating, > >> you would need a

Re: [PATCH v6 6/7] git-reflog: add create and exists functions

2015-06-30 Thread Junio C Hamano
Eric Sunshine writes: >>> Alternatives would be strbuf_reset() or declaring and releasing the >>> strbuf within the for-loop scope. >> >> Because _reset() just rewinds the .len pointer without deallocating, >> you would need an extra _release() before it goes out of scope. If >> it is expected th

Re: [PATCH v7 07/10] send-email: reduce dependencies impact on parse_address_line

2015-06-30 Thread Junio C Hamano
Matthieu Moy writes: > Junio C Hamano writes: > >> Matthieu Moy writes: >> >>> diff --git a/t/t9000-addresses.sh b/t/t9000-addresses.sh >>> new file mode 100755 >>> index 000..7223d03 >>> --- /dev/null >>> +++ b/t/t9000-addresses.sh >>> @@ -0,0 +1,30 @@ >>> +#!/bin/sh >>> +# >>> +# Copyrigh

Re: [PATCH v7 07/10] send-email: reduce dependencies impact on parse_address_line

2015-06-30 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> diff --git a/t/t9000-addresses.sh b/t/t9000-addresses.sh >> new file mode 100755 >> index 000..7223d03 >> --- /dev/null >> +++ b/t/t9000-addresses.sh >> @@ -0,0 +1,30 @@ >> +#!/bin/sh >> +# >> +# Copyright (c) 2015 > > That does not look lik

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Jeff King
On Tue, Jun 30, 2015 at 12:23:08PM -0700, Junio C Hamano wrote: > >> Why can't I shake this feeling that (" %s", fmt), i.e. prepend not > >> append, is the safer thing to do than to append? > > > > Because then removing the extra space involves `memmove` of the buffer, > > rather than just shorten

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Junio C Hamano
Jeff King writes: > On Tue, Jun 30, 2015 at 09:22:18AM -0700, Junio C Hamano wrote: > >> Jeff King writes: >> >> >> strbuf_addf(&f, "%s ", fmt); >> > >> > Basically I was trying to avoid making any assumptions about exactly how >> > strftime works. But presumably "stick a space in the format"

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Jeff King
On Tue, Jun 30, 2015 at 02:13:53PM -0400, Eric Sunshine wrote: > Sorry, I meant that the interpolation expense of "%s ". A cheaper (but > more verbose) alternative might be: > > size_t n = strlen(fmt); > const char *f = xmalloc(n + 2); > strcpy(f, fmt); > f[n] = ' '; > f[n + 1

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Jeff King
On Tue, Jun 30, 2015 at 10:05:33AM -0700, Junio C Hamano wrote: > > I'd guess most cases will fit in 128 bytes and never even hit this code > > path. You could also get fancier and start the buffer smaller, but only > > do the fmt hack when we cross a threshold. > > I'd assume that the "hint" thi

Re: [msysGit] 4th release candidate of Git for Windows 2.x, was Re: 3rd release candidate of Git for Windows 2.x

2015-06-30 Thread Thomas Braun
Am 30.06.2015 um 19:15 schrieb Konstantin Khomoutov: > On Mon, 29 Jun 2015 18:19:09 +0200 > Johannes Schindelin wrote: > >>> I've finally took time to switch from my old "msys1" release to this >>> RC4, and immediately got hit by the fact Git is now speaking to me >>> in Russian, which is not wha

Re: [PATCH v7 07/10] send-email: reduce dependencies impact on parse_address_line

2015-06-30 Thread Junio C Hamano
Matthieu Moy writes: > diff --git a/t/t9000-addresses.sh b/t/t9000-addresses.sh > new file mode 100755 > index 000..7223d03 > --- /dev/null > +++ b/t/t9000-addresses.sh > @@ -0,0 +1,30 @@ > +#!/bin/sh > +# > +# Copyright (c) 2015 That does not look like a valid copyright notice. In the mode

Re: [PATCH v6 6/7] git-reflog: add create and exists functions

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 12:07 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >>> + for (i = start; i < argc; i++) { >>> + if (safe_create_reflog(argv[i], &err, 1)) { >>> + error("could not create reflog %s: %s", argv[i], >>> +

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 1:58 PM, Jeff King wrote: > On Tue, Jun 30, 2015 at 12:58:33PM -0400, Eric Sunshine wrote: >> Beyond the extra allocation, I was also concerned about the >> sledgehammer approach of "%s " to append a single character when there >> are much less expensive ways to do so. > >

Re: [PATCH] Avoid the need of "--" when wildcard pathspec is used

2015-06-30 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > When "--" is lacking from the command line and a command can take both > revs and paths, the idea is if an argument can be seen as both an > extended SHA-1 and a path, then "--" is required or git refuses to > continue. It's currently implemented as: > ... Hmph, h

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Jeff King
On Tue, Jun 30, 2015 at 12:58:33PM -0400, Eric Sunshine wrote: > > Basically I was trying to avoid making any assumptions about exactly how > > strftime works. But presumably "stick a space in the format" is a > > universally reasonable thing to do. It's a hack, but it's contained to > > the funct

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Jeff King
On Tue, Jun 30, 2015 at 09:22:18AM -0700, Junio C Hamano wrote: > Jeff King writes: > > >>strbuf_addf(&f, "%s ", fmt); > > > > Basically I was trying to avoid making any assumptions about exactly how > > strftime works. But presumably "stick a space in the format" is a > > universally reason

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 1:05 PM, Junio C Hamano wrote: > Answering myself to my earlier question, the reason is because I was > worried what happens when given fmt is a malformed strftime format > specifier. Perhaps it ends with a lone % and "% " may format to > something unexpected, or something

Re: [msysGit] 4th release candidate of Git for Windows 2.x, was Re: 3rd release candidate of Git for Windows 2.x

2015-06-30 Thread Konstantin Khomoutov
On Mon, 29 Jun 2015 18:19:09 +0200 Johannes Schindelin wrote: > > I've finally took time to switch from my old "msys1" release to this > > RC4, and immediately got hit by the fact Git is now speaking to me > > in Russian, which is not what I want (previously this behaviour was > > only exhibited

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-30 Thread Junio C Hamano
Eric Sunshine writes: > * t2025-checkout-to.sh became t2025-worktree-new.sh. I'm not sure if the > test number still makes sense or if it should be changed, however, it > resides alongside its t2026-prune-linked-checkouts.sh counterpart. You'd need to adjust t7410 as well, perhaps like so:

Re: [PATCH 0/3] rebase -i: drop, missing commits and static checks

2015-06-30 Thread Junio C Hamano
Matthieu Moy writes: > There's an alternative: > > $ git rebase --edit-todo > # Make mistakes, save and quit > Your todo-list has the following issues: > - ... > Do you want to edit again (no aborts the rebase) [Y/n]? > > There's a precedent with the 'e' command of "git add -p". I have a > slight

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 9:26 AM, Jeff King wrote: > On Mon, Jun 29, 2015 at 06:22:47PM -0400, Eric Sunshine wrote: > >> Clients of strbuf rightly expect the buffer to grow as needed in >> order to complete the requested operation. It is, therefore, both >> weird and expectation-breaking for strbuf

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Junio C Hamano
Jeff King writes: > This does get called a lot (e.g., once per commit). One extra allocation > would probably not kill us there, but I think we could fairly trivially > put this on the unlikely path: > > size_t hint = 128; > size_t len; > > /* optimize out obvious 0-length case */ > if (!

Re: [PATCH 0/3] rebase -i: drop, missing commits and static checks

2015-06-30 Thread Matthieu Moy
Remi Galan Alfonso writes: > Junio C Hamano writes: >> The place where an error can be introduced is (assuming that what >> "rebase -i" writes out itself is perfect ;-) where we allow the user >> to edit, so instead of checking before "--continue", I would expect >> a sane design would check imm

Re: [PATCH 0/3] rebase -i: drop, missing commits and static checks

2015-06-30 Thread Remi Galan Alfonso
Matthieu Moy writes: > Remi Galan Alfonso writes: > > > Galan Rémi writes: > >> Shouldn't all the checking also be called in a 'rebase --continue', > >> considering that it can be called after a 'rebase --edit-todo' ? > >> (Right now it is only called after closing the editor in 'rebase -i') >

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 6:20 AM, Jeff King wrote: > On Mon, Jun 29, 2015 at 06:22:47PM -0400, Eric Sunshine wrote: >> void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm) >> { >> size_t len; >> struct strbuf f = STRBUF_INIT; >> >> /* >>* This is a

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-30 Thread Junio C Hamano
Duy Nguyen writes: > I think this is like "git checkout -b" vs "git branch". We pack so > many things in 'checkout' that it's a source of both convenience and > confusion. I never use "git branch" to create a new branch and if I > had a way to tell checkout to "move away and delete previous branc

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Junio C Hamano
Jeff King writes: >> strbuf_addf(&f, "%s ", fmt); > > Basically I was trying to avoid making any assumptions about exactly how > strftime works. But presumably "stick a space in the format" is a > universally reasonable thing to do. It's a hack, but it's contained to > the function. Why can

Re: [PATCH 0/3] rebase -i: drop, missing commits and static checks

2015-06-30 Thread Junio C Hamano
Remi Galan Alfonso writes: > Galan Rémi writes: >> Shouldn't all the checking also be called in a 'rebase --continue', >> considering that it can be called after a 'rebase --edit-todo' ? >> (Right now it is only called after closing the editor in 'rebase -i') > > What's your opinion on it? > > S

Re: [PATCH v6 6/7] git-reflog: add create and exists functions

2015-06-30 Thread Junio C Hamano
Eric Sunshine writes: >> + for (i = start; i < argc; i++) { >> + if (safe_create_reflog(argv[i], &err, 1)) { >> + error("could not create reflog %s: %s", argv[i], >> + err.buf); >> + status = 1; >> +

Re: [PATCH v6 06/11] ref-filter: implement '--merged' and '--no-merged' options

2015-06-30 Thread Karthik Nayak
On Tue, Jun 30, 2015 at 9:28 PM, Junio C Hamano wrote: > Karthik Nayak writes: > >>> I also have a feeling that compared to an implementation based on >>> paint_down_to_common(), including is_descendant_of(), this may be >>> less precise (e.g. it would be confused with clock skew that lasts >>> m

Re: [PATCH] config.c: fix writing config files on Windows network shares

2015-06-30 Thread Jeff King
On Tue, Jun 30, 2015 at 04:46:20PM +0200, Torsten Bögershausen wrote: > The value of fstat() is not checked here: > (indicated by a compiler warning, that contents_sz may be uninitalized. > > config.c: > int git_config_set_multivar_in_file( > //around line 2063 (the only call to fstat()) >

Re: [PATCH] config.c: fix writing config files on Windows network shares

2015-06-30 Thread Jeff King
On Tue, Jun 30, 2015 at 04:34:13PM +0200, Karsten Blees wrote: > Renaming to an existing file doesn't work on Windows network shares if the > target file is open. > > munmap() the old config file before commit_lock_file. > > Signed-off-by: Karsten Blees Thanks for fixing this. Acked-by: Jeff

Re: [PATCH v6 6/7] git-reflog: add create and exists functions

2015-06-30 Thread David Turner
On Tue, 2015-06-30 at 03:34 -0400, Eric Sunshine wrote: > > + strbuf_release(&err); > > This feels a bit dirty. While it's true that the current Thanks. New patchset pushed to the branch on github: https://github.com/dturner-tw/git.git dturner/pluggable-backends-preamble

Re: [PATCH v6 06/11] ref-filter: implement '--merged' and '--no-merged' options

2015-06-30 Thread Junio C Hamano
Karthik Nayak writes: >> I also have a feeling that compared to an implementation based on >> paint_down_to_common(), including is_descendant_of(), this may be >> less precise (e.g. it would be confused with clock skew that lasts >> more than SLOP commits). If we are inventing a new helper (as >

Re: [PATCH v11 06/10] bisect: don't mix option parsing and non-trivial code

2015-06-30 Thread Junio C Hamano
Matthieu Moy writes: > Junio C Hamano writes: > >> Matthieu, are you allowing your editor to corrupt the number of >> lines in the hunk on the @@ ... @@ hunk header? "diff" mode in >> Emacs does that, > > Indeed. There's magic in Emac's diff-mode to keep the header up to date, > but it seems to

Re: [PATCH 0/3] rebase -i: drop, missing commits and static checks

2015-06-30 Thread Matthieu Moy
Remi Galan Alfonso writes: > Galan Rémi writes: >> Shouldn't all the checking also be called in a 'rebase --continue', >> considering that it can be called after a 'rebase --edit-todo' ? >> (Right now it is only called after closing the editor in 'rebase -i') > > What's your opinion on it? It w

Re: [PATCH 0/3] rebase -i: drop, missing commits and static checks

2015-06-30 Thread Remi Galan Alfonso
Matthieu Moy writes: > Hi, > > Here are a few fixes to squash into the commits of the series. Other > than that, the series looks good to me. > > Junio: do you prefer a reroll or do you want to apply locally? > > Matthieu Moy (3): > fixup! git rebase -i: add static check for commands and SHA-

Re: [PATCH] config.c: fix writing config files on Windows network shares

2015-06-30 Thread Johannes Schindelin
Hi, On 2015-06-30 16:34, Karsten Blees wrote: > Renaming to an existing file doesn't work on Windows network shares if the > target file is open. > > munmap() the old config file before commit_lock_file. > > Signed-off-by: Karsten Blees ACK. Thanks, Dscho -- To unsubscribe from this list: se

Re: [PATCH] config.c: fix writing config files on Windows network shares

2015-06-30 Thread Torsten Bögershausen
On 2015-06-30 16.34, Karsten Blees wrote: > Renaming to an existing file doesn't work on Windows network shares if the > target file is open. > > munmap() the old config file before commit_lock_file. > > Signed-off-by: Karsten Blees > --- > > See https://github.com/git-for-windows/git/issues/22

Re: end-of-line diff checkout direction dependence problem

2015-06-30 Thread Torsten Bögershausen
On 2015-06-30 16.12, Thomas Vieten wrote: > We face a very inconvenient problem with end-of-line diffs which are not > "real". > We know the end-of-line problem very well as we thought. > But now we found a new phenomenon and nobody mentioning it. > > Consider the following repository structure:

[PATCH] config.c: fix writing config files on Windows network shares

2015-06-30 Thread Karsten Blees
Renaming to an existing file doesn't work on Windows network shares if the target file is open. munmap() the old config file before commit_lock_file. Signed-off-by: Karsten Blees --- See https://github.com/git-for-windows/git/issues/226 Strangely, renaming to an open file works fine on local d

end-of-line diff checkout direction dependence problem

2015-06-30 Thread Thomas Vieten
We face a very inconvenient problem with end-of-line diffs which are not "real". We know the end-of-line problem very well as we thought. But now we found a new phenomenon and nobody mentioning it. Consider the following repository structure: ---||->branch1

Re: [PATCH v6 06/11] ref-filter: implement '--merged' and '--no-merged' options

2015-06-30 Thread Karthik Nayak
On Mon, Jun 29, 2015 at 11:33 PM, Junio C Hamano wrote: > Karthik Nayak writes: > >> +static void do_merge_filter(struct ref_filter_cbdata *ref_cbdata) >> +{ >> + struct rev_info revs; >> + int i, old_nr; >> + struct ref_filter *filter = ref_cbdata->filter; >> + struct ref_array *

Re: [RFC/PATCH 5/9] ref-filter: add option to match literal pattern

2015-06-30 Thread Karthik Nayak
On Mon, Jun 29, 2015 at 11:50 PM, Junio C Hamano wrote: > Karthik Nayak writes: > >> Since 'ref-filter' only has an option to match path names. > > That is not a whole sentence ;-) > Argh! Noted. >> Add an option for regular pattern matching. > >> Mentored-by: Christian Couder >> Mentored-by:

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Jeff King
On Mon, Jun 29, 2015 at 06:22:47PM -0400, Eric Sunshine wrote: > Clients of strbuf rightly expect the buffer to grow as needed in > order to complete the requested operation. It is, therefore, both > weird and expectation-breaking for strbuf_addftime() to lack this > behavior. Worse, it doesn't ev

[PATCH v4 4/4] status: add new tests for status during rebase -i

2015-06-30 Thread Matthieu Moy
From: Guillaume Pagès Expand test coverage with one or more than two commands done and with zero, one or more than two commands remaining. Signed-off-by: Guillaume Pagès Signed-off-by: Junio C Hamano Signed-off-by: Matthieu Moy --- t/t7512-status-help.sh | 87

[PATCH v4 2/4] status: differentiate interactive from non-interactive rebases

2015-06-30 Thread Matthieu Moy
From: Guillaume Pagès Signed-off-by: Guillaume Pagès Signed-off-by: Junio C Hamano Signed-off-by: Matthieu Moy --- t/t7512-status-help.sh | 28 ++-- wt-status.c| 5 - 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/t/t7512-status-help.

[PATCH v4 1/4] status: factor two rebase-related messages together

2015-06-30 Thread Matthieu Moy
From: Guillaume Pagès Signed-off-by: Guillaume Pagès Signed-off-by: Junio C Hamano Signed-off-by: Matthieu Moy --- wt-status.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/wt-status.c b/wt-status.c index eaed4fe..8c4b806 100644 --- a/w

[PATCH v4 3/4] status: give more information during rebase -i

2015-06-30 Thread Matthieu Moy
From: Guillaume Pagès git status gives more information during rebase -i, about the list of command that are done during the rebase. It displays the two last commands executed and the two next lines to be executed. It also gives hints to find the whole files in .git directory. Signed-off-by: Gui

[PATCH v4 0/4] More helpful 'git status' during 'rebase -i'

2015-06-30 Thread Matthieu Moy
This series makes "git status" provide an output like interactive rebase in progress; onto $ONTO Last commands done (2 commands done): pick $COMMIT2 two_commit exec exit 15 Next commands to do (2 remaining commands): pick $COMMIT3 three_commit pick $COMMIT4 four_commit

[PATCH] Avoid the need of "--" when wildcard pathspec is used

2015-06-30 Thread Nguyễn Thái Ngọc Duy
When "--" is lacking from the command line and a command can take both revs and paths, the idea is if an argument can be seen as both an extended SHA-1 and a path, then "--" is required or git refuses to continue. It's currently implemented as: (1) if an argument is rev, then it must not exist in

Re: [PATCH] --count feature for git shortlog

2015-06-30 Thread John Keeping
On Tue, Jun 30, 2015 at 02:10:49PM +0200, Johannes Schindelin wrote: > On 2015-06-29 18:46, Lawrence Siebert wrote: > > > I appreciate your help. Okay, That all makes sense. > > > > I would note that something like: > > git shortlog -s "$FILENAME: | cut -f 1 | paste -sd+ - | bc > > > > seems l

[PATCH v7 07/10] send-email: reduce dependencies impact on parse_address_line

2015-06-30 Thread Matthieu Moy
From: Remi Lespinet parse_address_line had not the same behavior whether the user had Mail::Address or not. Teach parse_address_line to behave like Mail::Address. When the user input is correct, this implementation behaves exactly like Mail::Address except when there are quotes inside the name:

[PATCH v7 01/10] t9001-send-email: move script creation in a setup test

2015-06-30 Thread Matthieu Moy
From: Remi Lespinet Move the creation of the scripts used in to-cmd and cc-cmd tests in a setup test to make them available for later tests. Signed-off-by: Remi Lespinet Signed-off-by: Matthieu Moy --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-)

[PATCH v7 08/10] send-email: consider quote as delimiter instead of character

2015-06-30 Thread Matthieu Moy
From: Remi Lespinet Do not consider quote inside a recipient name as character when they are not escaped. This interprets: "Jane" "Doe" as: "Jane Doe" instead of: "Jane\" \"Doe" Signed-off-by: Remi Lespinet Signed-off-by: Matthieu Moy --- git-send-email.perl | 6 -- 1 file c

[PATCH v7 04/10] send-email: refactor address list process

2015-06-30 Thread Matthieu Moy
From: Remi Lespinet Simplify code by creating a function which transform a list of strings containing email addresses (separated by commas, comporting aliases) into a clean list of valid email addresses. Signed-off-by: Remi Lespinet Signed-off-by: Matthieu Moy --- git-send-email.perl | 22 +++

[PATCH v7 02/10] send-email: allow aliases in patch header and command script outputs

2015-06-30 Thread Matthieu Moy
From: Remi Lespinet Interpret aliases in: - Header fields of patches generated by git format-patch (using --to, --cc, --add-header for example) or manually modified. Example of fields in header: To: alias1 Cc: alias2 Cc: alias3 - Outputs of command scripts spe

[PATCH v7 09/10] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-30 Thread Matthieu Moy
From: Remi Lespinet Accept a list of emails separated by commas in flags --cc, --to and --bcc. Multiple addresses can already be given by using these options multiple times, but it is more convenient to allow cutting-and-pasting a list of addresses from the header of an existing e-mail message,

[PATCH v7 10/10] send-email: suppress meaningless whitespaces in from field

2015-06-30 Thread Matthieu Moy
From: Remi Lespinet Remove leading and trailing whitespaces in from field before interepreting it to improve consistency with other options. The split_addrs function already take care of trailing and leading whitespaces for to, cc and bcc fields. The from option now: - has the same behavior wh

[PATCH v7 06/10] send-email: minor code refactoring

2015-06-30 Thread Matthieu Moy
From: Remi Lespinet Group expressions in a single if statement. This avoid checking multiple time if the variable $sender is defined. Signed-off-by: Remi Lespinet Signed-off-by: Matthieu Moy --- git-send-email.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-

[PATCH v7 03/10] t9001-send-email: refactor header variable fields replacement

2015-06-30 Thread Matthieu Moy
From: Remi Lespinet Create a function which replaces Date, Message-Id and X-Mailer lines generated by git-send-email by a specific string: Date:.*$ -> Date: DATE-STRING Message-Id:.*$ -> Message-Id: MESSAGE-ID-STRING X-Mailer:.*$ -> X-Mailer: X-MAILER-STRING Signed-off-by: Remi Lespinet

[PATCH v7 00/10] send-email address management

2015-06-30 Thread Matthieu Moy
This is an almost unmodified resend of Remi's patch here: http://thread.gmane.org/gmane.comp.version-control.git/271844/focus=272499 The last patches had trouble reaching the list, hopefully this will be easier to apply. Two minor changes: * Removed the Helped-by: Remi trailer in a message sent

[PATCH v7 05/10] send-email: allow use of aliases in the From field of --compose mode

2015-06-30 Thread Matthieu Moy
From: Remi Lespinet Aliases were expanded before considering the From field of the --compose option. This is inconsistent with other fields (To, Cc, ...) which already support aliases. Signed-off-by: Remi Lespinet Signed-off-by: Matthieu Moy --- git-send-email.perl | 4 ++-- 1 file changed, 2

Re: [PATCH] --count feature for git shortlog

2015-06-30 Thread Johannes Schindelin
Hi Lawrence, On 2015-06-29 18:46, Lawrence Siebert wrote: > I appreciate your help. Okay, That all makes sense. > > I would note that something like: > git shortlog -s "$FILENAME: | cut -f 1 | paste -sd+ - | bc > > seems like it run much faster then: > > git log --oneline "$FILENAME" | wc -

Re: [PATCH v11 06/10] bisect: don't mix option parsing and non-trivial code

2015-06-30 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu, are you allowing your editor to corrupt the number of > lines in the hunk on the @@ ... @@ hunk header? "diff" mode in > Emacs does that, Indeed. There's magic in Emac's diff-mode to keep the header up to date, but it seems totally buggy. I manually deleted a

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Jeff King
On Mon, Jun 29, 2015 at 06:22:47PM -0400, Eric Sunshine wrote: > Clients of strbuf rightly expect the buffer to grow as needed in > order to complete the requested operation. It is, therefore, both > weird and expectation-breaking for strbuf_addftime() to lack this > behavior. Worse, it doesn't ev

[PATCH 1/3] fixup! git rebase -i: add static check for commands and SHA-1

2015-06-30 Thread Matthieu Moy
Signed-off-by: Matthieu Moy --- git-rebase--interactive.sh | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index ec4a068..9041d15 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -871,8

[PATCH 2/3] fixup! git rebase -i: warn about removed commits

2015-06-30 Thread Matthieu Moy
Signed-off-by: Matthieu Moy --- git-rebase--interactive.sh | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 9041d15..0117791 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactiv

[PATCH 0/3] rebase -i: drop, missing commits and static checks

2015-06-30 Thread Matthieu Moy
Hi, Here are a few fixes to squash into the commits of the series. Other than that, the series looks good to me. Junio: do you prefer a reroll or do you want to apply locally? Matthieu Moy (3): fixup! git rebase -i: add static check for commands and SHA-1 fixup! git rebase -i: warn about rem

[PATCH 3/3] fixup! git rebase -i: warn about removed commits

2015-06-30 Thread Matthieu Moy
Signed-off-by: Matthieu Moy --- git-rebase--interactive.sh| 2 +- t/t3404-rebase-interactive.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 0117791..8090d80 100644 --- a/git-rebase--interactive.sh +++ b

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-30 Thread Duy Nguyen
On Tue, Jun 30, 2015 at 11:56 AM, Eric Sunshine wrote: > The command "git checkout --to " is something of an anachronism, > encompassing functionality somewhere between "checkout" and "clone". > The introduction of the git-worktree command, however, provides a proper > and intuitive place to house

[git-p4] import with labels fails when commit is not transferred

2015-06-30 Thread Holl, Marcus
Hi, I have an issue with the git p4 tooling regarding import of labels. My git version is 2.4.5 I try to transform a perforce repository. My command line is: git p4 clone --verbose --detect-branches --import-local --import-labels --destination //depot@all The relevant parts in the gitconfig

  1   2   >