Re: [PATCH] worktree: update is_bare heuristics

2019-04-18 Thread Duy Nguyen
On Fri, Apr 19, 2019 at 1:42 AM Jeff King wrote: > > On Thu, Apr 18, 2019 at 11:30:00AM -0700, Jonathan Tan wrote: > > > > > strbuf_add_absolute_path(&worktree_path, get_git_common_dir()); > > > > - is_bare = !strbuf_strip_suffix(&worktree_path, "/.git"); > > > > - if (is_bare)

[PATCH 4/3] untracked-cache: use FLEX_ALLOC to create internal structs

2019-04-18 Thread Jeff King
On Thu, Apr 18, 2019 at 05:14:08PM -0400, Jeff King wrote: > Just so we don't forget about it, I wrote this fix up as a patch. And in > fact it led to a few other cleanups. I think the first one is definitely > worth doing now, even if there are other similar cases lurking in the > rest of the ind

[PATCH 3/3] untracked-cache: simplify parsing by dropping "len"

2019-04-18 Thread Jeff King
The code which parses untracked-cache extensions from disk keeps a "len" variable, which is the size of the string we are parsing. But since we now have an "end of string" variable, we can just use that to get the length when we need it. This eliminates the need to keep "len" up to date (and remove

[PATCH 2/3] untracked-cache: simplify parsing by dropping "next"

2019-04-18 Thread Jeff King
When we parse an on-disk untracked cache, we have two pointers, "data" and "next". As we parse, we point "next" to the end of an element, and then later update "data" to match. But we actually don't need two pointers. Each parsing step can just update "data" directly from other variables we hold (

[PATCH 1/3] untracked-cache: be defensive about missing NULs in index

2019-04-18 Thread Jeff King
The on-disk format for the untracked-cache extension contains NUL-terminated filenames. We parse these from the mmap'd file using string functions like strlen(). This works fine in the normal case, but if we see a malformed or corrupted index, we might read off the end of our mmap. Instead, let's

[PATCH 0/3] untracked cache parsing fixups

2019-04-18 Thread Jeff King
[+cc Duy as the master of all things untracked-cache] On Fri, Apr 12, 2019 at 10:48:30AM +0900, Junio C Hamano wrote: > > The right thing is probably something like: > > > > eos = memchr(data, '\0', end - data); > > if (!eos) > > return error("malformed untracked cache extension"); > >

Re: [GSoC] [t9803]

2019-04-18 Thread Johannes Schindelin
Hi Julian, On Wed, 27 Mar 2019, Julian Cheng wrote: > I’m new here and hoping to get to be a part of GSOC 2019. I have questions > about the main project and the microproject > > Main Project Quesctions > I was hoping to work on “git revert --drop” and “git commit --reword”. > Are there any ment

[no subject]

2019-04-18 Thread Phil Hord
The current url leads to a 404 error. The corrected url was determined empirically. Signed-off-by: Phil Hord --- MaintNotes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MaintNotes b/MaintNotes index b7fa21f5cc..168f0b0969 100644 --- a/MaintNotes +++ b/MaintNotes @@ -63,7 +

[PATCH] t5304: add a test for pruning with bitmaps

2019-04-18 Thread Jeff King
On Thu, Apr 18, 2019 at 03:49:53PM -0400, Jeff King wrote: > > This block after "if (bitmap_git)" is not exercised by the (non-performance) > > test suite, so the rest of the code above is not tested, either. Could a > > test > > of this "prune" capability be added to the regression tests around

Re: [PATCH 2/3] prune: use bitmaps for reachability traversal

2019-04-18 Thread Jeff King
On Mon, Apr 15, 2019 at 11:00:45AM -0400, Derrick Stolee wrote: > > void mark_reachable_objects(struct rev_info *revs, int mark_reflog, > > timestamp_t mark_recent, struct progress *progress) > [...] > > cp.progress = progress; > > cp.count = 0; > > > > + bitma

Re: Some files not ignored as they should be

2019-04-18 Thread Jeff King
On Wed, Apr 17, 2019 at 09:18:23AM +, Celestino, Federico wrote: > I am facing another issue with Git. > Please find attached the .gitignore file that I am currently using. > My intention is to ignore all the files inside any Debug folder, > except for .map, .hex and .bin files. > Yet, a .out

Re: [PATCH] worktree: update is_bare heuristics

2019-04-18 Thread Jonathan Tan
> > > - Teach get_main_worktree() to use is_bare_repository() instead, > > >introduced in 7d1864ce67 ("Introduce is_bare_repository() and > > >core.bare configuration variable", 2007-01-07) and updated in > > >e90fdc39b6 ("Clean up work-tree handling", 2007-08-01). This solves > > >

hope

2019-04-18 Thread Kelani Alfasasi
Good day , my name is Kelani Alfasasi, i sent you a mail and there was no response , please confirm that you did get this mail for more details. Regards Kelani Alfasasi

Re: [PATCH] worktree: update is_bare heuristics

2019-04-18 Thread Jeff King
On Thu, Apr 18, 2019 at 11:30:00AM -0700, Jonathan Tan wrote: > > > strbuf_add_absolute_path(&worktree_path, get_git_common_dir()); > > > - is_bare = !strbuf_strip_suffix(&worktree_path, "/.git"); > > > - if (is_bare) > > > + if (!strbuf_strip_suffix(&worktree_path, "/.gi

Re: Feature request: Allow to update commit ID in messages when rebasing

2019-04-18 Thread Giuseppe Crinò
On Thu, Apr 18, 2019 at 7:32 PM Jakub Narebski wrote: > Well, what about limiting changes and rewriting only to the commits > being rewritten by [interactive] rebase? I mean that we would rewrite > "revert 01a9fe8" only if: > > a.) the commit with this message is undergoing rewrite > b.) the comm

Re: Feature request: Allow to update commit ID in messages when rebasing

2019-04-18 Thread Phil Hord
Wouldn't we need to extend this to cherry-pick, too? Suppose I do this: $ git log -2 --oneline --decorate foo abcd123456 (foo) Revert 123456 123456 Some useful commit for the future, but not now $ git checkout bar $ git cherry-pick foo^ foo $ git log -2 --one

Re: [PATCH] worktree: update is_bare heuristics

2019-04-18 Thread Jonathan Tan
> You actually didn't spell out the problem with "git branch -D", or at > least the consequence (i.e. the submodule branch is deleted even if > it's checked out). Thanks - I'll do that in the commit message. > > strbuf_add_absolute_path(&worktree_path, get_git_common_dir()); > > - i

