Re: [PATCH v2 0/5] Git filter protocol

2016-07-28 Thread Lars Schneider
> On 27 Jul 2016, at 21:08, Jakub Narębski wrote: > > W dniu 2016-07-27 o 02:06, larsxschnei...@gmail.com pisze: >> From: Lars Schneider >> >> Hi, >> >> thanks a lot for the extensive reviews. I tried to address all mentioned >> concerns and

Re: [PATCH v2 1/5] convert: quote filter names in error messages

2016-07-28 Thread Lars Schneider
> On 27 Jul 2016, at 22:01, Jakub Narębski wrote: > > W dniu 2016-07-27 o 02:06, larsxschnei...@gmail.com pisze: > >> Git filter with spaces (e.g. `filter.sh foo`) are hard to read in >> error messages. Quote them to improve the readability. > > This is not something very

Alternatives to mid.gmane.org?

2016-07-28 Thread Lars Schneider
Hi, gmane is down and I wonder if there are alternatives to find a message based on the message ID in the Git mailing list archive? Thanks, Lars -- 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

[PATCH v2] i18n: config: unfold error messages marked for translation

2016-07-28 Thread Vasco Almeida
Introduced in 473166b ("config: add 'origin_type' to config_source struct", 2016-02-19), Git can inform the user about the origin of a config error, but the implementation does not allow translators to translate the keywords 'file', 'blob, 'standard input', and 'submodule-blob'. Moreover, for the

Re: [PATCH v2 5/5] convert: add filter..process option

2016-07-28 Thread Jeff King
On Thu, Jul 28, 2016 at 02:10:12PM +0200, Lars Schneider wrote: > > I think that's orthogonal. I just mean that using zero for success puts > > you in our usual style, and then accumulating errors can be done with > > "|=". > > Ah. I guess I was misguided by the way errors are currently handled

Re: [PATCH v2 0/5] Git filter protocol

