Re: [PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-13 Thread Carlo Arenas
On Tue, Nov 13, 2018 at 12:49 AM Johannes Schindelin wrote: > On Mon, 12 Nov 2018, Carlo Marcelo Arenas Belón wrote: >> > > if time_t can't represent a valid time keep the indexes for failsafe > > Is this sentence incomplete? What are those "indexes"? the indexes that are created when

Re: [PATCH 1/5] rebase -r: demonstrate bug with conflicting merges

2018-11-13 Thread Johannes Schindelin
Hi Junio, On Tue, 13 Nov 2018, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > From: Johannes Schindelin > > > > When calling `merge` on a branch that has already been merged, that > > `merge` is skipped quietly, but currently a MERGE_HEAD file is being > > left

Hello,

2018-11-13 Thread Mrs Gera Levin
Good day, I wish to establish a charity foundation to help the poor in your country under your care, Can you help to build this project in your country? Please contact me through my email address for more details Remain blessed in the lord, Your Sister, Mrs. Gera Levin

Re: [PATCH v2 2/2] rebase: Implement --merge via git-rebase--interactive

2018-11-13 Thread Johannes Schindelin
Hi Phillip, On Mon, 12 Nov 2018, Phillip Wood wrote: > It's good to see these patches progressing, I've just got a couple of > comments related to Johannes' points below > > On 12/11/2018 16:21, Johannes Schindelin wrote: > > Hi Elijah, > > > > On Wed, 7 Nov 2018, Elijah Newren wrote: > > >

Re: [RFC PATCH] Using no- for options instead of duplication

2018-11-13 Thread Ævar Arnfjörð Bjarmason
On Tue, Nov 13 2018, Junio C Hamano wrote: > A tangetn that somebody might want to tackle. It would be > nice if we had a tool that takes a grep expression (like > '^--no' and '^\[no-' above) and shows histograms of the ages > of lines that match. It might tell us that

Re: [PATCH v3] remote: add --save-to-push option to git remote set-url

2018-11-13 Thread Junio C Hamano
Denton Liu writes: > This adds the --save-to-push option to `git remote set-url` such that > when executed, we move the remote.*.url to remote.*.pushurl and set > remote.*.url to the given url argument. > > For example, if we have the following config: > > [remote "origin"] >

Re: [PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-13 Thread Johannes Schindelin
Hi, On Mon, 12 Nov 2018, Carlo Marcelo Arenas Belón wrote: > There are still some more possible improvements around this code but > they are orthogonal to this change : > > * migrate to approxidate_careful or parse_expiry_date > * maybe make sure only approxidate are used for expiration > >

Re: Regression: rebase -C1 fails in master

2018-11-13 Thread Johannes Schindelin
Hi Phillip, On Mon, 12 Nov 2018, Phillip Wood wrote: > I've just tried running > > bin-wrappers/git rebase -C1 @^ > > and I get > > error: unknown switch `1' Darn. I think this is the same problem as the `-S` switch problem, but in reverse: the built-in rebase used to require an argument for

Re: [PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-13 Thread Junio C Hamano
Carlo Marcelo Arenas Belón writes: > There are still some more possible improvements around this code but > they are orthogonal to this change : > > * migrate to approxidate_careful or parse_expiry_date > * maybe make sure only approxidate are used for expiration > > Changes in v2: > * improved

Re: [PATCH 8/9] sha1-file: use loose object cache for quick existence check

2018-11-13 Thread Ævar Arnfjörð Bjarmason
On Mon, Nov 12 2018, Ævar Arnfjörð Bjarmason wrote: > On Mon, Nov 12 2018, Ævar Arnfjörð Bjarmason wrote: > >> On Mon, Nov 12 2018, Jeff King wrote: >> >>> On Mon, Nov 12, 2018 at 05:01:02PM +0100, Ævar Arnfjörð Bjarmason wrote: >>> > There's some obvious hand-waving in the paragraphs

Re: [PATCH 4/5] built-in rebase --skip/--abort: clean up stale .git/ files

2018-11-13 Thread Johannes Schindelin
Hi Junio, On Tue, 13 Nov 2018, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > From: Johannes Schindelin > > > > The scripted version of the rebase used to execute `git reset --hard` > > when skipping or aborting. When we ported this to C, we did update the > >

Re: [PATCH 1/2] refs: show --exclude failure with --branches/tags/remotes=glob

2018-11-13 Thread Johannes Schindelin
Hi Junio, On Tue, 13 Nov 2018, Junio C Hamano wrote: > Rafael Ascensão writes: > > > The documentation of `--exclude=` option from rev-list and rev-parse > > explicitly states that exclude patterns *should not* start with 'refs/' > > when used with `--branches`, `--tags` or `--remotes`. > > >

Re: [PATCH 1/5] rebase -r: demonstrate bug with conflicting merges

2018-11-13 Thread Johannes Schindelin
Hi Junio, On Tue, 13 Nov 2018, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> For a trivially small change/fix like this, it is OK and even > >> preferrable to make 1+2 a single step, as applying t/ part only to > >> try to see the breakage (or "am"ing everything and then "diff | >

Re: [PATCH 1/5] rebase -r: demonstrate bug with conflicting merges

2018-11-13 Thread Junio C Hamano
Johannes Schindelin writes: >> For a trivially small change/fix like this, it is OK and even >> preferrable to make 1+2 a single step, as applying t/ part only to >> try to see the breakage (or "am"ing everything and then "diff | >> apply -R" the part outside t/ for the same purpose) is easy

Re: [PATCH 1/1] rebase: really just passthru the `git am` options

2018-11-13 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > However, there is a much better way (that I was unaware of, at the time > when I mentored Pratik to implement these options): OPT_PASSTHRU_ARGV. > It is intended for exactly this use case, where command-line options > want to be parsed into a

Re: [RFC PATCH] Using no- for options instead of duplication

2018-11-13 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > This doesn't spew out a histogram, but you can use the various "git > grep/blame" one-liners (https://www.google.nl/search?q=git+grep+blame) > plus shell one-liner to get something useful: > > git grep -e '^--no-' -e '^--\[no-' -n | perl -F':' -anpe '$_=`git

[PATCH 0/1] rebase: understand -C again, refactor

2018-11-13 Thread Johannes Schindelin via GitGitGadget
Phillip Wood reported a problem where the built-in rebase did not understand options like -C1, i.e. it did not expect the option argument. While investigating how to address this best, I stumbled upon OPT_PASSTHRU_ARGV (which I was so far happily unaware of). Instead of just fixing the -C bug,

[PATCH 1/1] rebase: really just passthru the `git am` options

2018-11-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Currently, we parse the options intended for `git am` as if we wanted to handle them in `git rebase`, and then reconstruct them painstakingly to define the `git_am_opt` variable. However, there is a much better way (that I was unaware of, at the time when I mentored

Re: [PATCH 1/5] rebase -r: demonstrate bug with conflicting merges

2018-11-13 Thread Junio C Hamano
Johannes Schindelin writes: > You misunderstand. In this case it is crucial to read the regression test > first. The fix does not make much sense before one understands the > condition under which the order of the code statements matters. I am not sure what you mean. It sounds as if you want

Re: [PATCH v3 1/1] protocol: advertise multiple supported versions

2018-11-13 Thread Junio C Hamano
stead...@google.com writes: > + if (tmp_allowed_versions[0] != config_version) > + for (int i = 1; i < nr_allowed_versions; i++) > + if (tmp_allowed_versions[i] == config_version) { > + enum protocol_version swap = > +

Re: [PATCH] remote-curl: die on server-side errors

2018-11-13 Thread Junio C Hamano
stead...@google.com writes: > When a smart HTTP server sends an error message via pkt-line, > remote-curl will fail to detect the error (which usually results in > incorrectly falling back to dumb-HTTP mode). OK, that is a valid thing to worry about. > > This patch adds a check in

[PATCH 0/1] mingw: use CreateHardLink() directly

2018-11-13 Thread Johannes Schindelin via GitGitGadget
This is another tidbit from the stash of Git for Windows' patches: it avoids loading the function address of CreateHardLink() at runtime. This was done in case we were running on a Windows version that does not support that function, but we no longer support any of these Windows versions.

[PATCH 1/1] mingw: use `CreateHardLink()` directly

2018-11-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The function `CreateHardLink()` is available in all supported Windows versions (even since Windows XP), so there is no more need to resolve it at runtime. Helped-by: Max Kirillov Signed-off-by: Johannes Schindelin --- compat/mingw.c | 14 +- 1 file

[PATCH 1/1] do_git_config_sequence(): fall back to git_dir if commondir is NULL

2018-11-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Just some defensive programming. Signed-off-by: Johannes Schindelin --- config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.c b/config.c index 4051e38823..279d0d7077 100644 --- a/config.c +++ b/config.c @@ -1676,6 +1676,8 @@ static int

[RFC/PATCH] read-cache: write all indexes with the same permissions

2018-11-13 Thread Ævar Arnfjörð Bjarmason
Change the code that writes out the shared index to use create_tempfile() instead of mks_tempfile(); The create_tempfile() function is used to write out the main .git/index (via .git/index.lock) using lock_file(). The create_tempfile() function respects the umask, whereas the mks_tempfile()

[PATCH v4] commit: add a commit.allowEmpty config variable

2018-11-13 Thread Tanushree Tumane
From: tanushree27 when we cherrypick an existing commit it doesn't change anything and therefore it fails prompting to reset (skip commit) or commit using --allow-empty attribute and then continue. Add commit.allowEmpty configuration variable as a convenience to skip this process. Add tests to

Re: [RFC/PATCH] read-cache: write all indexes with the same permissions

2018-11-13 Thread Duy Nguyen
On Tue, Nov 13, 2018 at 4:32 PM Ævar Arnfjörð Bjarmason wrote: > I won't have time to finish this today, as noted in > https://public-inbox.org/git/874lcl2e9t@evledraar.gmail.com/ > there's a pretty major bug here in that we're now writing out literal > sharedindex_XX files. It's not the

Re: [PATCH] coccicheck: introduce 'pending' semantic patches

2018-11-13 Thread SZEDER Gábor
On Fri, Nov 09, 2018 at 04:10:52PM -0800, Stefan Beller wrote: > From: SZEDER Gábor > > Teach `make coccicheck` to avoid patches named "*.pending.cocci" and > handle them separately in a new `make coccicheck-pending` instead. > This means that we can separate "critical" patches from "FYI"

Re: [PATCH v2 2/2] rebase: Implement --merge via git-rebase--interactive

2018-11-13 Thread Elijah Newren
Hi Dscho, Thanks for the detailed review! I'll try to get back to all your comments, but for now I feel bad that I didn't see and respond to at least one sooner... On Mon, Nov 12, 2018 at 8:21 AM Johannes Schindelin wrote: > > Thank you for this pleasant read. I think there is still quite a

Re: [PATCH] remote-curl: die on server-side errors

2018-11-13 Thread Jeff King
On Mon, Nov 12, 2018 at 02:44:56PM -0800, stead...@google.com wrote: > When a smart HTTP server sends an error message via pkt-line, > remote-curl will fail to detect the error (which usually results in > incorrectly falling back to dumb-HTTP mode). > > This patch adds a check in discover_refs()

[PATCH 1/1] bundle: refuse to create empty bundle

2018-11-13 Thread Gaël Lhez via GitGitGadget
From: =?UTF-8?q?Ga=C3=ABl=20Lhez?= When an user tries to create an empty bundle via `git bundle create ` where `` resolves to an empty list (for example, like `master..master`), the command fails and warns the user about how it does not want to create empty bundle. However, the `.lock` file

What's cooking in git.git (Nov 2018, #04; Tue, 13)

2018-11-13 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. You can find the changes

Re: [PATCH 10/10] fast-export: add --always-show-modify-after-rename

2018-11-13 Thread Jeff King
On Mon, Nov 12, 2018 at 10:08:10AM -0800, Elijah Newren wrote: > > I would do: > > > >git log --raw $( > > git cat-file --batch-check='%(objectsize:disk) %(objectname)' > > --batch-all-objects | > > sort -rn | head -3 | > > awk '{print "--find-object=" $2 }' > >) > > > >

[PATCH 0/1] bundle: fix issue when bundles would be empty

2018-11-13 Thread Johannes Schindelin via GitGitGadget
And yet another patch coming through Git for Windows... Gaël Lhez (1): bundle: refuse to create empty bundle bundle.c| 7 --- t/t5607-clone-bundle.sh | 4 2 files changed, 8 insertions(+), 3 deletions(-) base-commit: 8858448bb49332d353febc078ce4a3abcc962efe

Re: [PATCH 2/3] ieot: default to not writing IEOT section

2018-11-13 Thread Ben Peart
On 11/12/2018 7:39 PM, Jonathan Nieder wrote: As with EOIE, popular versions of Git do not support the new IEOT extension yet. When accessing a Git repository written by a more modern version of Git, they correctly ignore the unrecognized section, but in the process they loudly warn

Re: [PATCH 1/3] read-cache: use shared perms when writing shared index

2018-11-13 Thread Ævar Arnfjörð Bjarmason
On Thu, 22 Jun 2017 12:51:54 -0700 Junio wrote: > > Let's fix that by using create_tempfile() instead of mks_tempfile() > > to create the shared index file. > > > > ... > > - fd = mks_tempfile(_sharedindex, > > git_path("sharedindex_XX")); > > + fd = create_tempfile(_sharedindex,

Re: [PATCH 2/3] ieot: default to not writing IEOT section

2018-11-13 Thread Duy Nguyen
On Tue, Nov 13, 2018 at 2:12 AM Jonathan Nieder wrote: > > Junio C Hamano wrote: > > > How about > > > > hint: ignoring an optional IEOT extension > > > > to make it clear that it is totally harmless? > > > > With that, we can add advise.unknownIndexExtension=false to turn all > > of them

Re: [PATCH] Makefile: add pending semantic patches

2018-11-13 Thread SZEDER Gábor
On Fri, Nov 09, 2018 at 01:58:01PM -0800, Stefan Beller wrote: > On Thu, Nov 8, 2018 at 9:18 PM Junio C Hamano wrote: > > Are they wrong changes (e.g. a carelessly written read_cache() to > > read_index(_index) conversion may munge the implementation of > > read_cache(...) { return

Re: [PATCH 04/10] fast-export: avoid dying when filtering by paths and old tags exist

2018-11-13 Thread Jeff King
On Mon, Nov 12, 2018 at 10:50:43PM +, brian m. carlson wrote: > On Sun, Nov 11, 2018 at 01:44:43AM -0500, Jeff King wrote: > > > + git fast-export --tag-of-filtered-object=rewrite --all -- bar > > > >output && > > > + grep -A 1 refs/tags/v0.0.0.0.0.0.1 output | grep -E

Re: [PATCH v2 2/2] branch: Mark and colorize a branch differently if it is checked out in a linked worktree

2018-11-13 Thread Jeff King
On Mon, Nov 12, 2018 at 06:07:18PM +, Rafael Ascensão wrote: > On Mon, Nov 12, 2018 at 07:14:23AM -0500, Jeff King wrote: > > just adding a bunch of color variants. It would be nice if we could just > > do this with a run-time parse_color("bold red") or whatever, but we use > > these as

Re: [PATCH 3/3] index: do not warn about unrecognized extensions

2018-11-13 Thread Ben Peart
On 11/12/2018 7:40 PM, Jonathan Nieder wrote: Documentation/technical/index-format explains: 4-byte extension signature. If the first byte is 'A'..'Z' the extension is optional and can be ignored. This allows gracefully introducing a new index extension without having to rely on

Re: [PATCH 1/1] rebase: really just passthru the `git am` options

2018-11-13 Thread Phillip Wood
Hi Johannes Thanks for looking at this. Unfortunately using OPT_PASSTHRU_ARGV seems to break the error reporting Running bin/wrappers/git rebase --onto @ @^^ -Cbad Gives git encountered an error while preparing the patches to replay these revisions:

[PATCH 0/1] Some left-over add-on for bw/config-h

2018-11-13 Thread Johannes Schindelin via GitGitGadget
Back when bw/config-h was developed (and backported to Git for Windows), I came up with this patch. It seems to not be strictly necessary, but I like the safety of falling back to the Git directory when no common directory is configured (for whatever reason). Johannes Schindelin (1):

Re: [PATCH 1/3] eoie: default to not writing EOIE section

2018-11-13 Thread Ben Peart
On 11/12/2018 8:05 PM, Junio C Hamano wrote: Jonathan Nieder writes: Since 3b1d9e04 (eoie: add End of Index Entry (EOIE) extension, 2018-10-10) Git defaults to writing the new EOIE section when writing out an index file. Usually that is a good thing because it improves threaded

[PATCH] po/it.po: Remove space between the dashes and start of an option's name in the Italian translation

2018-11-13 Thread Carmine Zaccagnino
This is a really trivial change, but it is quite annoying to see this diff --git a/po/it.po b/po/it.po index 908021944..4d87faeee 100644 --- a/po/it.po +++ b/po/it.po @@ -566,7 +566,7 @@ msgstr "è già in corso un'operazione di cherry-pick o di revert" #: sequencer.c:740 msgid "try \"git

Re: [RFC/PATCH] read-cache: write all indexes with the same permissions

2018-11-13 Thread Ævar Arnfjörð Bjarmason
On Tue, Nov 13 2018, Duy Nguyen wrote: > On Tue, Nov 13, 2018 at 4:32 PM Ævar Arnfjörð Bjarmason > wrote: >> I won't have time to finish this today, as noted in >> https://public-inbox.org/git/874lcl2e9t@evledraar.gmail.com/ >> there's a pretty major bug here in that we're now writing out

Re: [RFC] cherry-pick notes to find out cherry-picks from the origin

2018-11-13 Thread Tejun Heo
On Wed, Oct 24, 2018 at 05:24:01AM -0700, Tejun Heo wrote: > Ping, thanks. Ping again. Any comments? Wasn't this the direction you guys were suggesting? Thanks. -- tejun

[PATCH v2] checkout: print something when checking out paths

2018-11-13 Thread Nguyễn Thái Ngọc Duy
One of the problems with "git checkout" is that it does so many different things and could confuse people specially when we fail to handle ambiguation correctly. One way to help with that is tell the user what sort of operation is actually carried out. When switching branches, we always print

Re: [PATCH v3 1/1] protocol: advertise multiple supported versions

2018-11-13 Thread SZEDER Gábor
On Mon, Nov 12, 2018 at 01:49:05PM -0800, stead...@google.com wrote: > diff --git a/protocol.c b/protocol.c > index 5e636785d1..54d2ab991b 100644 > --- a/protocol.c > +++ b/protocol.c > +void get_client_protocol_version_advertisement(struct strbuf *advert) > +{ > + int tmp_nr =

Re: [PATCH v5 02/12] sha1-file: provide functions to look up hash algorithms

2018-11-13 Thread Duy Nguyen
On Tue, Nov 13, 2018 at 7:42 PM Derrick Stolee wrote: > > On 11/4/2018 6:44 PM, brian m. carlson wrote: > > +int hash_algo_by_name(const char *name) > > +{ > > + int i; > > + if (!name) > > + return GIT_HASH_UNKNOWN; > > + for (i = 1; i < GIT_HASH_NALGOS; i++) > > +

Re: [PATCH 10/10] fast-export: add --always-show-modify-after-rename

2018-11-13 Thread Elijah Newren
On Tue, Nov 13, 2018 at 6:45 AM Jeff King wrote: > It is an expensive log command, but it's the same expense as running > fast-export, no? And I think maybe that is the disconnect. I would expect an expensive log command to generally be the same expense as running fast-export, yes. But I would

Re: [PATCH] Makefile: use CXXFLAGS for linking fuzzers

2018-11-13 Thread Josh Steadmon
On 2018.11.13 12:12, Junio C Hamano wrote: > stead...@google.com writes: > > > OSS-Fuzz requires C++-specific flags to link fuzzers. Passing these in > > CFLAGS causes lots of build warnings. Using separate CXXFLAGS avoids > > this. > > We are not a C++ shop, so allow me to show ignorance about

[PATCH v2 1/1] checkout: disambiguate dwim tracking branches and local files

2018-11-13 Thread Nguyễn Thái Ngọc Duy
When checkout dwim is added in [1], it is restricted to only dwim when certain conditions are met and fall back to default checkout behavior otherwise. It turns out falling back could be confusing. One of the conditions to turn git checkout frotz to git checkout -b frotz origin/frotz

[PATCH v2 0/1] disambiguate dwim tracking branches and local files

2018-11-13 Thread Nguyễn Thái Ngọc Duy
v2 leaves "pathspec with wildcard" case alone. The behavior in this case remains as before. --no-guess is now made visible in "git checkout -h" and the man page. PS. Based on git-checkout.txt I don't think any user can work out that "git checkout branch --" can be used to disambiguate. And

Re: [PATCH 2/3] ieot: default to not writing IEOT section

2018-11-13 Thread Jonathan Nieder
Hi, Ben Peart wrote: > On 11/12/2018 7:39 PM, Jonathan Nieder wrote: >> As with EOIE, popular versions of Git do not support the new IEOT >> extension yet. When accessing a Git repository written by a more >> modern version of Git, they correctly ignore the unrecognized section, >> but in the

Re: [PATCH v5 02/12] sha1-file: provide functions to look up hash algorithms

2018-11-13 Thread Derrick Stolee
On 11/4/2018 6:44 PM, brian m. carlson wrote: +int hash_algo_by_name(const char *name) +{ + int i; + if (!name) + return GIT_HASH_UNKNOWN; + for (i = 1; i < GIT_HASH_NALGOS; i++) + if (!strcmp(name, hash_algos[i].name)) + return

[PATCH 1/1] win32: replace pthread_cond_*() with much simpler code

2018-11-13 Thread Loo Rong Jie via GitGitGadget
From: Loo Rong Jie The Win32 CONDITION_VARIABLE has better performance and is easier to maintain, as the code is a lot shorter now (the semantics of the CONDITION_VARIABLE matches the pthread_cond_t very well). Note: CONDITION_VARIABLE is not available in Windows XP and below, but the declared

[PATCH 0/1] win32: modernize pthread_cond_*() shims

2018-11-13 Thread Johannes Schindelin via GitGitGadget
And yet another patch from Git for Windows' cache of treasures. It was challenging to emulate the functions related to pthread_cond_t as long as we tried to maintain support for Windows XP, which has nothing close to that feature. Now that we require Windows Vista or later, we can make use of the

Re: [PATCH] push: change needlessly ambiguous example in error

2018-11-13 Thread Matthieu Moy
Ævar Arnfjörð Bjarmason" wrote: > Let's use "git push HEAD" which always means push the current > branch name to that remote, instead of "git push > " which will do that under "simple", but is not > guaranteed to do under "upstream". Probably a good idea indeed. One potential objection

Re: [PATCH 02/10] git-fast-export.txt: clarify misleading documentation about rev-list args

2018-11-13 Thread Elijah Newren
On Sat, Nov 10, 2018 at 11:17 PM Elijah Newren wrote: > > On Sat, Nov 10, 2018 at 10:36 PM Jeff King wrote: > > > > On Sat, Nov 10, 2018 at 10:23:04PM -0800, Elijah Newren wrote: > > > > > Signed-off-by: Elijah Newren > > > --- > > > Documentation/git-fast-export.txt | 3 ++- > > > 1 file

Re: [PATCH v5 02/12] sha1-file: provide functions to look up hash algorithms

2018-11-13 Thread Ramsay Jones
On 14/11/2018 00:11, Ramsay Jones wrote: > > > On 13/11/2018 18:42, Derrick Stolee wrote: >> On 11/4/2018 6:44 PM, brian m. carlson wrote: >>> +int hash_algo_by_name(const char *name) >>> +{ >>> +    int i; >>> +    if (!name) >>> +    return GIT_HASH_UNKNOWN; >>> +    for (i = 1; i <

Re: [PATCH v5 02/12] sha1-file: provide functions to look up hash algorithms

2018-11-13 Thread Ramsay Jones
On 13/11/2018 18:42, Derrick Stolee wrote: > On 11/4/2018 6:44 PM, brian m. carlson wrote: >> +int hash_algo_by_name(const char *name) >> +{ >> +    int i; >> +    if (!name) >> +    return GIT_HASH_UNKNOWN; >> +    for (i = 1; i < GIT_HASH_NALGOS; i++) >> +    if (!strcmp(name,

rebase-in-C stability for 2.20

2018-11-13 Thread Ævar Arnfjörð Bjarmason
On Tue, Nov 13 2018, Phillip Wood wrote: > Hi Johannes > > On 13/11/2018 19:21, Johannes Schindelin wrote: >> Hi Phillip, >> >> On Tue, 13 Nov 2018, Phillip Wood wrote: >> >>> Thanks for looking at this. Unfortunately using OPT_PASSTHRU_ARGV seems to >>> break the error reporting >>> >>>

Re: rebase-in-C stability for 2.20

2018-11-13 Thread Stefan Beller
> But maybe I'm being overly paranoid. What do those more familiar with > this think? I am not too worried, * as rebase is a main porcelain, that is even hard to use in a script. so any failures are not deep down in some automation, but when found exposed quickly (and hopefully reported). *

[PATCH] git-compat-util: prefer poll.h to sys/poll.h

2018-11-13 Thread Đoàn Trần Công Danh
POSIX specifies that is the correct header for poll(2) whereas is only needed for some old libc. Let's follow the POSIX way by default. This effectively eliminates musl's warning: warning redirecting incorrect #include to Signed-off-by: Đoàn Trần Công Danh --- t0028, t1308.23,

Re: [PATCH v3 1/1] protocol: advertise multiple supported versions

2018-11-13 Thread Junio C Hamano
Josh Steadmon writes: > On 2018.11.13 13:01, Junio C Hamano wrote: >> stead...@google.com writes: >> >> > Currently the client advertises that it supports the wire protocol >> > version set in the protocol.version config. However, not all services >> > support the same set of protocol versions.

[PATCH v2 10/11] fast-export: add a --show-original-ids option to show original names

2018-11-13 Thread Elijah Newren
Knowing the original names (hashes) of commits can sometimes enable post-filtering that would otherwise be difficult or impossible. In particular, the desire to rewrite commit messages which refer to other prior commits (on top of whatever other filtering is being done) is very difficult without

[PATCH v2 05/11] fast-export: move commit rewriting logic into a function for reuse

2018-11-13 Thread Elijah Newren
Logic to replace a filtered commit with an unfiltered ancestor is useful elsewhere; put it into a function we can call. Signed-off-by: Elijah Newren --- builtin/fast-export.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git

[PATCH v2 11/11] fast-export: add --always-show-modify-after-rename

2018-11-13 Thread Elijah Newren
I wanted a way to gather all the following information efficiently (with as few history traversals as possible): * Get all blob sizes * Map blob shas to filename(s) they appeared under in the history * Find when files and directories were deleted (and whether they were later reinstated,

[PATCH v2 00/11] fast export and import fixes and features

2018-11-13 Thread Elijah Newren
This is a series of small fixes and features for fast-export and fast-import, mostly on the fast-export side. Changes since v1 (full range-diff below): - used {tilde} in asciidoc documentation to avoid subscripting and escaping problems - renamed ABORT/ERROR enum values to help avoid

[PATCH v2 06/11] fast-export: when using paths, avoid corrupt stream with non-existent mark

2018-11-13 Thread Elijah Newren
If file paths are specified to fast-export and multiple refs point to a commit that does not touch any of the relevant file paths, then fast-export can hit problems. fast-export has a list of additional refs that it needs to explicitly set after exporting all blobs and commits, and when it tries

[PATCH v2 01/11] git-fast-import.txt: fix documentation for --quiet option

2018-11-13 Thread Elijah Newren
Signed-off-by: Elijah Newren --- Documentation/git-fast-import.txt | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index e81117d27f..7ab97745a6 100644 --- a/Documentation/git-fast-import.txt +++

[PATCH v2 04/11] fast-export: avoid dying when filtering by paths and old tags exist

2018-11-13 Thread Elijah Newren
If --tag-of-filtered-object=rewrite is specified along with a set of paths to limit what is exported, then any tags pointing to old commits that do not contain any of those specified paths cause problems. Since the old tagged commit is not exported, fast-export attempts to rewrite such tags to an

[PATCH v2 09/11] fast-import: remove unmaintained duplicate documentation

2018-11-13 Thread Elijah Newren
fast-import.c has started with a comment for nine and a half years re-directing the reader to Documentation/git-fast-import.txt for maintained documentation. Instead of leaving the unmaintained documentation in place, just excise it. Signed-off-by: Elijah Newren --- fast-import.c | 154

[PATCH v2 08/11] fast-export: add --reference-excluded-parents option

2018-11-13 Thread Elijah Newren
git filter-branch has a nifty feature allowing you to rewrite, e.g. just the last 8 commits of a linear history git filter-branch $OPTIONS HEAD~8..HEAD If you try the same with git fast-export, you instead get a history of only 8 commits, with HEAD~7 being rewritten into a root commit. There

[PATCH v2 07/11] fast-export: ensure we export requested refs

2018-11-13 Thread Elijah Newren
If file paths are specified to fast-export and a ref points to a commit that does not touch any of the relevant paths, then that ref would sometimes fail to be exported. (This depends on whether any ancestors of the commit which do touch the relevant paths would be exported with that same ref

[PATCH v2 02/11] git-fast-export.txt: clarify misleading documentation about rev-list args

2018-11-13 Thread Elijah Newren
Signed-off-by: Elijah Newren --- Documentation/git-fast-export.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index ce954be532..fda55b3284 100644 --- a/Documentation/git-fast-export.txt +++

[PATCH v2 03/11] fast-export: use value from correct enum

2018-11-13 Thread Elijah Newren
ABORT and ERROR happen to have the same value, but come from differnt enums. Use the one from the correct enum, and while at it, rename the values to avoid such problems. Signed-off-by: Elijah Newren --- builtin/fast-export.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-)

Re: [PATCH] git-compat-util: prefer poll.h to sys/poll.h

2018-11-13 Thread brian m. carlson
On Wed, Nov 14, 2018 at 08:10:43AM +0700, Đoàn Trần Công Danh wrote: > POSIX specifies that is the correct header for poll(2) > whereas is only needed for some old libc. > > Let's follow the POSIX way by default. > > This effectively eliminates musl's warning: > > warning redirecting

Re: git-scm.com GUI client links

2018-11-13 Thread Jonathan Nieder
+cc: git@vger.kernel.org, git-secur...@googlegroups.com -> bcc Hi! Paul J Sanchez wrote: > Over the weekend I saw a link to a Mac git client I had not seen > before: Aurees. When I went to the linked site to download a copy, > my antivirus software (Sophos) warned me that it contains malware.

Re: [PATCH 02/10] git-fast-export.txt: clarify misleading documentation about rev-list args

2018-11-13 Thread Jonathan Nieder
Elijah Newren wrote: > Actually, no, it actually needs to be inconsistent. > > Different Input Choices (neither backslashed, both backslashed, then just > one): > master~9 and master~10 > master\~9 and master\~10 > master\~9 and master~10 > > What the outputs look like: > master9 and

Re: [PATCH v5 02/12] sha1-file: provide functions to look up hash algorithms

2018-11-13 Thread Jeff King
On Wed, Nov 14, 2018 at 12:42:45AM +, Ramsay Jones wrote: > BTW, if you were puzzling over the 3rd symbol from sha1-file.o > (which I wasn't counting in the 4 symbols above! ;-) ), then I > believe that is because Jeff's commit 3a2e08245c ("object-store: > provide helpers for

Re: [PATCH] push: change needlessly ambiguous example in error

2018-11-13 Thread Ævar Arnfjörð Bjarmason
On Tue, Nov 13 2018, Matthieu Moy wrote: > Ævar Arnfjörð Bjarmason" wrote: > >> Let's use "git push HEAD" which always means push the current >> branch name to that remote, instead of "git push >> " which will do that under "simple", but is not >> guaranteed to do under "upstream". > >

Re: [PATCH] remote-curl: die on server-side errors

2018-11-13 Thread Josh Steadmon
On 2018.11.13 23:30, Junio C Hamano wrote: > stead...@google.com writes: > > > When a smart HTTP server sends an error message via pkt-line, > > remote-curl will fail to detect the error (which usually results in > > incorrectly falling back to dumb-HTTP mode). > > OK, that is a valid thing to

Re: [PATCH v3 1/1] protocol: advertise multiple supported versions

2018-11-13 Thread Josh Steadmon
On 2018.11.13 13:01, Junio C Hamano wrote: > stead...@google.com writes: > > > Currently the client advertises that it supports the wire protocol > > version set in the protocol.version config. However, not all services > > support the same set of protocol versions. When connecting to > >

Re: git-scm.com GUI client links

2018-11-13 Thread Jonathan Nieder
+git@vger.kernel.org, git-secur...@googlegroups.com -> bcc Paul J Sanchez wrote: > On Nov 13, 2018, at 2:25 PM, Stefan Beller wrote: >> The link seems to be https://aurees.com/ ? >> >> They seem to have >> https://aurees.com/legal/license-agreement >> which is a hilarious read: >> >> You agree

Re: rebase-in-C stability for 2.20

2018-11-13 Thread Elijah Newren
On Tue, Nov 13, 2018 at 1:52 PM Ævar Arnfjörð Bjarmason wrote: > According to Junio's calendar we're now 2 days from 2.20-rc0. We have > the js/rebase-autostash-detach-fix bug I reported sitting in "pu" still, > and then this. > > I see we still have rebase.useBuiltin in the code as an escape

Re: [PATCH v4] commit: add a commit.allowEmpty config variable

2018-11-13 Thread Ævar Arnfjörð Bjarmason
On Tue, Nov 13 2018, Johannes Schindelin wrote: [Comments on the v4 patch also inline, found it easier to reply just to this one] > On Tue, 13 Nov 2018, Tanushree Tumane wrote: > >> From: tanushree27 >> >> when we cherrypick an existing commit it doesn't change anything and >> therefore it

[PATCH] diff: align move detection error handling with other options

2018-11-13 Thread Stefan Beller
This changes the error handling for the options --color-moved-ws and --color-moved-ws to be like the rest of the options. Move the die() call out of parse_color_moved_ws into the parsing of command line options. As the function returns a bit field, change its signature to return an unsigned

Re: [PATCH v3 1/1] protocol: advertise multiple supported versions

2018-11-13 Thread Josh Steadmon
On 2018.11.13 19:28, SZEDER Gábor wrote: > On Mon, Nov 12, 2018 at 01:49:05PM -0800, stead...@google.com wrote: > > > diff --git a/protocol.c b/protocol.c > > index 5e636785d1..54d2ab991b 100644 > > --- a/protocol.c > > +++ b/protocol.c > > > +void

how often do you check in and with what tool(s)?

2018-11-13 Thread _g e r r y _ _l o w r y _
Hello, i use Git Bash and check in very frequently. it appears there is a range from "extreme often" to "extreme very seldom". Examples: {me, extreme often, Windows} very granular, with a brief yet appropriate comment [like narrating a story] per commit-i change a few lines of code, Alt+Tab

[PATCH 21/23] commit: prepare free_commit_buffer and release_commit_memory for any repo

2018-11-13 Thread Stefan Beller
Pass the object pool to free_commit_buffer and release_commit_memory, such that we can eliminate access to 'the_repository'. Also remove the TODO in release_commit_memory, as commit->util was removed in 9d2c97016f (commit.h: delete 'util' field in struct commit, 2018-05-19) Signed-off-by: Stefan

[PATCH 18/23] submodule: use submodule repos for object lookup

2018-11-13 Thread Stefan Beller
This converts the 'show_submodule_header' function to use the repository API properly, such that the submodule objects are not added to the main object store. Signed-off-by: Stefan Beller --- submodule.c | 73 ++--- 1 file changed, 58

[PATCH 22/23] path.h: make REPO_GIT_PATH_FUNC repository agnostic

2018-11-13 Thread Stefan Beller
git_pathdup uses the_repository internally, but the macro REPO_GIT_PATH_FUNC is specifically made for arbitrary repositories. Switch to repo_git_path which works on arbitrary repositories. Signed-off-by: Stefan Beller --- path.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 02/23] packfile: allow has_packed_and_bad to handle arbitrary repositories

2018-11-13 Thread Stefan Beller
has_packed_and_bad is not widely used, so just migrate it all at once. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- packfile.c | 5 +++-- packfile.h | 2 +- sha1-file.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packfile.c b/packfile.c index

[PATCH 17/23] pretty: prepare format_commit_message to handle arbitrary repositories

2018-11-13 Thread Stefan Beller
Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- contrib/coccinelle/the_repository.pending.cocci | 10 ++ pretty.c| 15 --- pretty.h| 7 ++- 3 files changed, 24 insertions(+),

[PATCH 16/23] commit: prepare logmsg_reencode to handle arbitrary repositories

2018-11-13 Thread Stefan Beller
Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- commit.h| 8 contrib/coccinelle/the_repository.pending.cocci | 9 + pretty.c| 13 +++-- 3 files changed, 24 insertions(+), 6

[PATCH 14/23] commit: prepare get_commit_buffer to handle any repo

2018-11-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c| 8 +--- commit.h| 7 ++- contrib/coccinelle/the_repository.pending.cocci | 8 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/commit.c

[PATCH 07/23] commit: allow parse_commit* to handle any repo

2018-11-13 Thread Stefan Beller
Just like the previous commit, parse_commit and friends are used a lot and are found in new patches, so we cannot change their signature easily. Re-introduce these function prefixed with 'repo_' that take a repository argument and keep the original as a shallow macro. Signed-off-by: Stefan

[PATCH 19/23] submodule: don't add submodule as odb for push

2018-11-13 Thread Stefan Beller
In push_submodule(), because we do not actually need access to objects in the submodule, do not invoke add_submodule_odb(). (for_each_remote_ref_submodule() does not require access to those objects, and the actual push is done by spawning another process, which handles object access by itself.)

  1   2   3   >