Re: [PATCH v2 3/3] gitweb: Link to "git describe"'d commits in log messages

2016-10-14 Thread Jakub Narębski
W dniu 06.10.2016 o 11:11, Ævar Arnfjörð Bjarmason pisze: > Change the log formatting function to know about "git describe" output > such as "v2.8.0-4-g867ad08", in addition to just plain "867ad08". > > There are still many valid refnames that we don't link to > e.g. v2.10.0-rc1~2^2~1 is also a

Automagic `git checkout branchname` mysteriously fails

2016-10-14 Thread Martin Langhoff
In a (private) repo project I have, I recently tried (and failed) to do: git checkout v4.1-support getting a "pathspec did not match any files known to git" error. There's an origin/v4.1-support, there is no v4.1-support "local" branch. Creating the tracking branch explicitly worked. Other

Re: [PATCH v15 14/27] t6030: no cleanup with bad merge base

2016-10-14 Thread Junio C Hamano
Pranit Bauva writes: > +test_expect_success 'check whether bisection cleanup is not done with bad > merges' ' > + git bisect start $HASH7 $SIDE_HASH7 && > + test_expect_failure git bisect bad >out 2>out && I think you meant "test_must_fail" here. > +

Re: Automagic `git checkout branchname` mysteriously fails

2016-10-14 Thread Martin Langhoff
On Fri, Oct 14, 2016 at 4:58 PM, Kevin Daudt wrote: > Correct, this only works when it's unambiguous what branch you actually > mean. That's not surprising, but there isn't a warning. IMHO, finding several branch matches is a strong indication that it'll be worth reporting to the

Re: Automagic `git checkout branchname` mysteriously fails

2016-10-14 Thread Kevin Daudt
On Fri, Oct 14, 2016 at 04:25:49PM -0400, Martin Langhoff wrote: > In a (private) repo project I have, I recently tried (and failed) to do: > > git checkout v4.1-support > > getting a "pathspec did not match any files known to git" error. > > There's an origin/v4.1-support, there is no

Re: Huge performance bottleneck reading packs

2016-10-14 Thread Jakub Narębski
W dniu 13.10.2016 o 11:04, Vegard Nossum pisze: > On 10/13/2016 01:47 AM, Jeff King wrote: >> On Wed, Oct 12, 2016 at 07:18:07PM -0400, Jeff King wrote: >> >>> Also, is it possible to make the repository in question available? I >>> might be able to reproduce based on your description, but it

Re: [RFC] test-lib: detect common misuse of test_expect_failure

2016-10-14 Thread Jeff King
On Fri, Oct 14, 2016 at 03:38:41PM -0700, Junio C Hamano wrote: > It is a very easy mistake to make to say test_expect_failure when > making sure a step in the test fails, which must be spelled > "test_must_fail". By introducing a toggle $test_in_progress that is > turned on at the beginning of

[RFC] test-lib: detect common misuse of test_expect_failure

2016-10-14 Thread Junio C Hamano
It is a very easy mistake to make to say test_expect_failure when making sure a step in the test fails, which must be spelled "test_must_fail". By introducing a toggle $test_in_progress that is turned on at the beginning of test_start_() and off at the end of test_finish_() helper, we can detect

[PATCH v4 07/25] sequencer: refactor the code to obtain a short commit name

2016-10-14 Thread Johannes Schindelin
Not only does this DRY up the code (providing a better documentation what the code is about, as well as allowing to change the behavior in a single place), it also makes it substantially shorter to use the same functionality in functions to be introduced when we teach the sequencer to process

[PATCH 2/2] resolve_ref_unsafe(): limit the number of "stat_ref" retries

2016-10-14 Thread Petr Stodulka
From: Michael Haggerty If there is a broken symlink where a loose reference file is expected, then the attempt to open() it fails with ENOENT. This error is misinterpreted to mean that the loose reference file itself has disappeared due to a race, causing the lookup to be

Can we make interactive add easier to use?

2016-10-14 Thread Robert Dailey
Normally when I use interactive add, I just want to add files to the index via simple numbers, instead of typing paths. So I'll do this as quick as I can: 1. Type `git add -i` 2. Press `u` after prompt appears 3. Press numbers for the files I want to add, ENTER key 4. ENTER key again to go back