Re: git version 2.20.1.windows.1 throws file name too long in gitk

2019-04-18 Thread Bret Barkelew
This issue is now being reported by more users inside MS. I'll also reach out to the Git for Windows advocacy group to see if they have any ideas. I have not had time to figure out the inner workings of Tcl/Tk. Is there any way to turn on tracing/logging in Git for which commands are being called

Re: [PATCH 07/11] Add a function to determine unique prefixes for a list of strings

2019-04-18 Thread Jeff Hostetler
On 4/10/2019 1:37 PM, Slavica Djukic via GitGitGadget wrote: From: Slavica Djukic In the `git add -i` command, we show unique prefixes of the commands and files, to give an indication what prefix would select them. Naturally, the C implementation looks a lot different than the Perl implemen

Re: Feature request: Allow to update commit ID in messages when rebasing

2019-04-18 Thread Jakub Narebski
Junio C Hamano writes: > Ævar Arnfjörð Bjarmason writes: >> On Wed, Apr 17 2019, Giuseppe Crinò wrote: >> >>> The feature I'm asking is to add an extra-step during rebasing, >>> checking whether there's a reference to a commit that's not going to >>> be included in history and asks the user wheth

Re: [PATCH v10 09/10] sequencer.c: save and restore cleanup mode

2019-04-18 Thread Denton Liu
Hi Junio, On Wed, Apr 17, 2019 at 10:02:47AM -0700, Denton Liu wrote: > On Wed, Apr 17, 2019 at 11:23:29AM +0100, Phillip Wood wrote: > > From: Denton Liu > > We should drop this line before applying the patch since Phillip did all > of the hard work for this patch and he's the primary author.

