Hi Michael,
On Tue, 31 May 2016, Michael Haggerty wrote:
> On 05/30/2016 02:13 PM, Johannes Schindelin wrote:
> > [...]
> >> @@ -38,7 +67,11 @@ char *strbuf_detach(struct strbuf *sb, size_t *sz)
> >> {
> >>char *res;
> >>strbuf_grow(sb, 0);
> >> - res = sb->buf;
> >> + if (sb->flags &
On Tue, May 31, 2016 at 8:02 AM, Junio C Hamano wrote:
>
> diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
> index 25432d9..c4cc035 100644
> --- a/Documentation/git-reset.txt
> +++ b/Documentation/git-reset.txt
> @@ -65,8 +65,14 @@ If `-N` is specified, removed paths are mar
Hey Michael,
On Tue, May 31, 2016 at 9:55 AM, Michael Haggerty wrote:
> On 05/30/2016 08:21 PM, Pranit Bauva wrote:
>> 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_c
William Duclot writes:
> The API contract is still respected:
>
> - The API users may peek strbuf.buf in-place until they perform an
> operation that makes it longer (at which point the .buf pointer
> may point at a new piece of memory).
I think the contract is actually a bit stronger; the A
Hey Christian,
On Tue, May 31, 2016 at 3:18 AM, Christian Couder
wrote:
> On Mon, May 30, 2016 at 8:21 PM, Pranit Bauva wrote:
>> ---
>> This patch contains a bug. I have tried to identify the bug and I suppose it
>> exists in do_for_each_entry_in_dir(). I have reproduced the debugging session
>
Hi William,
On Mon, 30 May 2016, William Duclot wrote:
> Johannes Schindelin writes:
> >
> > When working e.g. with file paths or with dates, strbuf's
> > malloc()/free() dance of strbufs can be easily avoided: as
> > a sensible initial buffer size is already known, it can be
> >
Michael Haggerty writes:
> This commit introduces a new iteration primitive for references: a
> ref_iterator. A ref_iterator is a polymorphic object that a reference
> storage backend can be asked to instantiate. There are three functions
> that can be applied to a ref_iterator:
>
> * ref_iterato
Yotam Gingold writes:
> I read Junio's enumerations of the situations, and I appreciate that the
> current behavior of git reset --hard cannot be changed because of the
> many tools that rely on the current behavior. After reading it, I have
> modified my proposed amendment to the git reset --har
Torsten Bögershausen writes:
>> diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
>> index 7ce4cd7..905035c 100755
>> --- a/t/t7800-difftool.sh
>> +++ b/t/t7800-difftool.sh
>> @@ -446,7 +446,7 @@ write_script .git/CHECK_SYMLINKS <<\EOF
>> for f in file file2 sub/sub
>> do
>> echo "$
On Mon, May 30, 2016 at 3:55 AM, Michael Haggerty wrote:
> [...]
> This commit introduces a new iteration primitive for references: a
> ref_iterator. A ref_iterator is a polymorphic object that a reference
> storage backend can be asked to instantiate. There are three functions
> that can be appli
On 05/31/2016 02:26 AM, Armin Kunaschik wrote:
On 05/27/2016 06:19 AM, David Aguilar wrote:
On Wed, May 25, 2016 at 11:33:33AM +0200, Armin Kunaschik wrote:
Would you mind submitting a patch so that we can support these
tests when running on AIX/HP-UX?
I don't feel comfortable to submit patche
On 05/30/2016 08:21 PM, Pranit Bauva wrote:
> 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
On 05/30/2016 02:52 PM, Matthieu Moy wrote:
> [...]
I feel bad bikeshedding about names, especially since you took some of
the original names from my RFC. But names are very important, so I think
it's worth considering whether the current names could be improved upon.
When reading this patch seri
On Mon, May 30, 2016 at 7:21 PM, Eric Wong wrote:
> This output format prevents format-patch output from breaking
> readers if somebody copy+pasted an mbox into a commit message.
>
> Unlike the traditional "mboxo" format, "mboxrd" is designed to
> be fully-reversible. "mboxrd" also gracefully deg
On 05/30/2016 02:13 PM, Johannes Schindelin wrote:
> [...]
>> @@ -38,7 +67,11 @@ char *strbuf_detach(struct strbuf *sb, size_t *sz)
>> {
>> char *res;
>> strbuf_grow(sb, 0);
>> -res = sb->buf;
>> +if (sb->flags & STRBUF_OWNS_MEMORY)
>> +res = sb->buf;
>> +else
>>
Hi,
Cool that you are working on this! See my comments below.
On 05/30/2016 12:36 PM, William Duclot wrote:
> Test the strbuf API. Being used throughout all Git the API could be
> considered tested, but adding specific tests makes it easier to improve
> and extend the API.
> ---
> Makefile
On 05/30/2016 06:57 PM, Ramsay Jones wrote:
>
>
> On 30/05/16 16:22, Ramsay Jones wrote:
>>
>>
>> On 30/05/16 08:55, Michael Haggerty wrote:
>> [snip]
>>
>>> /* Reference is a symbolic reference. */
>>> diff --git a/refs/files-backend.c b/refs/files-backend.c
>>> index 8ab4d5f..dbf1587 100644
>>
On 05/27/2016 06:19 AM, David Aguilar wrote:
> On Wed, May 25, 2016 at 11:33:33AM +0200, Armin Kunaschik wrote:
>
> Would you mind submitting a patch so that we can support these
> tests when running on AIX/HP-UX?
I don't feel comfortable to submit patches for tests I can't verify. I
don't have v
Combined with "git format-patch --pretty=mboxrd", this should
allow us to round-trip commit messages with embedded mbox
"From " lines without corruption.
Signed-off-by: Eric Wong
---
Documentation/git-am.txt | 3 ++-
builtin/am.c | 14 +++---
t/t4150-am.sh| 20 ++
This will allow us to parse the output of --pretty=mboxrd
and the output of other mboxrd generators.
Signed-off-by: Eric Wong
---
Documentation/git-mailsplit.txt | 7 ++-
builtin/mailsplit.c | 23 +++
t/t5100-mailinfo.sh | 13 +
t/t510
This output format prevents format-patch output from breaking
readers if somebody copy+pasted an mbox into a commit message.
Unlike the traditional "mboxo" format, "mboxrd" is designed to
be fully-reversible. "mboxrd" also gracefully degrades to
showing extra ">" in existing "mboxo" readers.
Thi
Sometimes users will copy+paste an entire mbox into a
commit message, leading to bad splits when a patch is
output as an email.
Unlike other mbox-family formats, mboxrd allows reversible
round-tripping while avoiding bad splits for old "mboxo"
readers.
I'm also considering altering the current
"F
On Tue, May 31, 2016 at 12:46:23AM +0200, William Duclot wrote:
> Mike Hommey writes:
> >> struct strbuf {
> >> + unsigned int flags;
> >>size_t alloc;
> >>size_t len;
> >>char *buf;
> >> };
> >
> > Depending whether the size of strbuf matters, it /might/ be worth
> > considering s
Mike Hommey writes:
>> struct strbuf {
>> +unsigned int flags;
>> size_t alloc;
>> size_t len;
>> char *buf;
>> };
>
> Depending whether the size of strbuf matters, it /might/ be worth
> considering some packing here. malloc() usually returns buffers that can
> contain more d
David Nicolson writes:
>>> message part may contain a signature that Git itself doesn't
>>> -care about, but that can be verified with gpg.
>>> +care about, but that can be verified with GPG.
>>
>> Isn't this a name of the program, though? Other two hunks in your
>> patch clearly refer to the c
Robert Dailey writes:
> I like your solution better than mine because it utilizes the rules
> defined in .gitattributes.
A difference that may be more important is that I do not do
generation of a patch or application of it without ignoring
whitespaces with things like -w and --ignore-whitespace
> struct strbuf {
> + unsigned int flags;
> size_t alloc;
> size_t len;
> char *buf;
> };
Depending whether the size of strbuf matters, it /might/ be worth
considering some packing here. malloc() usually returns buffers that can
contain more data than what is requested. Whi
On Mon, May 30, 2016 at 8:21 PM, Pranit Bauva wrote:
> ---
> This patch contains a bug. I have tried to identify the bug and I suppose it
> exists in do_for_each_entry_in_dir(). I have reproduced the debugging session
> at this link[1]. I have seen that some patches in mailing list regarding
> ite
On Mon, May 30, 2016 at 8:02 PM, Junio C Hamano wrote:
> Dave Nicolson writes:
>
>> When "GPG" is used in a sentence it is now consistently capitalized. When
>> referring to the binary it is left as "gpg".
>>
>> Signed-off-by: David Nicolson
>> ---
>> Documentation/git-mktag.txt | 2 +-
Am 30.05.2016 um 01:55 schrieb Junio C Hamano:
René Scharfe writes:
+commit_and_tag () {
+ message=$1 &&
+ shift &&
+ git add $@ &&
Lack of dq around $@ makes me wonder if there is something funny
going on (looking at the callers, there isn't, so we'd better quote
it to avo
On Mon, May 30, 2016 at 2:06 PM, Junio C Hamano wrote:
> I have had this in my ~/.gitconfig for a long time.
>
> [alias]
> wsadd = "!sh -c 'git diff -- \"$@\" | git apply --cached
> --whitespace=fix;\
> git co -- ${1-.} \"$@\"' -"
>
> That is, "take what's different from t
Samuel GROOT writes:
> Can we consider this feature obsolete and remove it?
We're usually quite conservative with backward compatibility. If we
remove the feature, we may want to announce it in the next feature
release and actually remove it in the one after (unless we get valid
objection in the
Antoine Queru writes:
> From: Antoine Queru
Don't you want to be known to the project as the email that matches
your Signed-off-by: line?
> Use the parse-options API rather than a hand-rolled option parser.
>
> Description for --stateless-rpc and --advertise-refs come from
> 42526b4 (Add state
Robert Dailey writes:
> $ git diff -U0 -w --no-color | git apply --cached --ignore-whitespace
> --unidiff-zero
>
> This command explicitly leaves out context because it can sometimes
> cause the patch to fail to apply, I think due to whitespace being in
> it, but I'm not completely sure myself.
On Mon, May 30, 2016 at 04:16:50PM +0200, Andreas Lutro wrote:
> So I learned today that --author is not a supported argument to git
> revert. It took me a long time to realize this, though, because the
> error I got was very cryptic:
>
> fatal: BUG: expected exactly one commit from walk
>
> H
Jeff King writes:
> I think we should consider dropping the default time to something more
> like 1 day. The 2-week period predates reflogs, I believe (OTOH, it does
> save objects which you might have used with "git add" but never actually
> committed).
Your belief is shared by me.
--
To unsubs
Jeff King writes:
> On Mon, May 30, 2016 at 08:58:08PM +0300, Kirill Likhodedov wrote:
> ...
>> There are git-notes, which could be used for the purpose, but they are
>> visible to the user via standard Git command, and could be used by the
>> user for other purposes, so they are not very suitabl
Junio C Hamano writes:
> Imagine that you started from a history where somebody recorded a
> text file with CRLF in the blob, unconverted. Later the project
> decided to express their text with LF to support cross-platform
> development better, and sets up the Auto-CRLF. Your user is working
>
On Mon, May 30, 2016 at 08:58:08PM +0300, Kirill Likhodedov wrote:
> Is it possible to add custom metadata to Git commit object? Such
> metadata should be ignored by Git commands, but could be used by a
> 3-party tool which knows the format and knows where to look.
Yes. The recommended place to
On 05/30/2016 04:20 PM, Matthieu Moy wrote:
Is the "lots of email" format still used?
AFAICT, it was initially supported for backward compatibility, and then
no one removed it, but I wouldn't be surprised if no one actually used
it.
I vaguely remember a message from Ryan Anderson being surpris
Am 30.05.2016 um 20:03 schrieb Junio C Hamano:
> Johannes Schindelin writes:
>
>>> This breaks perf for the non-worktree case:
>>
>> Oh drats!
>>
>>> lsr@debian:~/src/git/t/perf$ make
>>> rm -rf test-results
>>> ./run
>>> === Running 12 tests in this tree ===
>>> cp: cannot stat '.git/objects': N
On Mon, 30 May 2016 20:58:08 +0300
Kirill Likhodedov wrote:
> Is it possible to add custom metadata to Git commit object?
> Such metadata should be ignored by Git commands, but could be used by
> a 3-party tool which knows the format and knows where to look.
>
> I assume that this should be po
On Mon, May 30, 2016 at 06:43:07PM +0200, Johannes Sixt wrote:
> I think there is logic somewhere in git gc or its minions that gives expired
> objects that have been packed a two weeks extra life time as loose objects.
>
> That is, reachable loose objects are moved to a pack, but those objects t
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 ported,
Johannes Schindelin writes:
>> This breaks perf for the non-worktree case:
>
> Oh drats!
>
>> lsr@debian:~/src/git/t/perf$ make
>> rm -rf test-results
>> ./run
>> === Running 12 tests in this tree ===
>> cp: cannot stat '.git/objects': No such file or directory
>> error: failed to copy repository
Dave Nicolson writes:
> When "GPG" is used in a sentence it is now consistently capitalized. When
> referring to the binary it is left as "gpg".
>
> Signed-off-by: David Nicolson
> ---
> Documentation/git-mktag.txt | 2 +-
> Documentation/git-tag.txt | 2 +-
> Documentation/g
tbo...@web.de writes:
> This is a little bit of a hen-and-egg problem:
> The problem comes up after the "unified auto handling".
> In theory, it should have been since before:
> get_sha1_from_index() says:
>
> * We might be in the middle of a merge, in which
> * case we would read stage #2 (ours
Is it possible to add custom metadata to Git commit object?
Such metadata should be ignored by Git commands, but could be used by a 3-party
tool which knows the format and knows where to look.
I assume that this should be possible, given that Git objects are actually
patches, and patches can c
From: Torsten Bögershausen
Split of the old 10/10 series.
This is the update of t6038, which is needed to
motivate the patch
`convert: ce_compare_data() checks for a sha1 of a path`
on top of
`convert: unify the "auto" handling of CRLF`
When files with different eols are merged with
merge.
On 30/05/16 16:22, Ramsay Jones wrote:
>
>
> On 30/05/16 08:55, Michael Haggerty wrote:
> [snip]
>
>> /* Reference is a symbolic reference. */
>> diff --git a/refs/files-backend.c b/refs/files-backend.c
>> index 8ab4d5f..dbf1587 100644
>> --- a/refs/files-backend.c
>> +++ b/refs/files-backend
From: Torsten Bögershausen
t6038 uses different code, depending if NATIVE_CRLF is set ot not.
Enhance the test coverage for cross-platform testing and run
"Merge addition of text=auto" with both lf and crlf as core.eol.
It is important to be run this test with crlf under Linux,
the day when the
I think there is logic somewhere in git gc or its minions that gives
expired objects that have been packed a two weeks extra life time as
loose objects.
That is, reachable loose objects are moved to a pack, but those objects
that were packed, but become unreachable due to expired reflogs, are
I think it would be useful to have a '-w' option for 'git add' that
completely ignores whitespace changes, the same way that 'git diff -w'
does.
Real life scenario:
Sometimes developers will use tooling that does not properly strip
trailing whitespace in source files. Next time I edit those files
On 30/05/16 08:55, Michael Haggerty wrote:
[snip]
> /* Reference is a symbolic reference. */
> diff --git a/refs/files-backend.c b/refs/files-backend.c
> index 8ab4d5f..dbf1587 100644
> --- a/refs/files-backend.c
> +++ b/refs/files-backend.c
> @@ -1,6 +1,7 @@
> #include "../cache.h"
> #includ
- Mail original -
> Antoine Queru writes:
>
> > Currently, a user wanting to prevent accidental pushes to the wrong remote
> > has to create a pre-push hook.
> > The feature offers a configuration to allow users to prevent accidental
> > pushes
> > to the wrong remote. The user may defi
Matthieu Moy writes:
> William Duclot writes:
>
>> Matthieu Moy writes:
+/**
+ * Allow the caller to give a pre-allocated piece of memory for the
strbuf
+ * to use and indicate that the strbuf must use exclusively this buffer,
+ * never realloc() it or allocate a new on
Antoine Queru writes:
> From: Antoine Queru
[ Insert here the sentence I've been repeating a lot lately about this
useless From ;-) ]
> Documentation/git-upload-pack.txt | 16 +--
> upload-pack.c | 59
> +--
> 2 files changed,
From: Antoine Queru
Use the parse-options API rather than a hand-rolled option parser.
Description for --stateless-rpc and --advertise-refs come from
42526b4 (Add stateless RPC options to upload-pack,
receive-pack, 2009-10-30).
Signed-off-by: Antoine Queru
Signed-off-by: Matthieu Moy
---
Chan
William Duclot writes:
> Matthieu Moy writes:
>
>> void strbuf_grow(struct strbuf *sb, size_t extra)
>> {
>> int new_buf = !sb->alloc;
>> ...
>> if (sb->flags & STRBUF_OWNS_MEMORY) {
>> if (new_buf) // < (1)
>> s
Hi,
I hope this is the right place to ask this, but I wanted to know whether it is
possible to have a persistant URL to obtain a snapshot of the latest master of
a repository through Gitweb.
I set up a gitweb instance and it works nicely. I can click on the snapshot
link to get a tgz archive o
Samuel GROOT writes:
> (mbox) prefix was introduced by Ryan Anderson in 2005 (can't find the
> exact commit though), in opposition with the (non-mbox) format ("lots
> of email") that was used before.
That is actually from the original commit introducing send-email:
83b2443 ([PATCH] Add git-send-
Hello Eric,
Thank you for answer. Your remarks have been added in the next version.
> > + OPT_BOOL(0, "strict", &strict,
> > +N_("do not try /.git/ if is
> > no Git directory")),
>
> Use of OPT_BOOL introduces a --no-strict option which didn't exist
> before.
So I learned today that --author is not a supported argument to git
revert. It took me a long time to realize this, though, because the
error I got was very cryptic:
fatal: BUG: expected exactly one commit from walk
Here's a very simple reproducible case:
https://gist.github.com/anlutro/67e0cec
Matthieu Moy writes:
> William Duclot writes:
>
>> @@ -20,16 +28,37 @@ char strbuf_slopbuf[1];
>>
>> void strbuf_init(struct strbuf *sb, size_t hint)
>> {
>> +sb->flags = 0;
>> sb->alloc = sb->len = 0;
>> sb->buf = strbuf_slopbuf;
>> if (hint)
>> strbuf_grow(s
On 05/29/2016 08:05 PM, Matthieu Moy wrote:
Samuel GROOT writes:
Should we take what Eric suggested (see below) as standard output?
Since the headers are already shown after those lines, it's
redundant to have the entire line. And we could add
trailers after the headers (with a blank line t
Hi Johannes,
I'm William's teammate on this feature.
Johannes Schindelin writes:
> Hi William,
>
> On Mon, 30 May 2016, William Duclot wrote:
>
> > Test the strbuf API. Being used throughout all Git the API could be
> > considered tested, but adding specific tests makes it easier to improve
On 05/29/2016 07:53 PM, Matthieu Moy wrote:
Samuel GROOT writes:
So should we merge parse_email and parse_header in one unique
subroutine?
At least on the user (i.e. caller of the API) side, one function is
probably enough.
I will do that, as soon as we decide what's best between includin
Antoine Queru writes:
> Currently, a user wanting to prevent accidental pushes to the wrong remote
> has to create a pre-push hook.
> The feature offers a configuration to allow users to prevent accidental pushes
> to the wrong remote. The user may define a list of whitelisted remotes, a list
> o
Johannes Schindelin writes:
> On Mon, 30 May 2016, William Duclot wrote:
>
>> It is unfortunate that it is currently impossible to use a strbuf
>> without doing a memory allocation. So code like
>>
>> void f()
>> {
>> char path[PATH_MAX];
>> ...
>> }
>>
>> typically gets turned into eit
William Duclot writes:
> multiple threads. Those limitations prevent strbuf to be used in
prevent strbuf from being used ...
> API ENHANCEMENT
> ---
>
> All functions of the API can still be reliably called without
> knowledge of the initialization (normal/preallocated/fixed) with t
Hi William,
On Mon, 30 May 2016, William Duclot wrote:
> It is unfortunate that it is currently impossible to use a strbuf
> without doing a memory allocation. So code like
>
> void f()
> {
> char path[PATH_MAX];
> ...
> }
>
> typically gets turned into either
>
> void f()
> {
> st
I agree with Johannes' remarks. I'd add two style nits:
William Duclot writes:
> --- /dev/null
> +++ b/t/helper/test-strbuf.c
> @@ -0,0 +1,69 @@
> +#include "git-compat-util.h"
> +#include "strbuf.h"
> +
> +/*
> + * Check behavior on usual use cases
> + */
> +int test_usual(struct strbuf *sb)
>
Hi William,
On Mon, 30 May 2016, William Duclot wrote:
> Test the strbuf API. Being used throughout all Git the API could be
> considered tested, but adding specific tests makes it easier to improve
> and extend the API.
> ---
The commit message makes sense. Please add your sign-off.
> Makefil
William Duclot writes:
> This patch series implements an improvment of the strbuf API, allowing
> strbuf to use preallocated memory. This makes strbuf fit to be used
> in performance-critical operations.
>
> The first patch is simply a preparatory work, adding tests for
> existing strbuf implemen
Às 19:27 de 23-05-2016, Vasco Almeida escreveu:
> Mark string with advice seen by the user when in detached head.
>
> Signed-off-by: Vasco Almeida
> ---
> advice.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/advice.c b/advice.c
> index 4dc5cf1..703a847 100644
>
v3 changes almost all patches so I didn't bother with interdiff
[1/6] worktree.c: add find_worktree()
This replaces the old find_wortree_by_path(). It now takes both prefix
and command line argument so it can do some intelligent things with
them if needed.
[2/6] worktree.c: find_
This allows the user to do something like "worktree lock foo" instead of
"worktree lock ". With completion support it could be quite
convenient. While this base name search can be done in the same worktree
iteration loop, the code is split into a separate function for clarity.
Suggested-by: Eric S
So far we haven't needed to identify an existing worktree from command
line. Future commands such as lock or move will need it. The current
implementation identifies worktrees by path (*). In future, the function
could learn to identify by $(basename $path) or tags...
(*) We could probably go chea
Main worktree _is_ different. You can lock a linked worktree but not the
main one, for example. Provide an API for checking that.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 5 +
worktree.h | 5 +
2 files changed, 10 insertions(+)
diff --git a/worktree.c b/worktree.c
index 4dd7
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 5 +
builtin/worktree.c | 28
contrib/completion/git-completion.bash | 2 +-
t/t2028-worktree-move.sh | 14 ++
4 files changed, 48 inse
Helped-by: Eric Sunshine
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 28 +++-
builtin/worktree.c | 38 +++
contrib/completion/git-completion.bash | 5 +++-
t/t2028-worktree-move.sh (new +x) | 4
We need this later to avoid double locking a worktree, or unlocking one
when it's not even locked.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 12
worktree.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/worktree.c b/worktree.c
index 6432eec..c6a64b1 100644
--- a/
Currently, a user wanting to prevent accidental pushes to the wrong remote
has to create a pre-push hook.
The feature offers a configuration to allow users to prevent accidental pushes
to the wrong remote. The user may define a list of whitelisted remotes, a list
of blacklisted remotes and a defaul
Test the strbuf API. Being used throughout all Git the API could be
considered tested, but adding specific tests makes it easier to improve
and extend the API.
---
Makefile | 1 +
t/helper/test-strbuf.c | 69 ++
t/t0082-strbuf.sh
It is unfortunate that it is currently impossible to use a strbuf
without doing a memory allocation. So code like
void f()
{
char path[PATH_MAX];
...
}
typically gets turned into either
void f()
{
struct strbuf path;
strbuf_add(&path, ...); <-- does a malloc
...
strbuf_re
This patch series implements an improvment of the strbuf API, allowing
strbuf to use preallocated memory. This makes strbuf fit to be used
in performance-critical operations.
The first patch is simply a preparatory work, adding tests for
existing strbuf implementation.
Most of the work is made in
On Mon, May 23, 2016 at 11:11 AM, Eric Sunshine wrote:
> On Sun, May 22, 2016 at 6:43 AM, Nguyễn Thái Ngọc Duy
> wrote:
>> So far we haven't needed to identify an existing worktree from command
>> line. Future commands such as lock or move will need it. There are of
>> course other options for i
> Le 27 mai 2016 à 09:32, Philip Oakley a écrit :
> For me, the first step would be to actually document a (the?) Triangular
> Workflow in the documentation, so we are all taking about the same broad
> method.
>
> At the moment there is a choice (assuming a ithub like service) of either
> clo
>> We are working on full implementation of triangular workflow feature.
>> For now, the main options available are:
>> - branch..pushRemote
>> - remote.pushDefault
>> And only setable by hands.
>
> And once it is set, you do not have to worry about it. I am not
> sure per-branch th
Hi René,
On Sun, 29 May 2016, René Scharfe wrote:
> Am 13.05.2016 um 15:25 schrieb Johannes Schindelin:
> > This patch makes perf-lib.sh more robust so that it can run correctly
> > even inside a worktree. For example, it assumed that $GIT_DIR/objects is
> > the objects directory (which is not th
In my last message, I forgot to add some important
contributors linked to this feature. Some of you
already replied to me.
I will answer shortly. Sorry for the noise.
>
> We are working on full implementation of triangular workflow feature.
> For now, the main options available are:
>
In the modern world of reference backends, it is not OK to delete a
symref by unlink()ing the file directly. This must be done via the refs
API.
We do so by adding the symref to the list of references to delete along
with the non-symbolic references, then calling delete_refs() with the
new flags o
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 9 -
refs/refs-internal.h | 10 +-
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 1230dfb..68db3e8 100644
--- a/refs/files-backend.c
+++ b/refs/files-back
Currently, the API for iterating over references is via a family of
for_each_ref()-type functions that invoke a callback function for each
selected reference. All of these eventually call do_for_each_ref(),
which knows how to do one thing: iterate in parallel through two
ref_caches, one for loose a
This will be useful for passing REF_NODEREF through.
Signed-off-by: Michael Haggerty
---
builtin/fetch.c | 2 +-
builtin/remote.c | 4 ++--
refs.h | 5 +++--
refs/files-backend.c | 4 ++--
4 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/builtin/fetch.c b/bui
In the context of the for_each_ref() functions, call the prefix that
references must start with "prefix". (In some places it was called
"base".) This is clearer, and also prevents confusion with another
planned use of the word "base".
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 24
There's continuing work in this area, so clean up unneeded "extern"
keywords rather than schlepping them around. Also split up some overlong
lines and add parameter names in a couple of places.
Signed-off-by: Michael Haggerty
---
refs.h | 132 +++--
Use the reference iterator interface to implement do_for_each_ref().
Delete a bunch of code supporting the old for_each_ref() implementation.
And now that do_for_each_ref() is generic code (it is no longer tied to
the files backend), move it to refs.c.
The implementation is via a new function, do_
If there is not a nonbare repository where a submodule is supposedly
located, then don't instantiate a ref_cache for it.
The analogous check can be removed from resolve_gitlink_ref().
Signed-off-by: Michael Haggerty
---
This doesn't actually reduce the number of ref_cache instances
generated by
Extract new function ref_resolves_to_object() from
entry_resolves_to_object(). It can be used even if there is no ref_entry
at hand.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 33 +++--
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/re
1 - 100 of 105 matches
Mail list logo