[PATCH v4 02/25] sequencer: use memoized sequencer directory path

2016-10-14 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- builtin/commit.c | 2 +- sequencer.c | 11 ++- sequencer.h | 5 + 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index 1cba3b7..9fddb19 100644 ---

[PATCH 1/2] Add test for ls-tree with broken symlink under refs/heads

2016-10-14 Thread Petr Stodulka
git ls-tree goes into an infinite loop while serving pretty vanilla requests, if the refs/heads/ directory contains a symlink that's broken. Added test which check if git ends with expected exit code or timeout expires. --- t/t3103-ls-tree-misc.sh | 9 + 1 file changed, 9 insertions(+)

[PATCH v4 24/25] sequencer: start error messages consistently with lower case

2016-10-14 Thread Johannes Schindelin
Quite a few error messages touched by this developer during the work to speed up rebase -i started with an upper case letter, violating our current conventions. Instead of sneaking in this fix (and forgetting quite a few error messages), let's just have one wholesale patch fixing all of the error

[PATCH v4 04/25] sequencer: future-proof remove_sequencer_state()

2016-10-14 Thread Johannes Schindelin
In a couple of commits, we will teach the sequencer to handle the nitty gritty of the interactive rebase, which keeps its state in a different directory. Signed-off-by: Johannes Schindelin --- sequencer.c | 21 + 1 file changed, 13 insertions(+),

[PATCH v4 20/25] sequencer: refactor write_message()

2016-10-14 Thread Johannes Schindelin
The write_message() function safely writes an strbuf to a file. Sometimes it is inconvenient to require an strbuf, though: the text to be written may not be stored in a strbuf, or the strbuf should not be released after writing. Let's refactor "safely writing string to a file" into

[PATCH v4 10/25] sequencer: avoid completely different messages for different actions

2016-10-14 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- sequencer.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sequencer.c b/sequencer.c index eac531b..9bca056 100644 --- a/sequencer.c +++ b/sequencer.c @@ -229,11 +229,8 @@ static int

[PATCH v4 13/25] sequencer: prepare for rebase -i's commit functionality

2016-10-14 Thread Johannes Schindelin
In interactive rebases, we commit a little bit differently than the sequencer did so far: we heed the "author-script", the "message" and the "amend" files in the .git/rebase-merge/ subdirectory. Likewise, we may want to edit the commit message *even* when providing a file containing the suggested

[PATCH v4 09/25] sequencer: strip CR from the todo script

2016-10-14 Thread Johannes Schindelin
It is not unheard of that editors on Windows write CR/LF even if the file originally had only LF. This is particularly awkward for exec lines of a rebase -i todo sheet. Take for example the insn "exec echo": The shell script parser splits at the LF and leaves the CR attached to "echo", which leads

[PATCH v4 23/25] sequencer: quote filenames in error messages

2016-10-14 Thread Johannes Schindelin
This makes the code consistent by fixing quite a couple of error messages. Suggested by Jakub Narębski. Signed-off-by: Johannes Schindelin --- sequencer.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sequencer.c

[PATCH v4 22/25] sequencer: mark action_name() for translation

