use syntax similar to `git-checkout` to make optional for
`ls-tree`. if is omitted, default to HEAD. infer arguments as
follows:
1. if args start with --
assume to be HEAD
2. if exactly one arg precedes --, treat the argument as
3. if more than one arg precedes --, exit with an error
4
Signed-off-by: Joshua Nelson
---
t/t3104-ls-tree-optional-args.sh | 43
1 file changed, 43 insertions(+)
create mode 100644 t/t3104-ls-tree-optional-args.sh
diff --git t/t3104-ls-tree-optional-args.sh t/t3104-ls-tree-optional-args.sh
new file mode 100644
index 0
show [tree-ish] and [--] as optional
---
builtin/ls-tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git builtin/ls-tree.c builtin/ls-tree.c
index 14102b052..c5649b09c 100644
--- builtin/ls-tree.c
+++ builtin/ls-tree.c
@@ -26,7 +26,7 @@ static int chomp_prefix;
static const ch
On 2018-06-26 14:35, Junio C Hamano wrote:
Having said that, I'm a bit surprised that our build infrastructure
and shell scripts still work on tools on SunOS. I used to have
access to SunOS/Solaris boxes and tried to be careful not to break
them unnecessarily, but these days I don't, so I expect
During negotiation, fetch-pack eventually reports as "have" lines all
commits reachable from all refs. Allow the user to restrict the commits
sent in this way by providing a whitelist of tips; only the tips
themselves and their ancestors will be sent.
Both globs and single objects are supported.
When fetching, connectivity is checked after the shallow file is
updated. There are 2 issues with this: (1) the connectivity check is
only performed up to ancestors of existing refs (which is not thorough
enough if we were deepening an existing ref in the first place), and (2)
there is no rollback
On Sun, Jul 01, 2018 at 06:21:40PM +0200, Toralf Förster wrote:
> as "git fsck" does it already for "Checking objects:"
>
> Is this a valid feature request?
It's actually hard to do accurately. We don't know how many objects are
reachable until we traverse the graph...which is exactly what the
"
On Mon, Jul 2, 2018 at 5:12 PM Jeff King wrote:
> When for-each-ref is used with --ignore-case, we expect
> match_name_as_path() to do a case-insensitive match. But
> there's an extra layer of filtering that happens before we
> even get there. Since commit cfe004a5a9 (ref-filter: limit
> traversal
On Mon, Jul 2, 2018 at 12:49 PM Jameson Miller wrote:
>
> Teach make_cache_entry function to take object_id instead of a SHA-1.
This repeats the subject line?
Sign off missing.
On Mon, Jul 2, 2018 at 2:27 PM Stefan Beller wrote:
> On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine wrote:
> > This series fixes several buggy tests which went undetected due to
> > broken &&-chains in subshells, modernizes some tests to take advantage
> > of test functions (test_might_fail(), tes
On Mon, Jul 2, 2018 at 2:14 PM Stefan Beller wrote:
> On Sun, Jul 1, 2018 at 5:25 PM Eric Sunshine wrote:
> > test_expect_success 'grep from a subdirectory to search wider area (2)' '
> > mkdir -p s &&
> > (
> > - cd s || exit 1
> > - ( git grep xxyyzz
When for-each-ref is used with --ignore-case, we expect
match_name_as_path() to do a case-insensitive match. But
there's an extra layer of filtering that happens before we
even get there. Since commit cfe004a5a9 (ref-filter: limit
traversal to prefix, 2017-05-22), we feed the prefix to the
ref back
From: Aleksandr Makarov
The match_name_as_path() function learned to set
WM_IGNORECASE in the "flags" field when the user passed
--ignore-case. But it forgot to actually pass the flags to
wildmatch()!
As a result, the --ignore-case feature has been broken since
it was added in 3bb16a8bf2 (tag, b
The --ignore-case option was added by 3bb16a8bf2 (tag,
branch, for-each-ref: add --ignore-case for sorting and
filtering, 2016-12-04), but it was never tested. And indeed,
it does not work due to multiple bugs (which will be fixed
in subsequent patches).
Signed-off-by: Jeff King
---
t/t6300-for-
This is a follow-up to this patch last September:
https://public-inbox.org/git/79c946a2-532e-1c9b-7bf2-1f1ccbff7...@gmail.com/
The patch was the right thing to do, but:
1. It needed a commit message.
2. It needed a signoff.
3. It needed a test, which then showed that there was _another_ b
On Mon, Jul 2, 2018 at 1:44 PM Stefan Beller wrote:
> > diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh
> > test_expect_success 'diff --no-index with binary creation' '
> > echo Q | q_to_nul >binary &&
> > - (: hide error code from diff, which just indicates differences
Hi,
I just published a blog post about last week:
https://blog.pa1ch.fr/posts/2018/07/02/en/gsoc2018-week-9.html
Cheers,
Alban
On 6/30/2018 5:08 AM, Nguyễn Thái Ngọc Duy wrote:
Signed-off-by: Nguyễn Thái Ngọc Duy
---
commit-graph.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/commit-graph.c b/commit-graph.c
index b63a1fc85e..c8d521923c 100644
--- a/commit-graph.c
+++ b/co
The grep code invokes show_line() to display the contents of a matched
or context line in its output. Part of this execution is to print a line
header that includes information such as the kind, the line- and
column-number and etc. of that match.
To prepare for the addition of an option to print o
Teach 'git grep --only-matching', a new option to only print the
matching part(s) of a line.
For instance, a line containing the following (taken from README.md:27):
(`man gitcvs-migration` or `git help cvs-migration` if git is
Is printed as follows:
$ git grep -no -e git -- README.md | gre
Hi,
Attached is the second re-roll of my series to teach 'git grep
--only-matching'. Since last time, not much has changed. The change I
did include is summarized below, and an inter-diff is attached as
always.
- Initialize both match_color and line_color to NULL, thereby
silencing a compil
On Sun, Jul 1, 2018 at 9:22 AM Toralf Förster wrote:
>
> as "git fsck" does it already for "Checking objects:"
>
> Is this a valid feature request?
Yes it is. However it is most likely to have the feature incorporated if
it comes in form of a patch.
So clone one of the git.git repositories found
+cc Pat, in the hope of an answer.
See
https://public-inbox.org/git/xmqqd0z61xsv@gitster-ct.c.googlers.com/
on the state of git-gui and its lack of maintenance. Maybe Junio will
pickup this patch.
On Mon, Jul 2, 2018 at 11:35 AM Martin Schön
wrote:
>
> Use the file described by commit.templa
Instead of searching all memory blocks for available space to fulfill
a memory request, only search the head block. If the head block does
not have space, assume that previous block would most likely not be
able to fulfill request either. This could potentially lead to more
memory fragmentation, bu
Add an option (controlled by an environment variable) perform extra
validations on mem_pool allocated cache entries. When set:
1) Invalidate cache_entry memory when discarding cache_entry.
2) When discarding index_state struct, verify that all cache_entries
were allocated from expected m
Refactor refresh_cache_entry() to work on a specific index, instead of
implicitly using the_index. This is in preparation for making the
make_cache_entry function apply to a specific index.
Signed-off-by: Jameson Miller
---
cache.h | 2 +-
merge-recursive.c | 2 +-
read-cache.c |
Changes since v5:
- Updated commit messages for:
7581156e8a read-cache: teach refresh_cache_entry to take istate
2c962aa0cd block alloc: add lifecycle APIs for cache_entry structs
- Use oidcpy function instead of hashcpy function
### Interdiff (v5..v6):
diff --git a/read-cache.c b/re
It has been observed that the time spent loading an index with a large
number of entries is partly dominated by malloc() calls. This change
is in preparation for using memory pools to reduce the number of
malloc() calls made to allocate cahce entries when loading an index.
Add an API to allocate a
When reading large indexes from disk, a portion of the time is
dominated in malloc() calls. This can be mitigated by allocating a
large block of memory and manage it ourselves via memory pools.
This change moves the cache entry allocation to be on top of memory
pools.
Design:
The index_state str
Add initialization and discard functions to mem_pool type. As the
memory allocated by mem_pool can now be freed, we also track the large
allocations.
If the there are existing mp_blocks in the mem_poo's linked list of
mp_blocksl, then the mp_block for a large allocation is inserted
behind the head
Teach make_cache_entry function to take object_id instead of a SHA-1.
---
apply.c| 2 +-
builtin/checkout.c | 2 +-
builtin/difftool.c | 4 ++--
builtin/reset.c| 2 +-
cache.h| 7 ++-
merge-recursive.c | 2 +-
read-cache.c | 8 +---
resolve-undo.c | 2
Add functions for:
- combining two memory pools
- determining if a memory address is within the range managed by a
memory pool
These functions will be used by future commits.
Signed-off-by: Jameson Miller
---
mem-pool.c | 42 ++
mem-pool.h
Dear Good Friend Contact Money Gram ,,For Your Fund,,
It's my pleasure to inform you that after our Board of Directors
meeting this morning with H.E. Mr. Alpha Condé The AU Chairman we have
concluded to release your Overdue payment worth $1.6 Million USD
through Money Gram Service.
Please find th
On Mon, Jul 2, 2018 at 10:36 AM Brandon Williams wrote:
>
> On 06/28, Stefan Beller wrote:
> > The option of --color-moved has proven to be useful as observed on the
> > mailing list. However when refactoring sometimes the indentation changes,
> > for example when partitioning a functions into sma
Use the file described by commit.template (if set) to show the commit message
template, just like other GUIs.
Signed-off-by: Martin Sch??n
---
git-gui.sh | 9 +
lib/commit.tcl | 1 +
2 files changed, 10 insertions(+)
diff --git a/git-gui.sh b/git-gui.sh
index 5bc21b8..6fc598d 100755
On Sun, Jul 1, 2018 at 5:25 PM Eric Sunshine wrote:
>
> This test manually checks the exit code of git-grep for a particular
> value. In doing so, it intentionally breaks the &&-chain. Modernize the
> test by taking advantage of test_expect_code() and a normal &&-chain.
>
> Signed-off-by: Eric Sun
> > +void mem_pool_combine(struct mem_pool *dst, struct mem_pool *src) {
> > + struct mp_block *p;
> > +
> > + /* Append the blocks from src to dst */
> > + if (dst->mp_block && src->mp_block) {
> > + /*
> > +* src and dst have blocks, append
> > +* blocks fr
On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine wrote:
>
> This series fixes several buggy tests which went undetected due to
> broken &&-chains in subshells, modernizes some tests to take advantage
> of test functions (test_might_fail(), test_write_lines(), etc.), and
> fixes a lot of broken &&-chai
On Mon, Jul 02, 2018 at 04:09:32PM +0200, Lars Schneider wrote:
> Brian had a good argument [1] for an even more flexible system
> proposed by Peff:
>
>
> 1) We allow users to define custom encoding mappings in their Git config.
> Example:
>
> git config --global core.encoding.myenc UTF-16
On Sun, Jul 01, 2018 at 05:56:58PM +, brian m. carlson wrote:
> On Thu, Jun 28, 2018 at 01:27:07PM -0400, Jeff King wrote:
> > Yeah, that was along the lines that I was thinking. I wonder if anybody
> > would ever need two such auto-encodings, though. Probably not. But
> > another way to think
On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine wrote:
>
> These tests employ a noisy subshell (with missing &&-chain) to feed
> input into Git commands or files:
>
> (echo a; echo b; echo c) | git some-command ...
>
> Simplify by taking advantage of test_write_lines():
>
> test_write_lines a
> diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh
> index 0a8af76aab..6579c81216 100755
> --- a/t/t4012-diff-binary.sh
> +++ b/t/t4012-diff-binary.sh
> @@ -102,10 +102,8 @@ test_expect_success 'apply binary patch' '
>
> test_expect_success 'diff --no-index with binary creation' '
>
On 06/28, Stefan Beller wrote:
> The option of --color-moved has proven to be useful as observed on the
> mailing list. However when refactoring sometimes the indentation changes,
> for example when partitioning a functions into smaller helper functions
> the code usually mostly moved around except
On Sun, Jul 1, 2018 at 8:57 AM Michael Haggerty wrote:
>
> On 06/29/2018 10:28 PM, Stefan Beller wrote:
> > [...]
> > Adds some threshold to avoid expensive cases, like:
> >
> > ```
> > #!python
> > open('a', 'w').write(" \n" * 100)
> > open('b', 'w').write(" \n" * 101)
On 06/28, Stefan Beller wrote:
> In the original implementation of the move detection logic the choice for
> ignoring white space changes is the same for the move detection as it is
> for the regular diff. Some cases came up where different treatment would
> have been nice.
>
> Allow the user to
On 06/28, Stefan Beller wrote:
> The new "blocks" mode provides a middle ground between plain and zebra.
> It is as intuitive (few colors) as plain, but still has the requirement
> for a minimum of lines/characters to count a block as moved.
>
> Suggested-by: Ævar Arnfjörð Bjarmason
> (https://p
On 06/30, Nguyễn Thái Ngọc Duy wrote:
> Like part 1 this is also boring. I wanted to drop these 'extern'
> everywhere actually, so before I touched any header file in this
> series, I did a clean up first. This is the result (and to reduce diff
> noise later)
I've scanned through the series and it
> -Lars Schneider wrote: -
> To: Jeff King
> From: Lars Schneider
> Date: 06/28/2018 18:21
> Cc: "brian m. carlson" , Steve Groeger
> , git@vger.kernel.org
> Subject: Re: Use of new .gitattributes working-tree-encoding attribute across
> different platform types
>
>
>> On Jun 28, 201
If a file is renamed on one side of history, and the other side of history
both deletes the original file and adds a new unrelated file in the way of
the rename, then we have what I call a rename/add/delete conflict. Add a
testcase covering this scenario.
Reported-by: Robert Dailey
Signed-off-by
In merging, every rename acts as a two-piece lego in terms of conflicts.
We have long realized that the other branch can (1) delete the source
side of a rename, giving a rename/delete conflict, or (2) add a file in
the way of the rename destination, giving a rename/add conflict, or (3)
have a renam
If either side of a rename/rename(2to1) conflict is itself also involved
in a rename/delete conflict, then the conflict is a little more complex;
we can even have what I'd call a rename/rename(2to1)/delete/delete
conflict. (In some ways, this is similar to a rename/rename(1to2)/add/add
conflict, a
Each rename is a lego: the source side could be connected to a delete or
another rename, and the destination side could be connected to a rename or a
conflicting add. Previous tests combined these to get e.g.
rename/rename(1to2)/add/add, rename/rename(2to1)/delete/delete, and
rename/add/delete. B
Lars,
I think this proposed solution may resolve my issue.
Thanks
Steve Groeger
Java Runtimes Development
IBM Hursley
IBM United Kingdom Ltd
Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129
Fax (44) 1962 816800
Lotus Notes: Steve Groeger/UK/IBM
Internet: groe...@uk.ibm.c
This rewrites the edit-todo functionality from shell to C.
To achieve that, a new command mode, `edit-todo`, is added, and the
`write-edit-todo` flag is removed, as the shell script does not need to
write the edit todo help message to the todo list anymore.
The shell version is then stripped in f
As part of the rewrite of interactive rebase, the sequencer will need to
open the sequence editor to allow the user to edit the todo list.
Instead of duplicating the existing launch_editor() function, this
refactors it to a new function, launch_specified_editor(), which takes
the editor as a parame
This adds a new function, run_command_silent_on_success(), to
redirect the stdout and stderr of a command to a strbuf, and then to run
that command. This strbuf is printed only if the command fails. It is
functionnaly similar to output() from git-rebase.sh.
run_git_commit() is then refactored to u
This rewrites checkout_onto() from shell to C.
A new command (“checkout-onto”) is added to rebase--helper.c. The shell
version is then stripped.
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 25 -
sequencer.c
This rewrites (the misnamed) setup_reflog_action() from shell to C. The
new version is called prepare_branch_to_be_rebased().
A new command is added to rebase--helper.c, “checkout-base”, as well as
a new flag, “verbose”, to avoid silencing the output of the checkout
operation called by checkout_ba
This rewrites append_todo_help() from shell to C. It also incorporates
some parts of initiate_action() and complete_action() that also write
help texts to the todo file.
This also introduces the source file rebase-interactive.c. This file
will contain functions necessary for interactive rebase tha
This makes rebase_path_todo(), get_missing_commit_check_level() and the
enum check_level accessible outside sequencer.c. check_level is renamed
missing_commit_check_level, and its value names are prefixed by
MISSING_COMMIT_ to avoid namespace pollution.
This will be needed for the rewrite of appe
This patch series rewrites some parts of interactive rebase from shell
to C:
- append_todo_help(). The C version covers a bit more than the shell
version.
- The edit-todo functionnality.
- The reflog operations.
The v1 of this series is an aggregate made by Junio of my patch series
about
Hi Junio,
Le 29/06/2018 à 20:23, Junio C Hamano a écrit :
> Junio C Hamano writes:
>
>> Let's aggregate these topics into a single topic, and perhaps call
>> it ag/rebase-i-in-c or something like that. Pretending as if they
>> are separately replaceable does not make much sense, as you are not
This patch gives life to the skeleton added in the previous patch.
This patch makes real operation happen i.e. by using
`git -c rebase.usebuiltin=true rebase `.
With this patch, the basic operation of rebase can be done.
The current version of the builtin rebase does not, however, make full
use of
The motivation behind this commit is to extract the core part of
do_reset() from sequencer.c and move it to a new detach_head_to()
function in checkout.c.
Here the index only gets locked after performing the first part of
`do_reset()` rather than before which essentially derives the `oid`
from the
As a GSoC project, I have been working on the builtin rebase.
The motivation behind the rewrite of rebase i.e. from shell script to C
are for following reasons:
1. Writing shell scripts and getting it to production is much faster
than doing the equivalent in C but lacks in performance and ex
The function present in `git-legacy-rebase.sh` are used by backends
so, this refactor tries to extract the functions out so that, the
`git-legacy-rebase.sh` can be retired easily as the
`git-rebase--common.sh` will provide the functions for now.
The motivation behind this is to call the backend fu
This commit imitates the strategy that was used to convert the
difftool to a builtin, see be8a90e (difftool: add a skeleton for the
upcoming builtin, 2017-01-17) for details: This commit renames the
shell script `git-rebase.sh` to `git-legacy-rebase.sh` and hands off to
it by default.
The current
67 matches
Mail list logo