Re: [PATCH 06/11] built-in add -i: implement the main loop

2019-04-18 Thread Jeff Hostetler
On 4/10/2019 1:37 PM, Johannes Schindelin via GitGitGadget wrote: From: Johannes Schindelin The reason why we did not start with the main loop to begin with is that it is the first user of `list_and_choose()`, which uses the `list()` function that we conveniently introduced for use by the `s

Re: [PATCH 01/11] Start to implement a built-in version of `git add --interactive`

2019-04-18 Thread Jeff King
On Thu, Apr 18, 2019 at 10:31:30AM -0400, Jeff Hostetler wrote: > Currently, neither function looks at any other k/v pairs, so > this is a bit of a moot point, but I'm wondering if this should > look like this: > > int add_config(...) > { > // give add-interactive.c a chance to lo

Re: [PATCH 4/7] docs: exclude documentation for commands that have been excluded

2019-04-18 Thread Jeff King
On Thu, Apr 18, 2019 at 03:06:56PM +0200, Johannes Schindelin wrote: > > What about command-line options that influence the outcome? It sounds > > like this is the same problem we have in lots of other places (like say, > > compiler flags being updated), that we solve by generating the proposed >

Re: [PATCH 01/11] Start to implement a built-in version of `git add --interactive`

2019-04-18 Thread Jeff Hostetler
On 4/10/2019 1:37 PM, Johannes Schindelin via GitGitGadget wrote: From: Johannes Schindelin This is hardly the first conversion of a Git command that is implemented as a script to a built-in. So far, the most successful strategy for such conversions has been to add a built-in helper and call

[PATCH v2 5/8] docs: exclude documentation for commands that have been excluded

2019-04-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When building with certain build options, some commands are excluded from the build. For example, `git-credential-cache` is skipped when building with `NO_UNIX_SOCKETS`. Let's not build or package documentation for those excluded commands. This issue was pointed out ri

[PATCH v2 1/8] remote-testgit: move it into the support directory for t5801

2019-04-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The `git-remote-testgit` script is really only used in `t5801-remote-helpers.sh`. It does not even contain any `` placeholders that would need to be interpolated via `make git-remote-testgit`. Let's just move it to a new home, decluttering the top-level directory an

[PATCH v2 8/8] Turn `git serve` into a test helper

2019-04-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The `git serve` built-in was introduced in ed10cb952d31 (serve: introduce git-serve, 2018-03-15) as a backend to serve Git protocol v2, probably originally intended to be spawned by `git upload-pack`. However, in the version that the protocol v2 patches made it into cor

[PATCH v2 7/8] test-tool: handle the `-C ` option just like `git`

2019-04-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In preparation for moving `git serve` into `test-tool` (because it really is only used by the test suite), we teach the `test-tool` the useful trick to change the working directory before running the test command, which will avoid introducing subshells in the test code.

[PATCH v2 4/8] check-docs: allow command-list.txt to contain excluded commands

2019-04-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Among other things, the `check-docs` target ensures that `command-list.txt` no longer contains commands that were dropped (or that were never added in the first place). To do so, it compares the list of commands from that file to the commands listed in `$(ALL_COMMANDS)`

[PATCH v2 0/8] Assorted Documentation-related fixes

2019-04-18 Thread Johannes Schindelin via GitGitGadget
While working on better support for make check-docs on Windows, I noticed a couple more things, e.g. some "commands" were reported as being listed but not built, e.g. gitcli (i.e. the parts of command-list.txt that are marked as "guide"). This patch series cleans up those loose ends: after this, m

[PATCH v2 2/8] Makefile: drop the NO_INSTALL variable

2019-04-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The last user was just removed; There is no longer any need to carry it around. Should we ever run into a need for it again, it is easy enough to revert this commit. It is unlikely, though, that we need `NO_INSTALL` again: as we saw with the just-removed item, `git-remo

[PATCH v2 3/8] help -a: do not list commands that are excluded from the build