2016-10-14 Thread Johannes Schindelin
The definition of this function goes back all the way to 043a449 (sequencer: factor code out of revert builtin, 2012-01-11), long before a serious effort was made to translate all the error messages. It is slightly out of the context of the current patch series (whose purpose it is to

[PATCH v4 11/25] sequencer: get rid of the subcommand field

2016-10-14 Thread Johannes Schindelin
The subcommands are used exactly once, at the very beginning of sequencer_pick_revisions(), to determine what to do. This is an unnecessary level of indirection: we can simply call the correct function to begin with. So let's do that. While at it, ensure that the subcommands return an error code

[PATCH 0/2] infinite loop in "git ls-tree" for broken symlink

2016-10-14 Thread Petr Stodulka
Hi, I have realized that this wasn't fixed after all when refs.c was "rewritten". Issue is caused by broken symlink under refs/heads, which causes infinite loop for "git ls-tree" command. It was replied earlier [0] and Michael previously fixed that in better way probably, then my proposed patch

[PATCH v4 12/25] sequencer: remember the onelines when parsing the todo file

2016-10-14 Thread Johannes Schindelin
The `git-rebase-todo` file contains a list of commands. Most of those commands have the form The is displayed primarily for the user's convenience, as rebase -i really interprets only the part. However, there are *some* places in interactive rebase where the is used to display

[PATCH v4 08/25] sequencer: completely revamp the "todo" script parsing

2016-10-14 Thread Johannes Schindelin
When we came up with the "sequencer" idea, we really wanted to have kind of a plumbing equivalent of the interactive rebase. Hence the choice of words: the "todo" script, a "pick", etc. However, when it came time to implement the entire shebang, somehow this idea got lost and the sequencer was

[PATCH 2/3] i18n: apply: mark info messages for translation

2016-10-14 Thread Vasco Almeida
Mark messages for translation printed to stderr. Signed-off-by: Vasco Almeida --- apply.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apply.c b/apply.c index 201d3a7..13b2064 100644 --- a/apply.c +++ b/apply.c @@ -3554,7 +3554,7 @@ static

[PATCH 1/3] i18n: apply: mark plural string for translation

2016-10-14 Thread Vasco Almeida
Mark plural string for translation using Q_(). Signed-off-by: Vasco Almeida --- apply.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apply.c b/apply.c index b03d274..201d3a7 100644 --- a/apply.c +++ b/apply.c @@ -4869,10 +4869,12 @@ int

[PATCH 3/3] i18n: apply: mark error messages for translation

2016-10-14 Thread Vasco Almeida
Mark error messages for translation passed to error() and die() functions. Signed-off-by: Vasco Almeida --- apply.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/apply.c b/apply.c index

[PATCH v4 17/25] sequencer: support cleaning up commit messages

2016-10-14 Thread Johannes Schindelin
The run_git_commit() function already knows how to amend commits, and with this new option, it can also clean up commit messages (i.e. strip out commented lines). This is needed to implement rebase -i's 'fixup' and 'squash' commands as sequencer commands. Signed-off-by: Johannes Schindelin

[PATCH v4 15/25] sequencer: allow editing the commit message on a case-by-case basis

2016-10-14 Thread Johannes Schindelin
In the upcoming commits, we will implement more and more of rebase -i's functionality inside the sequencer. One particular feature of the commands to come is that some of them allow editing the commit message while others don't, i.e. we cannot define in the replay_opts whether the commit message

[PATCH v4 16/25] sequencer: support amending commits

2016-10-14 Thread Johannes Schindelin
This teaches the run_git_commit() function to take an argument that will allow us to implement "todo" commands that need to amend the commit messages ("fixup", "squash" and "reword"). Signed-off-by: Johannes Schindelin --- sequencer.c | 6 -- 1 file changed, 4

[PATCH v4 18/25] sequencer: do not try to commit when there were merge conflicts

2016-10-14 Thread Johannes Schindelin
The return value of do_recursive_merge() may be positive (indicating merge conflicts), or 0 (indicating success). It also may be negative, indicating a fatal error that requires us to abort. Now, if the return value indicates that there are merge conflicts, we should not try to commit those

[PATCH v4 14/25] sequencer: introduce a helper to read files written by scripts

2016-10-14 Thread Johannes Schindelin
As we are slowly teaching the sequencer to perform the hard work for the interactive rebase, we need to read files that were written by shell scripts. These files typically contain a single line and are invariably ended by a line feed (and possibly a carriage return before that). Let's use a

Re: [PATCH 0/2] infinite loop in "git ls-tree" for broken symlink

2016-10-14 Thread Jeff King
On Fri, Oct 14, 2016 at 03:16:50PM +0200, Petr Stodulka wrote: > I have realized that this wasn't fixed after all when refs.c > was "rewritten". Issue is caused by broken symlink under refs/heads, > which causes infinite loop for "git ls-tree" command. It was replied > earlier [0] and Michael

Re: Can we make interactive add easier to use?

2016-10-14 Thread Matthieu Moy
Robert Dailey writes: > Normally when I use interactive add, I just want to add files to the > index via simple numbers, instead of typing paths. So I'll do this as > quick as I can: > > 1. Type `git add -i` > 2. Press `u` after prompt appears > 3. Press numbers for the

[PATCH v4 00/25] Prepare the sequencer for the upcoming rebase -i patches

2016-10-14 Thread Johannes Schindelin
This patch series marks the '4' in the countdown to speed up rebase -i by implementing large parts in C (read: there will be three more patch series after that before the full benefit hits git.git: sequencer-i, rebase--helper and rebase-i-extra). It is based on the `libify-sequencer` patch series

[PATCH v4 01/25] sequencer: use static initializers for replay_opts

2016-10-14 Thread Johannes Schindelin
This change is not completely faithful: instead of initializing all fields to 0, we choose to initialize command and subcommand to -1 (instead of defaulting to REPLAY_REVERT and REPLAY_NONE, respectively). Practically, it makes no difference at all, but future-proofs the code to require explicit

Re: [PATCH v15 01/27] bisect--helper: use OPT_CMDMODE instead of OPT_BOOL

2016-10-14 Thread Pranit Bauva
Hey everyone, It took me some time to get to the next version as I was a bit preoccupied with my assignments and exams. The diff between the v14[1] and v15[2] can be found here[3] because gmail web client will wrap the lines. Thanks Junio for the reviews in v14. I have tried to solves every issue

Re: [PATCHv3] attr: convert to new threadsafe API

2016-10-14 Thread Junio C Hamano
Junio C Hamano writes: > *1* Would we need a wrapping struct around the array of results? By the way, I do see a merit on the "check" side (tl;dr: but I do not think "result" needs it, hence I do not see the need for the "ugly" variants). Take "archive" for example. For

[PATCH v15 16/27] bisect--helper: retire `--bisect-clean-state` subcommand

2016-10-14 Thread Pranit Bauva
The `bisect-clean-state` subcommand is no longer used in the shell script while the C code uses `bisect_clean_state()` thus remove the subcommand. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva

Re: [PATCH 0/2] infinite loop in "git ls-tree" for broken symlink

2016-10-14 Thread Petr Stodulka
Thank you for info, I totally missed that. Yes, this fixes the issue perfectly. Petr On 14.10.2016 15:42, Jeff King wrote: > On Fri, Oct 14, 2016 at 03:16:50PM +0200, Petr Stodulka wrote: > >> I have realized that this wasn't fixed after all when refs.c >> was "rewritten". Issue is caused by

[PATCH v15 15/27] bisect--helper: `bisect_next` and `bisect_auto_next` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement the `bisect_next` and the `bisect_auto_next` shell function in C and add the subcommands to `git bisect--helper` to call it from git-bisect.sh . Along with this conversion of `bisect_start` has also finished and thus it has been fully ported to C. A lot of parts of bisect.c uses

[PATCH v15 22/27] bisect--helper: `bisect_log` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement the `bisect_log` shell function in C and also add `--bisect-log` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-log` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As more functions are ported,

[PATCH v15 07/27] bisect--helper: `bisect_reset` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement `bisect_reset` shell function in C and add a `--bisect-reset` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `bisect_reset` subcommand is a temporary measure to port shell functions to C so as to use the existing test suite. As more functions are ported, this

[PATCH v15 05/27] t6030: explicitly test for bisection cleanup

2016-10-14 Thread Pranit Bauva
Add test to explicitly check that 'git bisect reset' is working as expected. This is already covered implicitly by the test suite. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva

[PATCH v15 21/27] bisect--helper: retire `--write-terms` subcommand

2016-10-14 Thread Pranit Bauva
The `--write-terms` subcommand is no longer used in the shell script and the function `write_terms()` is called from the C implementation of `set_terms()` and `bisect_start()`. Mentored-by: Lars Schneider Mentored-by: Christian Couder

[PATCH v15 06/27] wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()

2016-10-14 Thread Pranit Bauva
is_empty_file() can help to refactor a lot of code. This will be very helpful in porting "git bisect" to C. Suggested-by: Torsten Bögershausen Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva

[PATCH v15 13/27] bisect--helper: `bisect_start` shell function partially in C

2016-10-14 Thread Pranit Bauva
Reimplement the `bisect_start` shell function partially in C and add `bisect-start` subcommand to `git bisect--helper` to call it from git-bisect.sh . The last part is not converted because it calls another shell function `bisect_start` shell function will be completed after the `bisect_next`

[PATCH v15 10/27] bisect--helper: `check_and_set_terms` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement the `check_and_set_terms` shell function in C and add `check-and-set-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--check-and-set-terms` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more

[PATCH v15 04/27] bisect--helper: `bisect_clean_state` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement `bisect_clean_state` shell function in C and add a `bisect-clean-state` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-clean-state` subcommand is a measure to port shell function to C so as to use the existing test suite. As more functions are

[PATCH v15 09/27] bisect--helper: `bisect_write` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement the `bisect_write` shell function in C and add a `bisect-write` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--bisect-write` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more functions are ported,

[PATCH v15 14/27] t6030: no cleanup with bad merge base

2016-10-14 Thread Pranit Bauva
The bisection cleanup should be performed with bad merge base so that the user can return to its original position with `git bisect reset`. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva

[PATCH v15 12/27] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement the `get_terms` and `bisect_terms` shell function in C and add `bisect-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-terms` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more functions

[PATCH v15 20/27] bisect--helper: retire `--check-expected-revs` subcommand

2016-10-14 Thread Pranit Bauva
The `--check-expected-revs` subcommand is no longer used in the shell script and the function `check_expected_revs()` is called from the C implementation of `bisect_next()`. Mentored-by: Lars Schneider Mentored-by: Christian Couder

[PATCH v15 01/27] bisect--helper: use OPT_CMDMODE instead of OPT_BOOL

2016-10-14 Thread Pranit Bauva
`--next-all` is meant to be used as a subcommand to support multiple "operation mode" though the current implementation does not contain any other subcommand along side with `--next-all` but further commits will include some more subcommands. Helped-by: Johannes Schindelin

[PATCH v15 19/27] bisect--helper: `bisect_state` & `bisect_head` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement the `bisect_state` shell function in C and also add a subcommand `--bisect-state` to `git-bisect--helper` to call it from git-bisect.sh . Using `--bisect-state` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As more functions are

[PATCH v15 18/27] bisect--helper: `bisect_autostart` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement the `bisect_autostart` shell function in C and add the C implementation from `bisect_next()` which was previously left uncovered. Also add a subcommand `--bisect-autostart` to `git bisect--helper` be called from `bisect_state()` from git-bisect.sh . Using `--bisect-autostart`

[PATCH v15 02/27] bisect: rewrite `check_term_format` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement the `check_term_format` shell function in C and add a `--check-term-format` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--check-term-format` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As more

Why does git checkout -b touch the index?

2016-10-14 Thread David Turner
If I do "git checkout -b fleem", with no additional flags, why does it need to rewrite the index? Or even read the index? (this is kind of a bug report, I guess, but it's a pretty minor bug that I only noticed because I was out of hard drive space)

[PATCH v15 25/27] bisect--helper: retire `--bisect-autostart` subcommand

2016-10-14 Thread Pranit Bauva
The `--bisect-autostart` subcommand is no longer used in the shell script and the function `bisect_autostart()` is called from the C implementation. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva

[PATCH v15 17/27] bisect--helper: retire `--next-all` subcommand

2016-10-14 Thread Pranit Bauva
The `--next-all` subcommand is no longer used in the shell script and the function `bisect_next_all()` is called from the C implementation of `bisect_next()`. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva

[PATCH v15 26/27] bisect--helper: retire `--bisect-auto-next` subcommand

2016-10-14 Thread Pranit Bauva
The `--bisect-auto-next` subcommand is no longer used in the shell script and the function `bisect_auto_next` is called from the C implementation. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva

[PATCH v15 03/27] bisect--helper: `write_terms` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement the `write_terms` shell function in C and add a `write-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh . Also remove the subcommand `--check-term-format` as it can now be called from inside the function write_terms() C implementation. Also `|| exit` is added

[PATCH v15 08/27] bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement `is_expected_rev` & `check_expected_revs` shell function in C and add a `--check-expected-revs` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--check-expected-revs` subcommand is a temporary measure to port shell functions to C so as to use the existing

[PATCH v15 23/27] bisect--helper: `bisect_replay` shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement the `bisect_replay` shell function in C and also add `--bisect-replay` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--bisect-replay` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As more functions are

[PATCH v15 24/27] bisect--helper: retire `--bisect-write` subcommand

2016-10-14 Thread Pranit Bauva
The `--bisect-write` subcommand is no longer used in the shell script and the function `bisect_write()` is called from the C implementation. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva

Re: Huge performance bottleneck reading packs

2016-10-14 Thread Vegard Nossum
On 10/13/2016 10:43 PM, Jeff King wrote: No problem. I do think you'll benefit a lot from packing everything into a single pack, but it's also clear that Git was doing more work than it needed to be. This was a known issue when we added the racy-check to has_sha1_file(), and knew that we might

Re: [PATCH v2 2/3] gitweb: Link to 7-char+ SHA1s, not only 8-char+

2016-10-14 Thread Jakub Narębski
W dniu 06.10.2016 o 11:11, Ævar Arnfjörð Bjarmason pisze: > Change the minimum length of an abbreviated object identifier in the > commit message gitweb tries to turn into link from 8 hexchars to 7. > > This arbitrary minimum length of 8 was introduced in bfe2191 ("gitweb: > SHA-1 in commit log

Re: [PATCH v2 1/3] gitweb: Fix a typo in a comment

2016-10-14 Thread Jakub Narębski
W dniu 06.10.2016 o 11:11, Ævar Arnfjörð Bjarmason napisał: > Change a typo'd MIME type in a comment. The Content-Type is > application/xhtml+xml, not application/xhtm+xml. > > Fixes up code originally added in 53c4031 ("gitweb: Strip > non-printable characters from syntax highlighter output",

[PATCH v3 4/6] trailer: make args have their own struct

2016-10-14 Thread Jonathan Tan
Improve type safety by making arguments (whether from configuration or from the command line) have their own "struct arg_item" type, separate from the "struct trailer_item" type used to represent the trailers in the buffer being manipulated. This change also prepares "struct trailer_item" to be

[PATCH v3 2/6] trailer: use list.h for doubly-linked list

2016-10-14 Thread Jonathan Tan
Replace the existing handwritten implementation of a doubly-linked list in trailer.c with the functions and macros from list.h. This significantly simplifies the code. Signed-off-by: Jonathan Tan --- trailer.c | 258

[PATCH v3 3/6] trailer: streamline trailer item create and add

2016-10-14 Thread Jonathan Tan
Currently, creation and addition (to a list) of trailer items are spread across multiple functions. Streamline this by only having 2 functions: one to parse the user-supplied string, and one to add the parsed information to a list. Signed-off-by: Jonathan Tan ---

[PATCH v3 6/6] trailer: support values folded to multiple lines

2016-10-14 Thread Jonathan Tan
Currently, interpret-trailers requires that a trailer be only on 1 line. For example: a: first line second line would be interpreted as one trailer line followed by one non-trailer line. Make interpret-trailers support RFC 822-style folding, treating those lines as one logical trailer.

[PATCH v3 5/6] trailer: allow non-trailers in trailer block

2016-10-14 Thread Jonathan Tan
Currently, interpret-trailers requires all lines of a trailer block to be trailers (or comments) - if not it would not identify that block as a trailer block, and thus create its own trailer block, inserting a blank line. For example: echo -e "\na: b\nnot trailer" | git interpret-trailers

[PATCH v3 1/6] trailer: improve const correctness

2016-10-14 Thread Jonathan Tan
Change "const char *" to "char *" in struct trailer_item and in the return value of apply_command (since those strings are owned strings). Change "struct conf_info *" to "const struct conf_info *" (since that struct is not modified). Signed-off-by: Jonathan Tan ---

[PATCH v3 0/6] allow non-trailers and multiple-line trailers

2016-10-14 Thread Jonathan Tan
Ah, I knew I forgot something. These are exactly the same as v2, except that these are signed off. Jonathan Tan (6): trailer: improve const correctness trailer: use list.h for doubly-linked list trailer: streamline trailer item create and add trailer: make args have their own struct

Re: [PATCH] fetch: use "quick" has_sha1_file for tag following

2016-10-14 Thread Junio C Hamano
Jeff King writes: > So it's certainly better. But 7500 packs is just silly, and squeezing > out ~400ms there is hardly worth it. If you repack this same case into a > single pack, the command drops to 5ms. So yes, there's close to an order > of magnitude speedup here, but you get

Re: [PATCH v2 2/6] trailer: use list.h for doubly-linked list

2016-10-14 Thread Jakub Narębski
W dniu 13.10.2016 o 01:40, Jonathan Tan pisze: > Replace the existing handwritten implementation of a doubly-linked list > in trailer.c with the functions and macros from list.h. This > significantly simplifies the code. > --- > trailer.c | 258 >

[PATCH v15 11/27] bisect--helper: `bisect_next_check` & bisect_voc shell function in C

2016-10-14 Thread Pranit Bauva
Reimplement `bisect_next_check` shell function in C and add `bisect-next-check` subcommand to `git bisect--helper` to call it from git-bisect.sh . Also reimplement `bisect_voc` shell function in C and call it from `bisect_next_check` implementation in C. Using `--bisect-next-check` is a

Re: What's cooking in git.git (Oct 2016, #03; Tue, 11)

2016-10-14 Thread Junio C Hamano
Johannes Schindelin writes: >> >> * sb/submodule-ignore-trailing-slash (2016-10-10) 2 commits >> >> (merged to 'next' on 2016-10-11 at e37425ed17) >> >> + submodule: ignore trailing slash in relative url >> >> + submodule: ignore trailing slash on superproject URL

Re: [PATCH v3 13/25] sequencer: prepare for rebase -i's commit functionality

2016-10-14 Thread Junio C Hamano
Johannes Schindelin writes: >> I think my puzzlement comes from here. What makes it OK for "am" to >> expect the contents of author-script file to be quoted but it is not >> OK to expect the same here? What makes it not quoted for _this_ >> reader, in other words? >

Re: Formatting problem send_mail in version 2.10.0

2016-10-14 Thread Junio C Hamano
Matthieu Moy writes: > We clearly can't guess, but we can be consistent with Mail::Address, so > that git's behavior depends less on its availability. > > Patch follows doing that. Thanks. I love that somebody counters with a much better way to solve it whenever I

Re: Uninitialized submodules as symlinks

2016-10-14 Thread Junio C Hamano
Kevin Daudt writes: > On Thu, Oct 13, 2016 at 06:10:17PM +0200, Heiko Voigt wrote: >> On Fri, Oct 07, 2016 at 06:17:05PM +, David Turner wrote: >> > Presently, uninitialized submodules are materialized in the working >> > tree as empty directories. We would like to consider

Re: Why does git checkout -b touch the index?

2016-10-14 Thread Junio C Hamano
David Turner writes: > If I do "git checkout -b fleem", with no additional flags, why does it > need to rewrite the index? Or even read the index? The "reading" part can be explained easily. It needs to show the list of dirty paths, which involves reading the index,

[PATCH v15 27/27] bisect--helper: remove the dequote in bisect_start()

2016-10-14 Thread Pranit Bauva
Dequoting the arguments was introduced in 25b48b5c to port the function `bisect_next()` but after the `bisect_replay()` porting, the dequoting is carried out itself when it passes the arguments to `bisect_start()` in a simpler way thus dequoting again isn't required. So remove the extra

Re: [PATCH 2/2] resolve_ref_unsafe(): limit the number of "stat_ref" retries

2016-10-14 Thread Petr Stodulka
FYI, I modified the patch slightly. On 14.10.2016 15:16, Petr Stodulka wrote: > From: Michael Haggerty > > If there is a broken symlink where a loose reference file is expected, > then the attempt to open() it fails with ENOENT. This error is > misinterpreted to mean that

[PATCH v4 25/25] sequencer: mark all error messages for translation

2016-10-14 Thread Johannes Schindelin
There was actually only one error message that was not yet marked for translation. Signed-off-by: Johannes Schindelin --- sequencer.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/sequencer.c b/sequencer.c index

[PATCH v4 21/25] sequencer: remove overzealous assumption in rebase -i mode

2016-10-14 Thread Johannes Schindelin
The sequencer was introduced to make the cherry-pick and revert functionality available as library function, with the original idea being to extend the sequencer to also implement the rebase -i functionality. The test to ensure that all of the commands in the script are identical to the overall

[PATCH v4 03/25] sequencer: avoid unnecessary indirection

2016-10-14 Thread Johannes Schindelin
We really do not need the *pointer to a* pointer to the options in the read_populate_opts() function. Signed-off-by: Johannes Schindelin --- sequencer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index

[PATCH v4 19/25] sequencer: left-trim lines read from the script

2016-10-14 Thread Johannes Schindelin
Interactive rebase's scripts may be indented; we need to handle this case, too, now that we prepare the sequencer to process interactive rebases. Signed-off-by: Johannes Schindelin --- sequencer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sequencer.c

[PATCH v4 06/25] sequencer: future-proof read_populate_todo()

2016-10-14 Thread Johannes Schindelin
Over the next commits, we will work on improving the sequencer to the point where it can process the todo script of an interactive rebase. To that end, we will need to teach the sequencer to read interactive rebase's todo file. In preparation, we consolidate all places where that todo file is

[PATCH v4 05/25] sequencer: eventually release memory allocated for the option values

2016-10-14 Thread Johannes Schindelin
The sequencer is our attempt to lib-ify cherry-pick. Yet it behaves like a one-shot command when it reads its configuration: memory is allocated and released only when the command exits. This is kind of okay for git-cherry-pick, which *is* a one-shot command. All the work to make the sequencer

Re: [PATCH] fetch: use "quick" has_sha1_file for tag following

2016-10-14 Thread Jeff King
On Fri, Oct 14, 2016 at 10:39:52AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > So it's certainly better. But 7500 packs is just silly, and squeezing > > out ~400ms there is hardly worth it. If you repack this same case into a > > single pack, the command drops to 5ms.

Re: Huge performance bottleneck reading packs

2016-10-14 Thread Jeff King
On Fri, Oct 14, 2016 at 08:55:29AM +0200, Vegard Nossum wrote: > On 10/13/2016 10:43 PM, Jeff King wrote: > > No problem. I do think you'll benefit a lot from packing everything into > > a single pack, but it's also clear that Git was doing more work than it > > needed to be. This was a known

Re: [PATCH v2 3/3] gitweb: Link to "git describe"'d commits in log messages

2016-10-14 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > I just ran into an example of a better reason for doing it like my > patch is doing, which is that if you have some tag like: > > deployment-20160928-171914-16-g42e13d8 > > With my patch the whole thing will be a link to the 42e13d8 commit, >

Re: [PATCH v2 3/3] gitweb: Link to "git describe"'d commits in log messages

2016-10-14 Thread Ævar Arnfjörð Bjarmason
On Sun, Oct 9, 2016 at 1:20 PM, Ævar Arnfjörð Bjarmason wrote: > On Thu, Oct 6, 2016 at 9:51 PM, Junio C Hamano wrote: >> Ævar Arnfjörð Bjarmason writes: >> >>> Change the log formatting function to know about "git describe" output >>>

Re: [PATCH 1/3] i18n: apply: mark plural string for translation

2016-10-14 Thread Junio C Hamano
Vasco Almeida writes: > Mark plural string for translation using Q_(). > > Signed-off-by: Vasco Almeida > --- Thanks for waiting (patiently) for 'master' to become ready to take these three patches.

Re: [PATCH v2 2/6] trailer: use list.h for doubly-linked list

2016-10-14 Thread Junio C Hamano
Jonathan Tan writes: > Replace the existing handwritten implementation of a doubly-linked list > in trailer.c with the functions and macros from list.h. This > significantly simplifies the code. > --- The handcrafted one in trailer.c somehow did not use the common

Re: [PATCH v2 2/3] gitweb: Link to 7-char+ SHA1s, not only 8-char+

2016-10-14 Thread Junio C Hamano
Jakub Narębski writes: > s/SHA1/SHA-1/g in above paragraph (for correctness and consistency). >> >> I think it's fairly dubious to link to things matching [0-9a-fA-F] >> here as opposed to just [0-9a-f], that dates back to the initial >> version of gitweb from 161332a ("first

Re: Can we make interactive add easier to use?

2016-10-14 Thread Jeff King
On Fri, Oct 14, 2016 at 08:20:40AM -0500, Robert Dailey wrote: > Normally when I use interactive add, I just want to add files to the > index via simple numbers, instead of typing paths. So I'll do this as > quick as I can: I'd generally second Matthieu's suggestion to use a combination of "git

  1   2   >