The command accesses default_abbrev (defined in environment.c and is
updated via core.abbrev configuration), but never makes any call to
git_config(). The output from "worktree list" ignores the abbrev
setting for this reason.
Make a call to git_config() to read the default set of configuration
v
On Mon, Sep 26, 2016 at 02:55:45PM -0700, Junio C Hamano wrote:
> Taking these two together, perhaps squashing this in may be
> sufficient.
> [...]
> diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
> index 2c3da19..9474c37 100644
> --- a/builtin/rev-parse.c
> +++ b/builtin/rev-parse.c
> @@
Jeff King writes:
> I have to admit that I don't care too deeply about performance for
> somebody who wants to convert "latin1" to "ISO-8859-1". If one of your
> encodings is not UTF-8, you are probably Doing It Wrong. :)
Exactly. Note that the "you" in the above are usually plural,
collectivel
On Mon, Sep 26, 2016 at 06:22:11PM -0700, Junio C Hamano wrote:
> Even though latin-1 is still seen in e-mail headers, some platforms
> only install ISO-8859-1. "iconv -f ISO-8859-1" succeeds, while
> "iconv -f latin-1" fails on such a system.
>
> Using the same fallback_encoding() mechanism fac
On Mon, Sep 26, 2016 at 06:22:10PM -0700, Junio C Hamano wrote:
> @@ -501,17 +516,9 @@ char *reencode_string_len(const char *in, int insz,
>
> conv = iconv_open(out_encoding, in_encoding);
> if (conv == (iconv_t) -1) {
> - /*
> - * Some platforms do not have
On Mon, Sep 26, 2016 at 9:36 AM, Linus Torvalds
wrote:
> This looks very good to me, but I wonder if it couldn't be even more
> aggressive.
>
> In particular, the only hashes that most people ever use in short form
> are commit hashes. Those are the ones you'd use in normal human
> interactions t
Jeff King writes:
>> +test_expect_success 'malformed mode in tree' '
>> +test_must_fail git hash-object -t tree
>> ../t1007/tree-with-malformed-mode 2>err &&
>> +grep "malformed mode in tree entry for tree" err
>> +'
>
> This ".." will break when the test is run with "--root". You should
On Mon, Sep 26, 2016 at 03:32:45PM -0400, David Turner wrote:
> Instead of dying when fsck hits a malformed tree object, log the error
> like any other and continue. Now fsck can tell the user which tree is
> bad, too.
Cool. I think the lack of this is what made me drag my feet on the first
patc
On Mon, Sep 26, 2016 at 03:32:44PM -0400, David Turner wrote:
> From: Jeff King
>
> When the tree-walker runs into an error, it just calls
> die(), and the message is always "corrupt tree file".
> However, we are actually covering several cases here; let's
> give the user a hint about what happe
On Mon, Sep 26, 2016 at 09:01:15PM -0700, Junio C Hamano wrote:
> > 5 files changed, 21 insertions(+), 7 deletions(-)
> > create mode 100644 t/t1007/.gitattributes
> > create mode 100644 t/t1007/tree-with-empty-filename
> > create mode 100644 t/t1007/tree-with-malformed-mode
>
> I hate to rep
Commit e8adf23 (xdl_change_compact(): introduce the concept
of a change group, 2016-08-22) added a "struct group" type
to xdiff/xdiffi.c. But the POSIX system header "grp.h"
already defines "struct group" (it is part of the getgrnam
interface). This happens to work because the new type is
local to
David Turner writes:
> From: Jeff King
>
> When the tree-walker runs into an error, it just calls
> die(), and the message is always "corrupt tree file".
> However, we are actually covering several cases here; let's
> give the user a hint about what happened.
>
> Let's also avoid using the word
This is a very, very first draft.
It is allowing IIS to work right now.
I still need to address chunked issues, where there is no content length (see
http://www.gossamer-threads.com/lists/apache/users/373042)
Any comments, sugestions?
-Jason
--- ./origsrc/git-v2.8.3/http-backend.c 2016-05-18
Hi,
We found a malformed object file that triggers an allocation with a negative
size when parsed in git 2.10.0. It can be caused by an integer overflow
somewhere, so it is better to verify how the code got such value. It was tested
on ArchLinux x86_64. To reproduce, first recompile git with AS
Btw, this other test case will trigger a similar issue, but in another line of
code:
To reproduce:
$ git init ; mkdir -p .git/objects/b2 ; printf
'eJwNwoENgDAIBECkDsII5Z8CHagLGPePXu59zjHGRIOZG3OzI/lnRc4KemXDPdYSml6iQ+4ATIZ+nAEK4g=='
| base64 -d > .git/objects/b2/93584ddd61af21260be75ee9f73e9d
Some systems do not seem to ship "latin-1" as a valid locale, even
though they happilly accept more modern official name "ISO-8859-1".
Naturally, "iconv -f iso-8859-1" succeeds while "iconv -f latin-1"
fails on such a system.
We already have in utf8.c to accomodate overly strict iconv_open()
that
The codepath we use to call iconv_open() has a provision to use a
fallback encoding when it fails, hoping that "UTF-8" being spelled
differently could be the reason why the library function did not
like the encoding names we gave it. Essentially, we turn what we
have observed to be used as variant
Even though latin-1 is still seen in e-mail headers, some platforms
only install ISO-8859-1. "iconv -f ISO-8859-1" succeeds, while
"iconv -f latin-1" fails on such a system.
Using the same fallback_encoding() mechanism factored out in the
previous step, teach ourselves that "ISO-8859-1" has a bet
David Turner writes:
> Because truncated, to me, means "something that has been cut off". Here,
> the recorded length is too short, so it's probably not the case that
> something was cut off -- it was never right to begin with.
That's perfectly sensible. Thanks.
Sorry for the bad subject line, this is of course v2 of the series.
On Mon, 2016-09-26 at 20:11 -0400, David Turner wrote:
> From: David Turner
>
> Signed-off-by: David Turner
> ---
> .mailmap | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/.mailmap b/.mailmap
> index 9441a54..9cc33e
From: David Turner
Signed-off-by: David Turner
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index 9441a54..9cc33e9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -48,6 +48,7 @@ David KÃ¥gedal
David Reiss
David S. Miller
David Turner
+David Turner
Des
From: Jeff King
When the tree-walker runs into an error, it just calls
die(), and the message is always "corrupt tree file".
However, we are actually covering several cases here; let's
give the user a hint about what happened.
Let's also avoid using the word "corrupt", which makes it
seem like t
Instead of dying when fsck hits a malformed tree object, log the error
like any other and continue. Now fsck can tell the user which tree is
bad, too.
Signed-off-by: David Turner
---
fsck.c | 18 +++--
t/t1450-fsck.sh
Pathspecs can be a bit tricky when trying to apply them to submodules.
The main challenge is that the pathspecs will be with respect to the
superproject and not with respect to paths in the submodule. The
approach this patch takes is to pass in the identical pathspec from the
superproject to the s
Pass through some known-safe options when recursing into submodules.
(--cached, --stage, -v, -t, -z, --debug, --eol)
Signed-off-by: Brandon Williams
---
builtin/ls-files.c | 34 ++
t/t3007-ls-files-recurse-submodules.sh | 17 -
Allow ls-files to recognize submodules in order to retrieve a list of
files from a repository's submodules. This is done by forking off a
process to recursively call ls-files on all submodules. Use top-level
--submodule_prefix option to pass a path to the submodule which it can
use to prepend to o
Add a submodule-prefix environment variable
'GIT_INTERNAL_SUBMODULE_PREFIX' which can be used by commands which have
--recurse-submodule options to give context to submodules about how they
were invoked. This option is only allowed for builtins which have
submodule support.
Signed-off-by: Brandon
A couple things have changed in v4:
- Restructured the patch series to prevent a breakage mid-way.
- Added an additional patch in the middle to pass through safe options. This
way the series is structured in a more coherent manor.
- Added --submodule-prefix to top-level git.c
Hopefully this se
From: Lukas P
Adding --format to git tag -v mutes the default output of the GPG
verification and instead prints the formatted tag object.
This allows callers to cross-check the tagname from refs/tags with
the tagname from the tag object header upon GPG verification.
Caveat: The change adds a for
From: Santiago Torres
Callers of verify-tag may want to cross-check the tagname from refs/tags
with the tagname from the tag object header upon GPG verification. This
is to avoid tag refs that point to an incorrect object.
Add a --format parameter to git verify-tag to print the formatted tag
obj
From: Santiago Torres
This is the second iteration of [1], and as a result of the discussion
in [2].
In this re-roll we:
* Dropped the commit to move the format string parameter to a global
variable on builtin/tag. We had to change the signature of
for_each_name_fn to do this.
* Fixed the
From: Lukas P
Calling functions for gpg_verify_tag() may desire to print relevant
information about the header for further verification. Add an optional
format argument to print any desired information after GPG verification.
Signed-off-by: Lukas P
---
builtin/tag.c| 2 +-
builtin/ver
From: Lukas P
Functions that print git object information may require that the
gpg-interface functions be silent. Add GPG_VERIFY_QUIET flag and prevent
print_signature_buffer from being called if flag is set.
Signed-off-by: Lukas P
---
gpg-interface.h | 1 +
tag.c | 5 -
2 files
From: Lukas P
ref-filter functions are useful for printing git object information
using a format specifier. However, some other modules may not want to use
this functionality on a ref-array but only print a single item.
Expose a format_ref function to create, pretty print and free individual
ref
Part first of the review of 11/11.
W dniu 20.09.2016 o 21:02, larsxschnei...@gmail.com pisze:
> From: Lars Schneider
>
> Git's clean/smudge mechanism invokes an external filter process for
> every single blob that is affected by a filter. If Git filters a lot of
> blobs then the startup time of
Kevin Daudt writes:
> On Mon, Sep 26, 2016 at 12:26:13PM -0700, Junio C Hamano wrote:
>> Junio C Hamano writes:
>>
>> > Don't these also need to be downcased if you prefer $data over
>> > $DATA, though?
>>
>> For now, I'll queue a SQUASH??? that reverts s/DATA/data/ you did to
>> 1/2 between y
> > By the way, 7dce19d3 is interesting in another way and worth
> > studying in that it adds --submodule-prefix ;-) It may be something
> > we want to consider consolidating with what Brandon has been working
> > on.
>
> That's why Brandon is cc'd now. :)
Interesting. Once we get something we a
I have these on my TODO list to look at at some point, but who knows
when, meanwhile I thought I'd send them to the list if anyone's
interested or wants to comment on them.
= Inconsistent regexp usage:
If you supply --perl-regexp to git-log it only applies to --grep. The
documentation says "Consi
Vegard Nossum writes:
> +test_expect_success 'rev-parse merge^-0' '
> + test_must_fail git rev-parse merge^-0
> +'
> +
> +test_expect_success 'rev-parse merge^-3' '
> + test_must_fail git rev-parse merge^-3
> +'
> +
> +test_expect_success 'rev-parse merge^-^' '
> + test_must_fail git
On Mon, Sep 26, 2016 at 2:32 PM, Paul Smith wrote:
> Hi all. I'm trying to create a relocatable installation of Git 2.9.2,
> so I can copy it anywhere and it continues to run without any problem.
> This is on GNU/Linux systems, FWIW.
I had an impression that the setting was only to support MS Wi
Junio C Hamano writes:
> Micronit. When splitting "for (init; fini; cont)" into multiple
> lines, it is often easier to read to make that into three lines:
>
> for (parent_number = 1, parents = commit->parents;
>parents;
>parents = parents->next, parent_number++) {
Orgad Shaneh writes:
> On Sun, Jul 10, 2016 at 7:36 AM, Orgad Shaneh wrote:
>
>> On Wed, May 18, 2016 at 9:12 AM, Orgad Shaneh wrote:
>>> ping?
>>>
>> It's been over 2 months. Can anyone please review and merge it?
>>
> 4.5 months and counting... :(
>>
>>> On Thu, May 5, 2016 at 8:22 PM, Junio
Hi all. I'm trying to create a relocatable installation of Git 2.9.2,
so I can copy it anywhere and it continues to run without any problem.
This is on GNU/Linux systems, FWIW.
Looking through the code (for some other reason) I discovered the
RUNTIME_PREFIX setting which appears to attempt to set
Vegard Nossum writes:
> I often use rev^..rev to get all the commits in the branch that was merged
> in by the merge commit 'rev' (including the merge itself). To save typing
> (or copy-pasting, if the rev is long -- like a full SHA-1 or branch name)
> we can make rev^- a shorthand for that.
>
>
On Mon, Sep 26, 2016 at 1:54 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> After a bit more research, I think 8f0700dd33f (fetch/pull: Add the
>> 'on-demand' value to the --recurse-submodules option) is the culprit,
>> where this patch should have been squashed into, as that made the
>>
David Turner writes:
> Hopefully the encoding works correctly on these patches. If not, you
> can fetch from
> https://github.com/novalis/git/
> on branch dturner/bad-trees
This does not test cleanly here, unfortunately. Specifically, tests
30 and 31 t1007 do fine with 1/2 alone, but they seem
Stefan Beller writes:
> After a bit more research, I think 8f0700dd33f (fetch/pull: Add the
> 'on-demand' value to the --recurse-submodules option) is the culprit,
> where this patch should have been squashed into, as that made the
> both locations word for word equal.
Hmph, my digging points to
I often use rev^..rev to get all the commits in the branch that was merged
in by the merge commit 'rev' (including the merge itself). To save typing
(or copy-pasting, if the rev is long -- like a full SHA-1 or branch name)
we can make rev^- a shorthand for that.
The existing syntax rev^! seems lik
On Mon, Sep 26, 2016 at 1:29 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> Currently the section about recursing into submodules is repeated in
>> git-pull word for word as it is in fetch-options.
>>
>> Don't repeat ourselves here and include the --recurse-submodules via
>> fetch options
Stefan Beller writes:
> Currently the section about recursing into submodules is repeated in
> git-pull word for word as it is in fetch-options.
>
> Don't repeat ourselves here and include the --recurse-submodules via
> fetch options.
>
> As a bonus expose the --jobs parameter in git-pull as well
On 25 Sep 2016, at 15:46, Jakub Narębski wrote:
> W dniu 20.09.2016 o 21:02, larsxschnei...@gmail.com pisze:
>> From: Lars Schneider
>> +{
>> +static char buf[PKTLINE_DATA_MAXLEN];
>
> Sidenote: we have LARGE_PACKET_MAX (used in previous patch), but
> PKTLINE_DATA_MAXLEN not LARGE_PACKET
On Mon, 2016-09-26 at 12:43 -0700, Junio C Hamano wrote:
> David Turner writes:
>
> > The first patch is a re-roll of Peff's patch from 2014 -- here's
> > the archive message:
> >
> > http://git.661346.n2.nabble.com/PATCH-tree-walk-be-more-specific-about-corrupt-tree-errors-td7603558.html
> >
> >
Junio C Hamano writes:
> To prevent further headaches in this directory, can we have
> .gitattributes that tells us that everything in there are binary
> files? Something like the attached.
>
> The other object was transferred as a binary patch, but I have no
> faith in what I applied from your
David Turner writes:
> From: David Turner
>
> Instead of dying when fsck hits a malformed tree object, log the error
> like any other and continue. Now fsck can tell the user which tree is
> bad, too.
>
> Signed-off-by: David Turner
> ---
> fsck.c |
4.5 months and counting... :(
- Orgad
On Sun, Jul 10, 2016 at 7:36 AM, Orgad Shaneh wrote:
> It's been over 2 months. Can anyone please review and merge it?
>
> Thanks.
> - Orgad
>
> On Wed, May 18, 2016 at 9:12 AM, Orgad Shaneh wrote:
>> ping?
>>
>> On Thu, May 5, 2016 at 8:22 PM, Junio C Hama
David Turner writes:
> @@ -535,7 +536,10 @@ static int fsck_tree(struct tree *item, struct
> fsck_options *options)
> unsigned o_mode;
> const char *o_name;
>
> - init_tree_desc(&desc, item->buffer, item->size);
> + if (init_tree_desc_gently(&desc, item->buffer, item->size)
On Mon, Sep 26, 2016 at 12:26:13PM -0700, Junio C Hamano wrote:
> Junio C Hamano writes:
>
> > Don't these also need to be downcased if you prefer $data over
> > $DATA, though?
>
> For now, I'll queue a SQUASH??? that reverts s/DATA/data/ you did to
> 1/2 between your 1/2 and 2/2.
>
Ugh, thank
David Turner writes:
> The first patch is a re-roll of Peff's patch from 2014 -- here's
> the archive message:
>
> http://git.661346.n2.nabble.com/PATCH-tree-walk-be-more-specific-about-corrupt-tree-errors-td7603558.html
>
> Not sure why this wasn't applied then, but I thought it looked pretty
>
On Mon, Sep 26, 2016 at 12:32 PM, David Turner wrote:
> The first patch is a re-roll of Peff's patch from 2014 -- here's
> the archive message:
>
> http://git.661346.n2.nabble.com/PATCH-tree-walk-be-more-specific-about-corrupt-tree-errors-td7603558.html
>
> Not sure why this wasn't applied then, b
Currently the section about recursing into submodules is repeated in
git-pull word for word as it is in fetch-options.
Don't repeat ourselves here and include the --recurse-submodules via
fetch options.
As a bonus expose the --jobs parameter in git-pull as well as that is
declared as a OPT_PASSTH
The first patch is a re-roll of Peff's patch from 2014 -- here's
the archive message:
http://git.661346.n2.nabble.com/PATCH-tree-walk-be-more-specific-about-corrupt-tree-errors-td7603558.html
Not sure why this wasn't applied then, but I thought it looked pretty
good, so I added a few tests.
Hope
From: David Turner
Instead of dying when fsck hits a malformed tree object, log the error
like any other and continue. Now fsck can tell the user which tree is
bad, too.
Signed-off-by: David Turner
---
fsck.c | 18 +++--
t/t1450-fsck.sh
From: Jeff King
When the tree-walker runs into an error, it just calls
die(), and the message is always "corrupt tree file".
However, we are actually covering several cases here; let's
give the user a hint about what happened.
Let's also avoid using the word "corrupt", which makes it
seem like t
On 25 Sep 2016, at 13:26, Jakub Narębski wrote:
> W dniu 20.09.2016 o 21:02, larsxschnei...@gmail.com pisze:
>> From: Lars Schneider
>> ...
>>
>> +static int packet_write_gently(const int fd_out, const char *buf, size_t
>> size)
>
> I'm not sure what naming convention the rest of Git uses, b
Junio C Hamano writes:
> Don't these also need to be downcased if you prefer $data over
> $DATA, though?
For now, I'll queue a SQUASH??? that reverts s/DATA/data/ you did to
1/2 between your 1/2 and 2/2.
Thanks.
Kevin Daudt writes:
> rfc2822 has provisions for quoted strings and comments in structured header
> fields, but also allows for escaping these with so-called quoted-pairs.
>
> The only thing git currently does is removing exterior quotes, but
> quotes within are left alone.
>
> Remove exterior qu
Johannes Schindelin writes:
> Also, I found https://tinyurl.com/gitCal very convenient a URL to point
> to, do you plan to update that for v2.11.0?
Thanks for reminding. I've barely had enough bandwidth to keep up
with the list traffic for the past few weeks, and haven't got around
to it. Will
Kevin Daudt writes:
> Many tests need to store data in a file, and repeat the same pattern to
> refer to that path:
>
> "$TEST_DIRECTORY"/t5100/
>
> Create a variable that contains this path, and use that instead.
>
> Signed-off-by: Kevin Daudt
> Signed-off-by: Junio C Hamano
> ---
> Chang
On 24 Sep 2016, at 23:22, Jakub Narębski wrote:
> W dniu 20.09.2016 o 21:02, larsxschnei...@gmail.com pisze:
>
>> From: Lars Schneider
>>
>> Subject: [PATCH v8 02/11] pkt-line: extract set_packet_header()
>>
>> set_packet_header() converts an integer to a 4 byte hex string. Make
>> this func
On 24 Sep 2016, at 23:14, Jakub Narębski wrote:
> Hello Lars,
>
> W dniu 20.09.2016 o 21:02, larsxschnei...@gmail.com pisze:
>
>> From: Lars Schneider
>>
>> packet_write() should be called packet_write_fmt() as the string
>> parameter can be formatted.
>
> I would say:
>
> packet_write()
Brandon Williams writes:
> or something along those lines. That way we only need to add the flag
> to each command as we go ...
Sounds good. Thanks.
On 09/26, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > In a previous email you mentioned that this feature should be completely
> > hidden from users, which is why I removed the command line option for
> > this latest series.
>
> I may have said something like that; I do not recall, th
Vasco Almeida writes:
>> > + } elsif ($did eq 'reversed') {
>> > + printf(Q__("reversed one path\n", "reversed %d paths\n",
>
> This should be 'reverted' not 'reversed'.
I'll mark v2 of this topic "not to be merged yet"; please send in a
corrected version 3 after you collect feedbacks
Brandon Williams writes:
> In a previous email you mentioned that this feature should be completely
> hidden from users, which is why I removed the command line option for
> this latest series.
I may have said something like that; I do not recall, though, so a
more accurate description might be
A Qua, 31-08-2016 às 12:31 +, Vasco Almeida escreveu:
> Mark plural strings for translation. Unfold each action case in one
> entire sentence.
>
> Pass new keyword for xgettext to extract.
>
> Update test to include new subrotine Q__() for plural strings handling.
>
> > Signed-off-by: Vasco
Junio C Hamano writes:
> I am inclined to say that it has no security implications. You have
> to be able to write a bogus loose object in an object store you
> already have write access to in the first place, in order to cause
> this ...
Note that you could social-engineer others to fetch from
Gustavo Grieco writes:
> Fair enough. We are testing our tool to try to find
> bugs/vulnerabilities in several git implementations. I will report
> here my results if i can find some other memory issue in this git
> client.
Thanks. With or without security implications, it is basic codebase
hyg
Fair enough. We are testing our tool to try to find bugs/vulnerabilities in
several git implementations. I will report here my results if i can find some
other memory issue in this git client.
- Original Message -
> Gustavo Grieco writes:
>
> > Now that the cause of this issue is ident
Gustavo Grieco writes:
> Now that the cause of this issue is identified, i would like to
> know if there is an impact in the security, so i can request a CVE
> if necessary.
I am inclined to say that it has no security implications. You have
to be able to write a bogus loose object in an object
Jeff King writes:
>> Other than your reinvention of HAS_MULTI_BITS(), which has been with
>> us since db7244bd ("parse-options new features.", 2007-11-07), this
>> looks like a reasonable thing to do.
>
> Heh, I _thought_ we had something like that but couldn't find it. I
> grepped for "[^&]& .*-
Hello,
Now that the cause of this issue is identified, i would like to know if there
is an impact in the security, so i can request a CVE if necessary.
Thanks!
On Mon, Sep 26, 2016 at 10:33:57AM -0700, Junio C Hamano wrote:
> -- >8 --
> From: Junio C Hamano
> Date: Mon, 26 Sep 2016 09:23:41 -0700
> Subject: [PATCH 1/2] streaming: make sure to notice corrupt object
>
> The streaming read interface from a loose object called
> parse_sha1_header() but dis
Jeff King writes:
> Since it's attached to an error path, I'm guessing nobody will be too
> upset about it, so my inclination was to wait and let somebody add the
> conditional advice code if they're bothered.
Fair enough. At that point of getting an error message, the only
thing they can do is
Jeff King writes:
>> diff --git a/streaming.c b/streaming.c
>> index 811fcc2..884a8f1 100644
>> --- a/streaming.c
>> +++ b/streaming.c
>> @@ -347,7 +347,8 @@ static open_method_decl(loose)
>> return -1;
>> }
>>
>> -parse_sha1_header(st->u.loose.hdr, &st->size);
>> +if
On Mon, Sep 26, 2016 at 10:34:32AM -0700, Junio C Hamano wrote:
> And the second one, that no longer checks SP in unpacker, looks like
> this.
This looks good from a cursory read (but I am about to go to sleep, so
might be a bit less careful than usual :) ).
-Peff
Jeff King writes:
> I left the second one in to make the intention more explicit, and so
> readers did not have to worry that the NULs were overwritten in the
> loop. I'd be OK with it either way, though.
Yes, I agree with that it is a good thing to make our intention more
explicit and I am perf
On Mon, Sep 26, 2016 at 10:30:48AM -0700, Junio C Hamano wrote:
> Jeff King writes:
>
> > We also restrict the list to those that match any
> > disambiguation hint. E.g.:
> >
> > $ git rev-parse b2e1:foo
> > error: short SHA1 b2e1 is ambiguous
> > hint: The candidates are:
> > hint: b2
And the second one, that no longer checks SP in unpacker, looks like
this.
-- >8 --
Subject: [PATCH] unpack_sha1_header(): detect malformed object header
When opening a loose object file, we often do this sequence:
- prepare a short buffer for the object header (on stack)
- call unpack_sha1_h
Junio C Hamano writes:
> Good that your attempt to signature-changing change caught it. I'll
> take a further look.
So here are two patch series. The first one makes sure all callers
of parse_sha1_header() check the returned status.
-- >8 --
From: Junio C Hamano
Date: Mon, 26 Sep 2016 09:23:
Jeff King writes:
> We also restrict the list to those that match any
> disambiguation hint. E.g.:
>
> $ git rev-parse b2e1:foo
> error: short SHA1 b2e1 is ambiguous
> hint: The candidates are:
> hint: b2e1196 tag v2.8.0-rc1
> hint: b2e11d1 tree
> hint: b2e1632 commit 2007-11-14
On Mon, Sep 26, 2016 at 10:10:46AM -0700, Junio C Hamano wrote:
> > struct disambiguate_state {
> > int len; /* length of prefix in hex chars */
> > - char hex_pfx[GIT_SHA1_HEXSZ];
> > + char hex_pfx[GIT_SHA1_HEXSZ + 1];
> > unsigned char bin_pfx[GIT_SHA1_RAWSZ];
> >
> > disambi
On Mon, Sep 26, 2016 at 09:55:20AM -0700, Junio C Hamano wrote:
> > Instead, we can use parse_object(). Note that this is the
> > same fix done by 94d75d1 (get_short_sha1(): correctly
> > disambiguate type-limited abbreviation, 2013-07-01), but
> > that commit fixed only the committish disambiguat
On Sun, Sep 25, 2016 at 11:39 AM, Junio C Hamano wrote:
> Johannes Sixt writes:
>
>> Am 24.09.2016 um 13:30 schrieb René Scharfe:
>>> Starting with v2.5.0 git merge can handle FETCH_HEAD internally and
>>> warns when it's called like 'git merge HEAD ' because
>>> that syntax is deprecated. Use
On Mon, Sep 26, 2016 at 09:37:10AM -0700, Junio C Hamano wrote:
> > We can do the check easily with some bit-twiddling, and as a
> > bonus, the bit-mask of disambiguators will come in handy in
> > a future patch.
> >
> > Signed-off-by: Jeff King
> > ---
>
> Other than your reinvention of HAS_MUL
Michael J Gruber writes:
>> Then currently %G? results in `N', the same as an unsigned commit.
>>
>> In this case, could %G? please result in a new character? Perhaps `M'
>> for "missing public key"?
>
> Yes, and no.
>
> Really, there are many different reasons why a signature couldn't be
> chec
Jeff King writes:
> We store the hex prefix in a 40-byte buffer with the prefix
> itself followed by 40-minus-len "x" characters. These x's
> serve no purpose, and the lack of NUL termination makes the
> prefix string annoying to use. Let's just terminate it.
> Note that this is in contrast to t
On 09/25, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > On 09/25, Jeff King wrote:
> >> On Fri, Sep 23, 2016 at 05:13:31PM -0700, Brandon Williams wrote:
> >>
> >> > After looking at the feedback I rerolled a few things, in particular the
> >> > --submodule_prefix option that existed to
Jeff King writes:
> The treeish disambiguation function tries to peel tags, but
> it does so by calling:
>
> deref_tag(lookup_object(sha1), ...);
>
> This will only work if we have previously looked at the tag
> and created a "struct tag" for it. Since parsing revision
> arguments typically hap
Jeff King writes:
> The get_sha1() family of functions takes a flags field, but
> some of the flags are mutually exclusive. In particular, we
> can only handle one disambiguating function, and the flags
> quietly override each other. Let's instead detect these as
> programming bugs.
>
> Technical
On Mon, Sep 26, 2016 at 5:00 AM, Jeff King wrote:
>
> This patch teaches get_short_sha1() to list the sha1s of the
> objects it found, along with a few bits of information that
> may help the user decide which one they meant.
This looks very good to me, but I wonder if it couldn't be even more ag
1 - 100 of 125 matches
Mail list logo