2019-04-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When built with NO_CURL or with NO_UNIX_SOCKETS, some commands are skipped from the build. It does not make sense to list them in the output of `git help -a`, so let's just not. Signed-off-by: Johannes Schindelin --- Makefile| 14 -- generate-c

[PATCH v2 6/8] check-docs: do not bother checking for legacy scripts' documentation

2019-04-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In the recent years, there has been a big push to convert more and more of Git's commands that are implemented as scripts to built-ins written in pure, portable C, for robustness, speed and portability. One strategy that served us well is to convert those scripts increm

Re: [PATCH 4/7] docs: exclude documentation for commands that have been excluded

2019-04-18 Thread Johannes Schindelin
Hi Eric & Junio, On Mon, 15 Apr 2019, Eric Sunshine wrote: > On Mon, Apr 15, 2019 at 12:16 AM Eric Sunshine > wrote: > > When composing that email, I originally wrote $(wildcard > > config.mak.autogen) as the suggestion but changed it to the looser > > $(wildcard config.mak*) when I realized th

Re: [PATCH 4/7] docs: exclude documentation for commands that have been excluded

2019-04-18 Thread Johannes Schindelin
Hi Peff, On Mon, 15 Apr 2019, Jeff King wrote: > On Mon, Apr 15, 2019 at 12:16:51AM -0400, Eric Sunshine wrote: > > > On Sun, Apr 14, 2019 at 11:10 PM Junio C Hamano wrote: > > > Eric Sunshine writes: > > > >> +Documentation/GIT-EXCLUDED-PROGRAMS: Makefile config.mak.uname > > > >> + $(QU

Re: [PATCH 3/7] check-docs: do not pretend that commands are listed which are excluded

2019-04-18 Thread Johannes Schindelin
Hi Junio, On Mon, 15 Apr 2019, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > From: Johannes Schindelin > > Subject: Re: [PATCH 3/7] check-docs: do not pretend that commands are > > listed which are excluded > > Sorry, but I cannot quite parse the title. I am

RFQ

2019-04-18 Thread Mrs Sabrina
Dear Supplier, It is a pleasure to consult your company on our purchase inquiry, I am Sabrina from APPLE TECH LTD . We are interested to purchase your product. Can you please give us your product catalog and specification for our study before placing order. Looking forward for your re

Re: [PATCH 7/7] Turn `git serve` into a test helper

2019-04-18 Thread Johannes Schindelin
Hi Junio, On Mon, 15 Apr 2019, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > From: Johannes Schindelin > > > > The `git serve` built-in was introduced in ed10cb952d31 (serve: > > introduce git-serve, 2018-03-15) as a backend to serve Git protocol v2, > > probabl

Re: [PATCH 2/7] help -a: do not list commands that are excluded from the build

2019-04-18 Thread Johannes Schindelin
Hi Junio, On Mon, 15 Apr 2019, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\ > > $(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\ > > diff --git a/generate-cmdlist.sh b/gene

Re: [PATCH 1/7] remote-testgit: move it into the support directory for t5801

2019-04-18 Thread Johannes Schindelin
Hi Junio, On Mon, 15 Apr 2019, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > @@ -657,8 +656,6 @@ SCRIPT_PERL += git-svn.perl > > > > SCRIPT_PYTHON += git-p4.py > > > > -NO_INSTALL += git-remote-testgit > > - > > The line lost here was the last one that updated t

Re: [PATCH v2 00/16] Add new command 'restore'

2019-04-18 Thread Duy Nguyen
On Thu, Apr 18, 2019 at 5:03 PM Johannes Schindelin wrote: > > Hi, > > On Thu, 18 Apr 2019, Junio C Hamano wrote: > > > Duy Nguyen writes: > > > > > On Thu, Apr 11, 2019 at 8:12 PM Nguyễn Thái Ngọc Duy > > > wrote: > > >> > > >> This is the companion of "git switch" and is based on that topic.

Re: [PATCH] worktree: update is_bare heuristics

2019-04-18 Thread Duy Nguyen
On Thu, Apr 18, 2019 at 4:22 AM Jonathan Tan wrote: > > When "git branch -D " is run, Git usually first checks if that > branch is currently checked out. But this check is not performed if the > Git directory of that repository is not at "/.git", which is the > case if that repository is a submodu

Re: [PATCH v2 00/16] Add new command 'restore'

2019-04-18 Thread Johannes Schindelin
Hi, On Thu, 18 Apr 2019, Junio C Hamano wrote: > Duy Nguyen writes: > > > On Thu, Apr 11, 2019 at 8:12 PM Nguyễn Thái Ngọc Duy > > wrote: > >> > >> This is the companion of "git switch" and is based on that topic. > >> This command peforms the "checkout paths" from git-checkout, git-reset > >>

Re: [PATCH] worktree: update is_bare heuristics

2019-04-18 Thread Johannes Schindelin
Hi, On Thu, 18 Apr 2019, Junio C Hamano wrote: > Jonathan Tan writes: > > > When "git branch -D " is run, Git usually first checks if that > > branch is currently checked out. But this check is not performed if the > > Git directory of that repository is not at "/.git", which is the > > case if

Re: [PATCH] [WIP/RFC] add git pull and git fetch --set-upstream

2019-04-18 Thread Matthieu Moy
BOMPARD CORENTIN p1603631 writes: > + warning(_("No source branch found. \n You need to > specify excatly " > + "one branch with the > set-upstream option.")); s/excatly/exactly/ Also, this " \n " is weird, the trailing whitespac

Re: [PATCH] [WIP/RFC] add git pull and git fetch --set-upstream

2019-04-18 Thread Matthieu Moy
Junio C Hamano writes: >> --- a/Documentation/fetch-options.txt >> +++ b/Documentation/fetch-options.txt >> @@ -165,6 +165,11 @@ ifndef::git-pull[] >> Disable recursive fetching of submodules (this has the same effect as >> using the `--recurse-submodules=no` option). >> >> +--set-ups

Re: [PATCH v2 00/16] Add new command 'restore'

2019-04-18 Thread Duy Nguyen
On Thu, Apr 18, 2019 at 7:38 AM Junio C Hamano wrote: > It would be an excellent addition to "restore-path" (and also to > "checkout [ [--]] pathspec") to give "--dry-run". Not > just because it is destructive, but because unlike "reset --hard", > it is selectively destructive. Having a way to m

Re: [PATCH v2] parse-options: don't emit "ambiguous option" for aliases

2019-04-18 Thread Duy Nguyen
On Thu, Apr 18, 2019 at 09:48:39AM +0900, Junio C Hamano wrote: > > But on the other hand I can see it's a bit more work to teach > > parse-options OPT_ALIAS to say "--recursive is just an alias of > > --recurse-submodules" and chances of --recursive-hard coming up are > > probably very low. > > T

Re: [PATCH v10 00/10] Fix scissors bug during conflict

2019-04-18 Thread Phillip Wood
On 18/04/2019 06:19, Junio C Hamano wrote: Phillip Wood writes: From: Phillip Wood With Denton's blessing I've rebased his patches on top of my patch to fix the message cleanup with cherry-pick --signoff and -x [1]. I've Note that the base is a merge of that patch (which is based on maint)

[PATCH] Makefile: use fileno macro work around on AIX

2019-04-18 Thread CHIGOT, CLEMENT
Declare FILENO_IS_A_MACRO on AIX On AIX, fileno(fp) is a macro and need to use the work around already made for BSD's. Signed-off-by: Clément Chigot --- config.mak.uname | 1 + 1 file changed, 1 insertion(+) diff --git a/config.mak.uname b/config.mak.uname index 41e85fab1c..86cbe47627 100644

Re: [PATCH 1/1] configure.ac: Properly check for libintl

2019-04-18 Thread Vadym Kochan
Hi Junio, On Thu, Apr 18, 2019 at 02:45:56PM +0900, Junio C Hamano wrote: > Vadim Kochan writes: > > > Some libc implementations like uclibc or musl provides > > gettext stubs via libintl library but this case is not checked > > by AC_CHECK_LIB(c, gettext ...) because gcc has gettext as builtin