2016-07-28 Thread Jeff King
On Thu, Jul 28, 2016 at 09:16:18AM +0200, Lars Schneider wrote: > But Peff ($gmane/299902), Duy, and Eric, seemed to prefer the pkt-line > solution (gmane is down - otherwise I would have given you the links). FWIW, I think there are arguments for transmitting size + content (namely, that it is

Re: Find a topic branch containing a commit

2016-07-28 Thread Michael Haggerty
On 07/27/2016 08:03 PM, Duy Nguyen wrote: > On Wed, Jul 27, 2016 at 7:50 PM, Stefan Beller wrote: >> On Wed, Jul 27, 2016 at 10:42 AM, Duy Nguyen wrote: >>> Before I start doing anything silly because I don't know it can >>> already be done without waving

Re: Alternatives to mid.gmane.org?

2016-07-28 Thread Jeff King
On Thu, Jul 28, 2016 at 11:11:54AM +0200, Lars Schneider wrote: > gmane is down and I wonder if there are alternatives to > find a message based on the message ID in the Git > mailing list archive? Try: https://public-inbox.org/git/20160710004813.ga20...@dcvr.yhbt.net -Peff -- To

[PATCH] document how to reference previous commits

2016-07-28 Thread Heiko Voigt
To reference previous commits people used to put just the abbreviated SHA-1 into commit messages. This is what has evolved as a more stable format for referencing commits. So lets document it for everyone to lookup when needed. Signed-off-by: Heiko Voigt --- On Thu, Jul 28,

Re: [PATCH v2 5/5] convert: add filter..process option

2016-07-28 Thread Torsten Bögershausen
On 07/27/2016 02:06 AM, larsxschnei...@gmail.com wrote: Some comments inline [] > The filter is expected to respond with the result content size as > ASCII number in bytes and the result content in packet format with > a flush packet at the end: > > packet: git<

Re: Bug? git rebase -i --autostash fails to restore working files

2016-07-28 Thread Remi Galan Alfonso
Hi Phillip, Phillip Wood writes: > When running ‘git rebase -i --autostash’ if the editor fails then the > rebase fails but stash is not applied so the working files are not > restored. Running ‘git rebase --abort’ replies that there’s no rebase > in progress. If you

[PATCH 2/3] submodule-config: combine early return code into one goto

2016-07-28 Thread Heiko Voigt
So we have simpler return handling code and all the cleanup code in almost one place. Signed-off-by: Heiko Voigt --- This is an updated cleanup patch. Now with goto so we have simpler code. submodule-config.c | 31 --- 1 file changed, 12

[PATCH 1/3] submodule-config: passing name reference for .gitmodule blobs

2016-07-28 Thread Heiko Voigt
Commit 959b5455 (submodule: implement a config API for lookup of .gitmodules values, 2015-08-18) implemented the initial version of the submodule config cache. During development of that initial version we extracted the function gitmodule_sha1_from_commit(). During that process we missed that the

Bug? git rebase -i --autostash fails to restore working files

2016-07-28 Thread Phillip Wood
When running ‘git rebase -i --autostash’ if the editor fails then the rebase fails but stash is not applied so the working files are not restored. Running ‘git rebase --abort’ replies that there’s no rebase in progress. If you notice what’s happened it’s not a problem if you know to do ‘git stash

Re: [PATCH] i18n: config: unfold error messages marked for translation

2016-07-28 Thread Vasco Almeida
A Qua, 27-07-2016 às 13:00 -0700, Junio C Hamano escreveu: > Vasco Almeida writes: > > > > > + > > + switch (cf->origin_type) { > > + case CONFIG_ORIGIN_BLOB: > > + error_msg = xstrfmt(_("bad config line %d in blob > > %s"), > > +   

Re: [PATCH v2 5/5] convert: add filter..process option

2016-07-28 Thread Lars Schneider
> On 27 Jul 2016, at 20:11, Jeff King wrote: > > On Wed, Jul 27, 2016 at 07:31:26PM +0200, Lars Schneider wrote: > + strbuf_grow(sb, size + 1); // we need one extra byte for the packet flush >>> >>> What happens if size is the maximum for size_t here (i.e.,

Re: [PATCH 1/2] fix passing a name for config from submodules

2016-07-28 Thread Heiko Voigt
On Tue, Jul 26, 2016 at 10:22:07AM -0700, Stefan Beller wrote: > On Tue, Jul 26, 2016 at 2:49 AM, Heiko Voigt wrote: > > Thanks for continuing on the submodule cache! No worries. Its my code so I am happy to fix any bugs in it. Although it was obviously perfect from the

[PATCH 3/3] submodule-config: fix test binary crashing when no arguments given

2016-07-28 Thread Heiko Voigt
Since arg[0] will be NULL without any argument here and starts_with() does not like NULL-pointers. Signed-off-by: Heiko Voigt --- A small fix I found while developing the test. test-submodule-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v2 0/5] Git filter protocol

2016-07-28 Thread Jakub Narębski
W dniu 2016-07-28 o 09:16, Lars Schneider pisze: >> On 27 Jul 2016, at 21:08, Jakub Narębski wrote: >> W dniu 2016-07-27 o 02:06, larsxschnei...@gmail.com pisze: >>> >>> thanks a lot for the extensive reviews. I tried to address all mentioned >>> concerns and summarized them

[PATCH v4] i18n: notes: mark comment for translation

2016-07-28 Thread Vasco Almeida
Mark comment displayed when editing a note for translation. Signed-off-by: Vasco Almeida --- This patch follows the original output and Ævar Arnfjörð Bjarmason sugestion to remove \n from the source string in order to assure that the ouput layout is not change by one

Re: Find a topic branch containing a commit

2016-07-28 Thread Junio C Hamano
Michael Haggerty writes: > On 07/27/2016 08:03 PM, Duy Nguyen wrote: >>> >>> https://github.com/mhagger/git-when-merged ? >> >> Beautiful. If it had an option to show a topic (i.e. git-log from >> merge base to merge point) I would be ecstatic. > > That's a good idea. I

Re: [PATCH] document how to reference previous commits

2016-07-28 Thread Junio C Hamano
Heiko Voigt writes: > @@ -121,6 +121,11 @@ its behaviour. Try to make sure your explanation can be > understood > without external resources. Instead of giving a URL to a mailing list > archive, summarize the relevant points of the discussion. > > +If you want to

Re: [PATCH 1/2] fix passing a name for config from submodules

2016-07-28 Thread Junio C Hamano
Heiko Voigt writes: >> Apparently we put the subject first and then the date. I always did it >> the other way >> round, to there is no strict coding guide line,... Please don't say "this is not spelled out in the guidelines, so I can do whatever I like, *EVEN* *THOUGH* I

Re: [PATCH] document how to reference previous commits

2016-07-28 Thread Stefan Beller
On Thu, Jul 28, 2016 at 8:38 AM, Junio C Hamano wrote: > Heiko Voigt writes: > >> @@ -121,6 +121,11 @@ its behaviour. Try to make sure your explanation can >> be understood >> without external resources. Instead of giving a URL to a mailing list >>

[PATCH/RFC 0/7] Add possibility to clone specific subdirectories

2016-07-28 Thread Robin Ruede
This patch series adds a `--sparse-prefix=` option to multiple commands, allowing fetching repository contents from only a subdirectory of a remote. This works along with sparse-checkout, and is especially useful for repositories where a subdirectory has meaning when standing alone. * Motivation

[PATCH/RFC 2/7] pack-objects: add sparse-prefix

2016-07-28 Thread Robin Ruede
this allows creating packs that contain only the blobs relevant to a specific subdirectory, e.g. echo HEAD | git pack-objects --revs --sparse-prefix=/contrib/ will create a pack containing the complete history of HEAD, including all commits, all trees, and the files in the contrib directory.

Re: [PATCH v2] i18n: config: unfold error messages marked for translation

2016-07-28 Thread Junio C Hamano
Vasco Almeida writes: > Unfold the message into several templates for each known origin_type. > That would result in better translation at the expense of code > verbosity. Looks good now, except one minor nit I'll tweak out while queuing. > if (cf->die_on_error) >

Re: [PATCH v2] i18n: config: unfold error messages marked for translation

2016-07-28 Thread Jeff King
On Thu, Jul 28, 2016 at 01:14:03PM +, Vasco Almeida wrote: > static void die_bad_number(const char *name, const char *value) > { > - const char *reason = errno == ERANGE ? > - "out of range" : > - "invalid unit"; > if (!value) >

git-testadd: Execute a command with only the staged changes in Git applied

2016-07-28 Thread Øyvind A . Holm
This is a script I created some weeks ago, and I've found it to be immensely useful. Here is a snippet from git-testadd --help: If you have lots of unrelated uncommitted changes in the current repository and want to split up the commit, how can you easily check if the changes passes the

Re: [PATCH 1/3] submodule-config: passing name reference for .gitmodule blobs

2016-07-28 Thread Stefan Beller
On Thu, Jul 28, 2016 at 5:49 AM, Heiko Voigt wrote: > Commit 959b5455 (submodule: implement a config API for lookup of > .gitmodules values, 2015-08-18) implemented the initial version of the > submodule config cache. During development of that initial version we > extracted

Re: [PATCHv1] completion: add option '--recurse-submodules' to 'git clone'

2016-07-28 Thread Junio C Hamano
Stefan Beller writes: >> Anyway, I'll apply the "addition to the completion" patch. >> >> Thanks. > > Thanks for this patch! > > Note: if we ever decide to resurrect sb/submodule-default-path, > we run into a merge conflict. The reasoning for using > "--recurse-submodules"

[PATCH/RFC 1/7] list-objects: add sparse-prefix option to rev_info

2016-07-28 Thread Robin Ruede
this skips all blob objects who's path does not begin with the specified prefix Signed-off-by: Robin Ruede --- list-objects.c | 4 +++- revision.c | 4 revision.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/list-objects.c b/list-objects.c

[PATCH/RFC 5/7] fetch: add sparse-prefix option

2016-07-28 Thread Robin Ruede
also pass sparse-prefix option from fetch to rev-list while checking connectivity Signed-off-by: Robin Ruede --- builtin/fetch.c | 19 ++- connected.c | 7 ++- transport.c | 4 transport.h | 4 4 files changed, 28 insertions(+), 6

[PATCH/RFC 4/7] fetch-pack: add sparse prefix to smart protocol

2016-07-28 Thread Robin Ruede
For example git fetch-pack --sparse-prefix=/contrib/ origin HEAD Should fetch a pack that is generated on the remote by echo HEAD | git pack-objects --revs --stdout --sparse-prefix=/contrib/ Signed-off-by: Robin Ruede --- builtin/fetch-pack.c | 6 ++

[PATCH/RFC 3/7] Skip checking integrity of files ignored by sparse

2016-07-28 Thread Robin Ruede
(this might be wrong, not sure if this is the right place) Signed-off-by: Robin Ruede --- cache-tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cache-tree.c b/cache-tree.c index f28b1f4..ab01ae5 100644 --- a/cache-tree.c +++ b/cache-tree.c @@

Re: [PATCH v4] i18n: notes: mark comment for translation

2016-07-28 Thread Junio C Hamano
Vasco Almeida writes: > Mark comment displayed when editing a note for translation. > > Signed-off-by: Vasco Almeida > --- > > This patch follows the original output and Ævar Arnfjörð Bjarmason > sugestion to remove \n from the source string in

[PATCH 0/3] diff-highlight: add support for git log --graph output.

2016-07-28 Thread Brian Henderson
Hi, I've been working with Jeff King on this patch, but he encouraged me to email the list. I recently learned about the diff-highlight tool and find it very helpful, however, I frequently use the --graph option to git log which breaks the tool. This patch looks to fix this. I wanted to try and

Re: git-testadd: Execute a command with only the staged changes in Git applied

2016-07-28 Thread Øyvind A . Holm
On 28 July 2016 at 18:37, Junio C Hamano wrote: > Øyvind A. Holm writes: > > This is a script I created some weeks ago, and I've found it to be > > immensely useful. Here is a snippet from git-testadd --help: > > > > If you have lots of unrelated

Re: [PATCH/RFC 0/7] Add possibility to clone specific subdirectories

2016-07-28 Thread Duy Nguyen
On Thu, Jul 28, 2016 at 6:02 PM, Robin Ruede wrote: > This patch series adds a `--sparse-prefix=` option to multiple commands, > allowing fetching repository contents from only a subdirectory of a remote. > > This works along with sparse-checkout, and is especially useful for

Re: [PATCH/RFC 0/7] Add possibility to clone specific subdirectories

2016-07-28 Thread Duy Nguyen
Corrections.. On Thu, Jul 28, 2016 at 6:59 PM, Duy Nguyen wrote: > Ah.. this is what I call narrow checkout [1] (but gmane is down at the moment) s/checkout/clone/ > [2] https://github.com/pclouds/git/commits/lanh/narrow-checkout s,lanh/,, -- Duy -- To unsubscribe from

Re: Alternatives to mid.gmane.org?

2016-07-28 Thread Duy Nguyen
On Thu, Jul 28, 2016 at 11:11 AM, Lars Schneider wrote: > Hi, > > gmane is down I read this and thought "temporarily" but apparently it's not [1]. A lot of our links in the mail archive are gmane's :( [1] https://lars.ingebrigtsen.no/2016/07/28/the-end-of-gmane/ --

[PATCH 1/2] t7406: correct depth test in shallow test

2016-07-28 Thread Stefan Beller
We used to ask for 3 changes and tested for having 1, so the test seems broken. Correct the test by using test_line_count that exists in the test suite. Signed-off-by: Stefan Beller --- t/t7406-submodule-update.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[PATCH va/i18n-even-more] rebase-interactive: trim leading whitespace from progress count

2016-07-28 Thread Johannes Sixt
Interactive rebase uses 'wc -l' to write the current patch number in a progress report. Some implementations of 'wc -l' produce spaces before the number, leading to ugly output such as Rebasing ( 3/8) Remove the spaces using a trivial arithmetic evaluation. Before 9588c52 (i18n:

[PATCH 0/2] submodule update: allow '.' for branch value

2016-07-28 Thread Stefan Beller
The meat is in patch 2 and helps Git and Gerrit work well together. patch 1 looks unrelated but it is not, as when left out the broken test, breaks with patch 2. This is because we add more commits in the submodule. Thanks, Stefan Stefan Beller (2): t7406: correct depth test in shallow test

[PATCH 2/2] submodule update: allow '.' for branch value

2016-07-28 Thread Stefan Beller
Gerrit has a "superproject subscription" feature[1], that triggers a commit in a superproject that is subscribed to its submodules. Conceptually this Gerrit feature can be done on the client side with Git via: git -C submodule update --remote --force git -C commit -a -m "Update

Re: Bug? git rebase -i --autostash fails to restore working files

2016-07-28 Thread Phillip Wood
On 28/07/16 14:02, Remi Galan Alfonso wrote: > Hi Phillip, > > Phillip Wood writes: >> When running ‘git rebase -i --autostash’ if the editor fails then the >> rebase fails but stash is not applied so the working files are not >> restored. Running ‘git rebase --abort’

Re: [RFC] git-format-patch: default to --from to avoid spoofed mails?

2016-07-28 Thread Josh Triplett
On Thu, Jul 28, 2016 at 03:14:48PM -0700, Junio C Hamano wrote: > Jeff King writes: > > I think the original reason I did not make "--from" the default is that > > I was worried about breaking consumers which do not know how to handle > > in-body headers. > > That's a fair

Re: [PATCH] pack-objects: Use reachability bitmap index when generating non-stdout pack too

2016-07-28 Thread Kirill Smelkov
Junio, first of all thanks for feedback, On Wed, Jul 27, 2016 at 01:40:36PM -0700, Junio C Hamano wrote: > Kirill Smelkov writes: > > > > From: Kirill Smelkov > > Subject: [PATCH 1/2] pack-objects: Make sure use_bitmap_index is not active > > under > >

Re: [ANNOUNCE] more archives of this list

2016-07-28 Thread Eric Wong
Eric Wong wrote: > Code is AGPL-3.0+: git clone https://public-inbox.org/ > > > Additional mirrors or forks (perhaps different UIs) are very welcome, Btw, it's possible to do quote highlighting with user-side CSS:

Re: [PATCH] pack-objects: Use reachability bitmap index when generating non-stdout pack too

2016-07-28 Thread Junio C Hamano
Kirill Smelkov writes: > I'm waiting so long for main patch to be at least queued to pu, that I'm > now a bit frustrated and ready to do something not related to main goal :) Perhaps the first step would be to stop putting multiple patches in a single e-mail buried after a few

Re: [PATCH] git-svn: allow --version to work anywhere

2016-07-28 Thread Eric Wong
Junio C Hamano wrote: > Subject: [PATCH] t9100: portability fix > > Do not say "export VAR=VAL"; "VAR=VAL && export VAR" is always more > portable. Oops, sorry I should've caught that :x -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a

[Git 2.9.2] diff inserted by commit.verbose not removed when rewording

2016-07-28 Thread Thijs van Dien
I'm just a random Git user, not very familiar with the Git development process and so on, so please by gentle. Setup: - OS X 10.11.6 - Git 2.9.2 via Homebrew Curiosity triggered me to enable 'commit.verbose' globally with 'git config --global commit.verbose true'. I have not configured it on

Re: Small trivial annoyance with the nice new builtin "git am"

2016-07-28 Thread Junio C Hamano
On Thu, Jul 28, 2016 at 4:35 PM, Linus Torvalds wrote: > Ok, it's no longer *that* new, but I only now noticed.. > > So I noticed that when I applied the last patch-bomb series from > Andrew, all the commit date-stamps are idential. > ... > That seems entirely

[RFC] git-format-patch: default to --from to avoid spoofed mails?

2016-07-28 Thread Josh Triplett
When git-format-patch formats a patch authored by someone other than yourself, it defaults to filling in the "From:" field of the email from the commit author. If you explicitly pass the --from option, git-format-patch will instead use your own committer identity as the "From:", and then put a

Re: [RFC] git-format-patch: default to --from to avoid spoofed mails?

2016-07-28 Thread Jeff King
On Thu, Jul 28, 2016 at 02:37:04PM -0700, Junio C Hamano wrote: > Josh Triplett writes: > > > I'd like to propose changing the default behavior of git-format-patch to > > --from (and adding a --from-author option to override, and perhaps a > > config setting). This will

Re: [RFC] git-format-patch: default to --from to avoid spoofed mails?

2016-07-28 Thread Jeff King
On Thu, Jul 28, 2016 at 03:14:48PM -0700, Junio C Hamano wrote: > > I think the original reason I did not make "--from" the default is that > > I was worried about breaking consumers which do not know how to handle > > in-body headers. > > That's a fair concern. > > So going back to Josh's

Re: Small trivial annoyance with the nice new builtin "git am"

2016-07-28 Thread Jeff King
On Thu, Jul 28, 2016 at 04:35:58PM -0700, Linus Torvalds wrote: > Now, it would be lovely if the new builtin git-am really was *so* fast > that it applies a 100+-patch series in under a second, but no, that's > not it. It's just that it only looks up the current time once. > > That seems

Re: [PATCH] git-svn: allow --version to work anywhere

2016-07-28 Thread Junio C Hamano
Junio C Hamano writes: > Eric Wong writes: > >> Repushed my master in case it's a convenient time to pull. >> >> The following changes since commit 29493589e97a2de0c4c1c314f61ccafaee3b5caf: >> >> archive-tar: huge offset and future timestamps would not work

Re: [RFC] git-format-patch: default to --from to avoid spoofed mails?

2016-07-28 Thread Junio C Hamano
Josh Triplett writes: > I'd like to propose changing the default behavior of git-format-patch to > --from (and adding a --from-author option to override, and perhaps a > config setting). This will not change the output *except* when > formatting patches authored by

Re: git-testadd: Execute a command with only the staged changes in Git applied

2016-07-28 Thread Øyvind A . Holm
On 28 July 2016 at 21:31, Jakub Narębski wrote: > W dniu 2016-07-28 o 18:56, Øyvind A. Holm pisze: > > Øyvind A. Holm writes: > > > This is a script I created some weeks ago, and I've found it to be > > > immensely useful. Here is a snippet from git-testadd

Re: [PATCH/RFC 0/7] Add possibility to clone specific subdirectories

2016-07-28 Thread Junio C Hamano
Duy Nguyen writes: >> 4. Fsck complains about missing blobs. Should be fairly easy to fix. > > Not really. You'll have to associate path information with blobs > before you decide that a blob should exist or not. Also the same blob or the tree can exist both inside and

Re: [RFC] git-format-patch: default to --from to avoid spoofed mails?

2016-07-28 Thread Junio C Hamano
Jeff King writes: >> ... What is most worrysome is the latter >> half of the last sentence. Is it really "should not be", or is it >> merely "use of this option is just a waste of time, as you would get >> exactly the same result anyway"? If it is the latter, that is fine. > >

Small trivial annoyance with the nice new builtin "git am"

2016-07-28 Thread Linus Torvalds
Ok, it's no longer *that* new, but I only now noticed.. So I noticed that when I applied the last patch-bomb series from Andrew, all the commit date-stamps are idential. Now, it would be lovely if the new builtin git-am really was *so* fast that it applies a 100+-patch series in under a second,

Re: [PATCH] git-svn: allow --version to work anywhere

2016-07-28 Thread Junio C Hamano
Eric Wong writes: > Repushed my master in case it's a convenient time to pull. > > The following changes since commit 29493589e97a2de0c4c1c314f61ccafaee3b5caf: > > archive-tar: huge offset and future timestamps would not work on 32-bit > (2016-07-15 10:51:55 -0700) > > are

Re: Alternatives to mid.gmane.org?

2016-07-28 Thread Eric Wong
Duy Nguyen wrote: > I read this and thought "temporarily" but apparently it's not [1]. A > lot of our links in the mail archive are gmane's :( > > [1] https://lars.ingebrigtsen.no/2016/07/28/the-end-of-gmane/ I may not have time to integrate this extensibly into the

Re: git-testadd: Execute a command with only the staged changes in Git applied

2016-07-28 Thread Øyvind A . Holm
On 29 July 2016 at 00:38, Junio C Hamano wrote: > Øyvind A. Holm writes: > > Jakub Narębski wrote: > > > I wonder if using `git worktree` instead of `git clone` (well, > > > local clone uses hardlinks, so it is not that costly as it looks

Re: [RFC] git-format-patch: default to --from to avoid spoofed mails?

2016-07-28 Thread Jeff King
On Thu, Jul 28, 2016 at 04:53:16PM -0700, Josh Triplett wrote: > I can think of aesthetic reasons to want the non-"--from" format (for > instance, sticking patch files into a non-git-based tool like quilt or a > distribution packaging system, and not wanting your own email address > included),

Re: [PATCH va/i18n-even-more] rebase-interactive: trim leading whitespace from progress count

2016-07-28 Thread Junio C Hamano
Jakub Narębski writes: > On the gripping hand, the number of currently processed commits > (instructions) in an interactive rebase is a number, and arithmetic > expansion can be understood as shell equivalent of casting to integer. I get that argument; it is a bit too cute a

Re: [RFC] git-format-patch: default to --from to avoid spoofed mails?

2016-07-28 Thread Josh Triplett
On Thu, Jul 28, 2016 at 02:37:04PM -0700, Junio C Hamano wrote: > Josh Triplett writes: > > > I'd like to propose changing the default behavior of git-format-patch to > > --from (and adding a --from-author option to override, and perhaps a > > config setting). This will

Re: [RFC] git-format-patch: default to --from to avoid spoofed mails?

2016-07-28 Thread Josh Triplett
On Thu, Jul 28, 2016 at 05:56:03PM -0400, Jeff King wrote: > Another way to think about it is that "--from" is a no-brainer when you > really are going to email the patches (and that's why it is has always > been the default behavior in git-send-email). But if you _aren't_ going > to mail the

Re: [RFC] git-format-patch: default to --from to avoid spoofed mails?

2016-07-28 Thread Josh Triplett
On Thu, Jul 28, 2016 at 08:16:19PM -0400, Jeff King wrote: > The question in my mind is whether people actually use format-patch for > things besides emailing, and if the final destination is something other > than "git am". It is a handy format because it is the least-lossy way > to move commits

[PATCH v2 4/7] find_pack_entry: replace last_found_pack with MRU cache

2016-07-28 Thread Jeff King
Each pack has an index for looking up entries in O(log n) time, but if we have multiple packs, we have to scan through them linearly. This can produce a measurable overhead for some operations. We dealt with this long ago in f7c22cc (always start looking up objects in the last used pack first,

[PATCH v2 5/7] pack-objects: break out of want_object loop early

2016-07-28 Thread Jeff King
When pack-objects collects the list of objects to pack (either from stdin, or via its internal rev-list), it filters each one through want_object_in_pack(). This function loops through each existing packfile, looking for the object. When we find it, we mark the pack/offset combo for later use.

[PATCH v2 6/7] pack-objects: compute local/ignore_pack_keep early

2016-07-28 Thread Jeff King
In want_object_in_pack(), we can exit early from our loop if neither "local" nor "ignore_pack_keep" are set. If they are, however, we must examine each pack to see if it has the object and is non-local or has a ".keep". It's quite common for there to be no non-local or .keep packs at all, in

[PATCHv3 1/7] t7406: future proof tests with hard coded depth

2016-07-28 Thread Stefan Beller
The prior hard coded depth was chosen to be exactly the length from the recorded gitlink to the tip of the remote, so if you add more commits to the remote before, this test will not test its intention any more. Signed-off-by: Stefan Beller --- t/t7406-submodule-update.sh |

[PATCHv3 2/7] submodule update: respect depth in subsequent fetches

2016-07-28 Thread Stefan Beller
When depth is given the user may have a reasonable expectation that any remote operation is using the given depth. Add a test to demonstrate we still get the desired sha1 even if the depth is too short to include the actual commit. Signed-off-by: Stefan Beller ---

[PATCHv3 6/7] submodule--helper: add remote-branch helper

2016-07-28 Thread Stefan Beller
In a later patch we want to enhance the logic for the branch selection. Rewrite the current logic to be in C, so we can directly use C when we enhance the logic. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 28 +++- git-submodule.sh

[PATCHv3 3/7] submodule update: narrow scope of local variable

2016-07-28 Thread Stefan Beller
Signed-off-by: Stefan Beller --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index 174f4ea..0d4021f 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -591,7 +591,6 @@ cmd_update()

[PATCHv3 5/7] submodule-config: keep configured branch around

2016-07-28 Thread Stefan Beller
The branch field will be used in a later patch by `submodule update`. Signed-off-by: Stefan Beller --- submodule-config.c | 11 ++- submodule-config.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/submodule-config.c b/submodule-config.c index

[PATCHv3 7/7] submodule update: allow '.' for branch value

2016-07-28 Thread Stefan Beller
Gerrit has a "superproject subscription" feature[1], that triggers a commit in a superproject that is subscribed to its submodules. Conceptually this Gerrit feature can be done on the client side with Git via (except for raciness, error handling etc): while [ true ]; do git -C submodule

[PATCHv3 4/7] submodule--helper: fix usage string for relative-path

2016-07-28 Thread Stefan Beller
Internally we call the underscore version of relative_path, but externally we present an API with no underscores. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/submodule--helper.c

[PATCHv3 0/7] submodule update: allow '.' for branch value

2016-07-28 Thread Stefan Beller
This got bigger than expected, but I am happier with the results. The meat is found in the last patch. (At least what I am interested in; others may be more interested in the second patch which could be argued to be a real bug fix to be merged down to maint.) Thanks Junio for the thourough

[PATCH v2 2/7] sha1_file: drop free_pack_by_name

2016-07-28 Thread Jeff King
The point of this function is to drop an entry from the "packed_git" cache that points to a file we might be overwriting, because our contents may not be the same (and hence the only caller was pack-objects as it moved a temporary packfile into place). In older versions of git, this could happen

[PATCH v2 3/7] add generic most-recently-used list

2016-07-28 Thread Jeff King
There are a few places in Git that would benefit from a fast most-recently-used cache (e.g., the list of packs, which we search linearly but would like to order based on locality). This patch introduces a generic list that can be used to store arbitrary pointers in most-recently-used order. The

[PATCH v2 1/7] t/perf: add tests for many-pack scenarios

2016-07-28 Thread Jeff King
Git's pack storage does efficient (log n) lookups in a single packfile's index, but if we have multiple packfiles, we have to linearly search each for a given object. This patch introduces some timing tests for cases where we have a large number of packs, so that we can measure any improvements

Re: Small trivial annoyance with the nice new builtin "git am"

2016-07-28 Thread Jeff King
On Thu, Jul 28, 2016 at 04:47:17PM -0700, Junio C Hamano wrote: > Also makes me wonder if "git cherry-pick A..B" shares the same > breakage. Probably. I guess we want something like: diff --git a/ident.c b/ident.c index 139c528..e20a772 100644 --- a/ident.c +++ b/ident.c @@ -184,6 +184,11 @@

Re: Small trivial annoyance with the nice new builtin "git am"

2016-07-28 Thread Linus Torvalds
On Thu, Jul 28, 2016 at 5:29 PM, Jeff King wrote: > > I guess we want something like: > > +void reset_ident_date(void) > +{ > + strbuf_reset(_default_date); > +} Looks sane. > and then to sprinkle calls liberally through builtin-ified programs when > they move from one unit

Re: [PATCHv1] completion: add option '--recurse-submodules' to 'git clone'

2016-07-28 Thread Stefan Beller
On Thu, Jul 28, 2016 at 9:22 AM, Junio C Hamano wrote: > Stefan Beller writes: > >>> Anyway, I'll apply the "addition to the completion" patch. >>> >>> Thanks. >> >> Thanks for this patch! >> >> Note: if we ever decide to resurrect

[PATCH v2 0/7] speed up pack-objects counting with many packs

2016-07-28 Thread Jeff King
This is a follow-up to the patches in http://public-inbox.org/git/20160725184938.ga12...@sigill.intra.peff.net/ that are currently queued in jk/pack-objects-optim-skimming. Roughly, they try to optimize a loop that is O(nr_objects * nr_packs) by breaking out early in some cases. I had written

Re: [PATCH v2 7/7] pack-objects: use mru list when iterating over packs

2016-07-28 Thread Jeff King
On Fri, Jul 29, 2016 at 12:15:24AM -0400, Jeff King wrote: > Note that this reordering does have a potential impact on > the final pack, as we store only a single "found" pack for > each object, even if it is present in multiple packs. In > principle, any copy is acceptable, as they all refer to

Re: Small trivial annoyance with the nice new builtin "git am"

2016-07-28 Thread Linus Torvalds
On Thu, Jul 28, 2016 at 5:21 PM, Jeff King wrote: > > I do wonder if you would be happier giving each commit a "fake" > monotonically increasing time, so they are correctly ordered by commit > date. No, that would be nasty, partly for the corner case you mention, but partly

[PATCH v2 7/7] pack-objects: use mru list when iterating over packs

2016-07-28 Thread Jeff King
In the original implementation of want_object_in_pack(), we always looked for the object in every pack, so the order did not matter for performance. As of the last few patches, however, we can now often break out of the loop early after finding the first instance, and avoid looking in the other

Re: git-testadd: Execute a command with only the staged changes in Git applied

2016-07-28 Thread Jakub Narębski
W dniu 2016-07-28 o 18:56, Øyvind A. Holm pisze: > On 28 July 2016 at 18:37, Junio C Hamano wrote: >> Øyvind A. Holm writes: >>> This is a script I created some weeks ago, and I've found it to be >>> immensely useful. Here is a snippet from git-testadd

Re: [PATCHv2 2/2] submodule update: allow '.' for branch value

2016-07-28 Thread Stefan Beller
On Thu, Jul 28, 2016 at 12:10 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Gerrit has a "superproject subscription" feature[1], that triggers a >> commit in a superproject that is subscribed to its submodules. >> Conceptually this Gerrit feature

Re: [PATCH 1/2] t7406: correct depth test in shallow test

2016-07-28 Thread Junio C Hamano
Stefan Beller writes: > The depth of 2 I chose originally turns out to be a lucky > accident too, as the depth from "Commit 2" is 2, > so that we would observe the same depth no matter if > a --depth 2 was given and working or not. > > I'll redo this test (as 2 tests, one is

Re: [PATCHv2 2/2] submodule update: allow '.' for branch value

2016-07-28 Thread Junio C Hamano
Stefan Beller writes: > Well I wanted to express: > > The .gitmodules used in these Gerrit projects do not conform > to Gits understanding of how .gitmodules should look like. > Let's make Git understand this Gerrit corner case (which you > would only need when using

Re: Alternatives to mid.gmane.org?

2016-07-28 Thread Eric Wong
Duy Nguyen wrote: > On Thu, Jul 28, 2016 at 11:11 AM, Lars Schneider > wrote: > > Hi, > > > > gmane is down At least the following should work in case public-inbox fails: https://mid.mail-archive.com/%s https://marc.info/?i=%s

Re: [PATCHv2 2/2] submodule update: allow '.' for branch value

2016-07-28 Thread Junio C Hamano
Stefan Beller writes: > Gerrit has a "superproject subscription" feature[1], that triggers a > commit in a superproject that is subscribed to its submodules. > Conceptually this Gerrit feature can be done on the client side with > Git via: > > git -C submodule update

Re: [PATCH 1/2] t7406: correct depth test in shallow test

2016-07-28 Thread Stefan Beller
On Thu, Jul 28, 2016 at 11:47 AM, Stefan Beller wrote: > On Thu, Jul 28, 2016 at 11:39 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> We used to ask for 3 changes and tested for having 1, so the test >>> seems broken. >> >> I

[PATCHv2 2/2] submodule update: allow '.' for branch value

2016-07-28 Thread Stefan Beller
Gerrit has a "superproject subscription" feature[1], that triggers a commit in a superproject that is subscribed to its submodules. Conceptually this Gerrit feature can be done on the client side with Git via: git -C submodule update --remote --force git -C commit -a -m "Update

  1   2   >