Junio C Hamano writes:
> Lars Schneider writes:
>
>> A quick bisect indicates that this patch might break
>> t9807-git-p4-submit.sh 8 and 13. I haven't looked into
>> it further, yet.
>
> As I do not do P4, help in diagnosing why it breaks is appreciated.
> If the test script expects...
> On th
Commit 0281e487fd91 ("grep: optionally recurse into submodules")
added functions grep_submodule() and grep_submodule_launch() which
uses "struct work_item" which is defined only when thread support
is available.
When building git with toolchain that don't have thread support, we
get following buil
Lars Schneider writes:
> A quick bisect indicates that this patch might break
> t9807-git-p4-submit.sh 8 and 13. I haven't looked into
> it further, yet.
As I do not do P4, help in diagnosing why it breaks is appreciated.
If the test script expects a commit, that can be described in two
more mo
Devin Lehmacher writes:
> +# test that the daemon works with no special setup
> helper_test cache
> +
> +test_expect_success 'socket defaults to ~/.cache/git/credential/socket' '
> + test_when_finished "
> + git credential-cache exit &&
> + rmdir -p .cache/git/credent
On 15/03/17 22:29, Junio C Hamano wrote:
Torsten Bögershausen writes:
The real "show stopper" is at the end.
...
==
And it seams as if zlib is the limitation here.
Unless we include the zlib source code into Git and redefine uLong,
is there a nice way around this:
Stefan Beller writes:
> On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote:
>> Sync does some work determining what URLs should be used for a submodule
>> but then throws this work away if the submodule isn't active. Instead
>> perform the activity check earlier and skip inactive submodule
Jonathan Nieder writes:
> Stefan Beller wrote:
>
>> Subject: wt-status.c: improve readability for wt_shortstatus_print
>
> Maybe:
>
> wt-status: simplify by using for_each_string_list_item
>
> Improve readability by using the for_each_string_list_item helper
> instead of manuall
Jeff King writes:
> On Thu, Mar 16, 2017 at 03:43:13PM -0700, Junio C Hamano wrote:
>
>> Jeff King writes:
>>
>> > +ifdef USE_SHA1DC
>> > + LIB_OBJS += sha1dc/sha1.o
>> > + LIB_OBJS += sha1dc/ubc_check.o
>> > + BASIC_CFLAGS += -DSHA1_SHA1DC
>>
>> The name of this CPP symbol is one differenc
Jeff King writes:
> On Thu, Mar 16, 2017 at 03:23:59PM -0700, Junio C Hamano wrote:
>
>> I am wondering if we should queue another one for .travis.yml on top
>> to force use of USE_SHA1DC=YesPlease during the tests. I expect
>> that we'd be encouraging its use for ordinary users without any
>> s
> On 16 Mar 2017, at 06:50, Junio C Hamano wrote:
>
> "git name-rev" assigned a phony "far in the future" date to tips of
> refs that are not pointing at tag objects, and favored names based
> on a ref with the oldest date. This made it almost impossible for
> an unannotated tags and branches t
> On 17 Mar 2017, at 11:18, Lars Schneider wrote:
>
>
>> On 17 Mar 2017, at 03:22, Linus Torvalds
>> wrote:
>>
>> I think there's a semantic merge error and it clashes with
>> f18f816cb158 ("hash.h: move SHA-1 implementation selection into a
>> header file").
>>
>> Suggested possible merge
> On 17 Mar 2017, at 03:22, Linus Torvalds
> wrote:
>
> I think there's a semantic merge error and it clashes with
> f18f816cb158 ("hash.h: move SHA-1 implementation selection into a
> header file").
>
> Suggested possible merge resolution attached.
>
> Linus
>
Would it ma
We already have xdg_config_home to format paths relative to
XDG_CONFIG_HOME. Let's provide a similar function xdg_cache_home to do
the same for paths relative to XDG_CACHE_HOME.
Signed-off-by: Devin Lehmacher
---
cache.h | 7 +++
path.c | 15 +++
2 files changed, 22 insertions(
Signed-off-by: Devin Lehmacher
---
t/t0301-credential-cache.sh | 94 +
1 file changed, 94 insertions(+)
diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh
index 82c841121..82c4dfa07 100755
--- a/t/t0301-credential-cache.sh
+++ b/t/t
Make git-credential-cache follow the XDG base path specification by
default. This increases consistency with other applications and helps
keep clutter out of users' home directories.
Check the old socket location, ~/.git-credential-cache/, and use
~/.git-credential-cache/socket if that directory e
Git has started requiring write access to the root of bare repositories
in order to create /HEAD.lock. This is a major security problem in
shared environments as it also entails control over the /config link
i.e. core.hooksPath. Permission to write objects and update refs should
be entirely separat
On Thu, Mar 16, 2017 at 03:23:59PM -0700, Junio C Hamano wrote:
> I am wondering if we should queue another one for .travis.yml on top
> to force use of USE_SHA1DC=YesPlease during the tests. I expect
> that we'd be encouraging its use for ordinary users without any
> specific needs in the releas
On Thu, Mar 16, 2017 at 11:59:35PM +0100, Johannes Schindelin wrote:
> I do not recall why I chose warning(); probably just an oversight on my
> part. Your patch looks good.
Thanks. Here it is with a commit message.
I agree with Junio that if we had "info()" it would perhaps be the right
thing t
So far I've merged the following topics to 'maint' in preparation
for the first maintenance update for 2.12:
* Reduce authentication round-trip over HTTP when the server supports
just a single authentication method. This also improves the
behaviour when Git is misconfigured to enable http.
On Thu, Mar 16, 2017 at 03:43:13PM -0700, Junio C Hamano wrote:
> Jeff King writes:
>
> > +ifdef USE_SHA1DC
> > + LIB_OBJS += sha1dc/sha1.o
> > + LIB_OBJS += sha1dc/ubc_check.o
> > + BASIC_CFLAGS += -DSHA1_SHA1DC
>
> The name of this CPP symbol is one difference between this and
> Linus's
On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote:
> Currently the submodule..url config option is used to determine if
> a given submodule is of interest to the user. This ends up being
> cumbersome in a world where we want to have different submodules checked
> out in different worktrees
On Thu, Mar 16, 2017 at 4:24 PM, Stefan Beller wrote:
> On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote:
>> Sync does some work determining what URLs should be used for a submodule
>> but then throws this work away if the submodule isn't active. Instead
>> perform the activity check earl
On 03/16, Stefan Beller wrote:
> On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote:
> > Sync does some work determining what URLs should be used for a submodule
> > but then throws this work away if the submodule isn't active. Instead
> > perform the activity check earlier and skip inactive
On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote:
> Sync does some work determining what URLs should be used for a submodule
> but then throws this work away if the submodule isn't active. Instead
> perform the activity check earlier and skip inactive submodule in order
> to avoid doing un
Hi Peff,
On Thu, 16 Mar 2017, Jeff King wrote:
> I was rebasing with the new built-in sequencer code today, and I was
> surprised to see the use of warning() here:
>
> $ git rebase -i
> [set one commit to 'edit']
> warning: stopped at 6ce6b914a... odb_pack_keep(): stop generating keepfile
On 03/16/2017 02:17 PM, Junio C Hamano wrote:
Yeah, the example was solely to see how the system was to be
extended, as one of the selling point of the proposal was:
> === Endpoint support for forward compatibility
>
> This "server" endpoint requires that the first line be understood
Stefan Beller wrote:
> Jonathan Nieder wrote:
>> Is it important to avoid clutter by showing the submodule only once?
>> What would you think of showing whatever subset of those three
>> statuses apply to a given submodule as separate lines instead, to
>> match the information that long-form "git
Stefan Beller wrote:
> Subject: wt-status.c: improve readability for wt_shortstatus_print
Maybe:
wt-status: simplify by using for_each_string_list_item
Improve readability by using the for_each_string_list_item helper
instead of manually iterating with an integer counter
Jeff King writes:
> +ifdef USE_SHA1DC
> + LIB_OBJS += sha1dc/sha1.o
> + LIB_OBJS += sha1dc/ubc_check.o
> + BASIC_CFLAGS += -DSHA1_SHA1DC
The name of this CPP symbol is one difference between this and
Linus's version. Wouldn't "-DSHA1_DC" make more sense?
Another difference is that
>
> Is it important to avoid clutter by showing the submodule only once?
> What would you think of showing whatever subset of those three
> statuses apply to a given submodule as separate lines instead, to
> match the information that long-form "git status" shows?
I considered it, but it would bre
On Thu, Mar 16, 2017 at 3:04 PM, Jeff King wrote:
>
> There are a few things I think are worth changing. The die() message
> should mention the sha1 we computed. That will be a big help if an old
> version of git tries to unknowingly push a colliding object to a newer
> version. The user will see
The definition of which submodules are of interest by the user
is tied to the configuration submodule..url; when it is
set to a non-empty string, it is of interest. We'd want to be
able to later change this definition, but there are many places
that explicitly check this condition in the scripted
When initializing a submodule set the submodule..active config to
true if the module hasn't already been configured to be active by some
other means (e.g. a pathspec set in submodule.active).
Signed-off-by: Brandon Williams
---
builtin/submodule--helper.c | 7 +++
t/t7400-submodule-basic.sh
In addition to adding submodule..url to the config, set
submodule..active to true unless submodule.active is configured
and the submodule's path matches the configured pathspec.
Signed-off-by: Brandon Williams
---
git-submodule.sh | 12
t/t7413-submodule-is-active.sh |
Teach `submodule init` to initialize submodules which have been
configured to be active by setting 'submodule.active' with a pathspec.
Now if no path arguments are given and 'submodule.active' is configured,
`init` will initialize all submodules which have been configured to be
active. If no path
Teach clone --recurse-submodules to optionally take a pathspec argument
which describes which submodules should be recursively initialized and
cloned. If no pathspec is provided, --recurse-submodules will
recursively initialize and clone all submodules by using a default
pathspec of ".". In order
Signed-off-by: Brandon Williams
---
git-submodule.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 577136148..db94dea3b 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -1089,14 +1089,14 @@ cmd_sync()
while read mo
Lots of changes in v4 to address comments by Junio, Ramsay, and Stefan.
* Overhaul a lot of the commit messages (thanks Junio for helping wordsmith)
* Change how submodule.active functions with `submodule init` and clone
--recurse-submodules. This allowed me to not have to add additional
Signed-off-by: Brandon Williams
---
git-submodule.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 136e26a2c..ab233712d 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -1010,14 +1010,13 @@ cmd_status()
do
Use the 'is_submodule_initialized()' helper to check for configured
submodules instead of manually checking for the submodule's URL in the
config.
Signed-off-by: Brandon Williams
---
builtin/submodule--helper.c | 15 +++
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/
Currently the submodule..url config option is used to determine if
a given submodule is of interest to the user. This ends up being
cumbersome in a world where we want to have different submodules checked
out in different worktrees or a more generalized mechanism to select
which submodules are of
Sync does some work determining what URLs should be used for a submodule
but then throws this work away if the submodule isn't active. Instead
perform the activity check earlier and skip inactive submodule in order
to avoid doing unnecessary work.
Signed-off-by: Brandon Williams
---
git-submodu
Jeff King writes:
> I was rebasing with the new built-in sequencer code today, and I was
> surprised to see the use of warning() here:
>
> $ git rebase -i
> [set one commit to 'edit']
> warning: stopped at 6ce6b914a... odb_pack_keep(): stop generating keepfile
> name
> You can amend the
Jeff King writes:
> On Thu, Mar 16, 2017 at 06:04:56PM -0400, Jeff King wrote:
>
>> So here's my version. It's on top of the hash.h tweak, as well.
>>
>> [1/5]: add collision-detecting sha1 implementation
>> [2/5]: sha1dc: adjust header includes for git
>> [3/5]: sha1dc: disable safe_hash
Hi,
Yay, I like the change this makes. So I'll nitpick in the hope that
that makes the patch more likely to stick.
Stefan Beller wrote:
> While we already have a porcelain2 layer for git-status, that is accurate
> for submodules, users still like the way they are are used to of
> 'status -s'.
On Thu, Mar 16, 2017 at 06:04:56PM -0400, Jeff King wrote:
> So here's my version. It's on top of the hash.h tweak, as well.
>
> [1/5]: add collision-detecting sha1 implementation
> [2/5]: sha1dc: adjust header includes for git
> [3/5]: sha1dc: disable safe_hash feature
> [4/5]: Makefile:
This knob lets you use the sha1dc implementation from:
https://github.com/cr-marcstevens/sha1collisiondetection
which can detect certain types of collision attacks (even
when we only see half of the colliding pair). So it
mitigates any attack which consists of getting the "good"
half of a c
The safe_hash feature is designed to make sha1dc a drop-in
replacement for sha1, where colliding entries will get a
permuted hash to un-collide them. However, since we're
handling the collision case ourselves, this isn't helpful
(and is actually harmful, as it means you get the wrong
object id if y
We can replace system includes with git-compat-util.h or
cache.h (and should make sure it is included first in all C
files). And we can drop includes from headers entirely, as
every C file should include git-compat-util.h itself.
We will add in new include guards around the header files,
though (
Great! Keep us posted if there is anything else that you would like from the
code. Or anyway we can make the process go more smoothly.
Thanks,
Dan
-Original Message-
From: Jeff King [mailto:p...@peff.net]
Sent: Thursday, March 16, 2017 3:06 PM
To: Marc Stevens
Cc: Linus Torvalds ; Da
On Thu, Mar 16, 2017 at 01:24:02PM -0700, Linus Torvalds wrote:
> I suspect the first patch will not make it to the list since it's over
> 100kB in size, but oh well.. Junio and Jeff will see it.
Yep, it didn't make it, but I got it.
> It "WorksForMe(tm)" and the integration patches are now fai
On Thu, Mar 16, 2017 at 07:22:14PM +0100, Marc Stevens wrote:
> Today I merged the perf-branch into master after code review and correctness
> testing.
> So master is now more performant and safe to use.
Great, thank you (and Dan) so much for all your work. We're looking at
integrating this vers
On 3/9/2017 3:18 PM, Jonathan Tan wrote:
Overall, this fetch/clone approach seems reasonable to me, except
perhaps some unanswered questions (some of which are also being
discussed elsewhere):
- does the server need to tell us of missing blobs?
- if yes, does the server need to tell us their
Signed-off-by: Stefan Beller
---
wt-status.c | 20 +---
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index d47012048f..a52d342695 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1785,34 +1785,24 @@ static void wt_shortstatus_print_trackin
Jonathan Tan writes:
> On 03/15/2017 10:59 AM, Junio C Hamano wrote:
>> ...
>> but I am wondering how you would extend the proposed system to do
>> so. Would you add "fetch-size-limited-blob-in-tree-pack" that runs
>> parallel to "fetch-blob-pack" request? Would you add a new type of
>> request
> > > +test_expect_success 'credential-cache --socket option overrides default
> > > location' '
> > > + test_when_finished "rm -rf \"$HOME\"/dir/" &&
> > > + check approve "cache --socket \"$HOME/dir/socket\"" <<-\EOF &&
> > > + protocol=https
> > > + host=example.com
> > > + username=store-user
While we already have a porcelain2 layer for git-status, that is accurate
for submodules, users still like the way they are are used to of
'status -s'.
As a submodule has more state than a file potentially, we need more letters
indicating these states, we'll go with lower 'm' and single '?' for no
From: Linus Torvalds
Date: Thu, 16 Mar 2017 13:08:38 -0700
Subject: [PATCH 2/2] Integrate the sha1dc code with the git build
This adds the proper magic to actually build the sha1dc code as part of
git when USE_SHA1DC is enabled.
This includes
- adjusting the sha1dc include directives for git
On Thu, Mar 16, 2017 at 12:51 PM, Linus Torvalds
wrote:
>
> I'll send a patch on top of 'next', which already has the header file changes.
Patches sent. It all looked fairly straightforward to me, but maybe I
missed something.
Linus
I suspect the first patch will not make it to the list since it's over
100kB in size, but oh well.. Junio and Jeff will see it.
This is sent as two patches, just to have the original upstream code as a
first step, and then the second patch does the small modifications to
integrate it with git.
On Thu, Mar 16, 2017 at 12:46 PM, Junio C Hamano wrote:
>
> That's easy to answer. What we have on 'pu' is a fair game for
> wholesale replacement. That is the whole point of not merging
> topics in flux to 'next' and declaring that 'pu' will constantly
> rewind.
Ok.
I'll send a patch on top o
Linus Torvalds writes:
> I think there's a semantic merge error and it clashes with
> f18f816cb158 ("hash.h: move SHA-1 implementation selection into a
> header file").
>
> Suggested possible merge resolution attached.
>
>Linus
Obviously I have not been paying much attention
Linus Torvalds writes:
> On Thu, Mar 16, 2017 at 12:41 PM, Jeff King wrote:
>>
>> Potentially we should just eject sha1dc from "pu" for the moment. It
>> needs re-rolled with the most recent version of the collision library
>> (and I see Marc just posted that they hit a stable point, which is
>>
On Thu, Mar 16, 2017 at 12:41 PM, Jeff King wrote:
>
> Potentially we should just eject sha1dc from "pu" for the moment. It
> needs re-rolled with the most recent version of the collision library
> (and I see Marc just posted that they hit a stable point, which is
> perhaps why you're looking at i
On Thu, Mar 16, 2017 at 12:22:00PM -0700, Linus Torvalds wrote:
> I think there's a semantic merge error and it clashes with
> f18f816cb158 ("hash.h: move SHA-1 implementation selection into a
> header file").
>
> Suggested possible merge resolution attached.
Yeah, your resolution makes sense.
I think there's a semantic merge error and it clashes with
f18f816cb158 ("hash.h: move SHA-1 implementation selection into a
header file").
Suggested possible merge resolution attached.
Linus
Makefile | 2 +-
hash.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
di
On 03/16, Christian Couder wrote:
> On Thu, Mar 16, 2017 at 7:56 PM, Junio C Hamano wrote:
> > Christian Couder writes:
> >
> >> On Mon, Mar 13, 2017 at 9:08 PM, sourav mondal
> >> wrote:
> >>> javascript is one of the famous langugae,it's needs a built-in driver.
> >>
> >> Please use "Javascrip
On Thu, Mar 16, 2017 at 7:56 PM, Junio C Hamano wrote:
> Christian Couder writes:
>
>> On Mon, Mar 13, 2017 at 9:08 PM, sourav mondal
>> wrote:
>>> javascript is one of the famous langugae,it's needs a built-in driver.
>>
>> Please use "Javascript" instead of "javascript".
>
> While we are typo-
Jeff King writes:
>> so that we can always use name.buf without having to do "?:" thing.
>
> See the next patch. :)
Nice ;-) Thanks, queued the whole thing.
Christian Couder writes:
> On Mon, Mar 13, 2017 at 9:08 PM, sourav mondal
> wrote:
>> javascript is one of the famous langugae,it's needs a built-in driver.
>
> Please use "Javascript" instead of "javascript".
While we are typo-spotting ;-) Wikipedia seems to prefer to spell it
"JavaScript".
On Mon, Mar 13, 2017 at 9:08 PM, sourav mondal
wrote:
> javascript is one of the famous langugae,it's needs a built-in driver.
Please use "Javascript" instead of "javascript".
There is a typo in "language" above, also maybe "it needs" instead of
"it's needs", and please add a blank space before i
On Thu, Mar 16, 2017 at 11:33:36AM -0700, Junio C Hamano wrote:
> Jeff King writes:
>
> > + struct strbuf name = STRBUF_INIT;
> > int err;
> >
> > if (!from_stdin) {
> > @@ -1402,14 +1402,13 @@ static void final(const char *final_pack_name,
> > const char *curr_pack_name,
> >
Jeff King writes:
> + struct strbuf name = STRBUF_INIT;
> int err;
>
> if (!from_stdin) {
> @@ -1402,14 +1402,13 @@ static void final(const char *final_pack_name, const
> char *curr_pack_name,
> int keep_fd, keep_msg_len = strlen(keep_msg);
>
> if
Junio C Hamano writes:
> Devin Lehmacher writes:
>
>> +int directory_exists(const char *path)
>> +{
>> +struct stat sb;
>> +int ret = lstat(path, &sb);
>> +return ret == 0 && S_ISDIR(sb.st_mode);
>> +}
>
> I am not a great fan of using file_exists() [*1*] on anything other
> than pat
Hi all,
Today I merged the perf-branch into master after code review and correctness
testing.
So master is now more performant and safe to use.
-- Marc
On Thu, Mar 16, 2017 at 09:20:29AM -0700, Junio C Hamano wrote:
> static char *get_socket_path(void)
> {
> struct stat st;
> char *path;
>
> path = expand_user_path("~/.git-credential-cache");
> if (path && !stat(path, &st) && S_ISDIR(st.st_mode))) {
> free(p
On Thu, Mar 16, 2017 at 09:29:58AM -0700, Junio C Hamano wrote:
> Devin Lehmacher writes:
>
> > @@ -20,4 +21,67 @@ helper_test_timeout cache --timeout=1
> > # our socket, leaving us with no way to access the daemon.
> > git credential-cache exit
> >
> > +# we need to use rm -rf here since so
On Thu, Mar 16, 2017 at 05:03:03PM +, Ramsay Jones wrote:
> > Incidentally, this entire function could be implemented as:
> >
> > return git_path_buf(buf, "objects/pack/pack-%s.%s",
> > sha1_to_hex(sha1), ext);
> >
> > as the git_path() functions are smart enough to r
On 03/15/2017 10:59 AM, Junio C Hamano wrote:
By "SHA-1s for which it wants blobs", you mean that "want" only
allows one exact blob object name? I think it is necessary to
support that mode of operation as a base case, and it is a good
starting point.
When you know
- you have a "partial" clon
On 16/03/17 14:31, Jeff King wrote:
> On Thu, Mar 16, 2017 at 10:27:06AM -0400, Jeff King wrote:
>
>> -/*
>> - * Return the name of the pack or index file with the specified sha1
>> - * in its filename. *base and *name are scratch space that must be
>> - * provided by the caller. which should
Brandon Williams writes:
> So if we did
>
> git clone --submodule-spec=lib/
>
> then each module under 'lib/' won't have their submodule..active
> config set since submodule.active=lib/ already encompasses them.
Ah, OK. That removes my worries ;-) Thanks for an explanation.
Hi,
If you have some untracked files and your run `git stash -u`. Then
`git stash show` doesn't show the untracked files. Is there a flag
that can be passed to git stash show to report untracked files?
Thanks,
Okash
Devin Lehmacher writes:
> @@ -20,4 +21,67 @@ helper_test_timeout cache --timeout=1
> # our socket, leaving us with no way to access the daemon.
> git credential-cache exit
>
> +# we need to use rm -rf here since sometimes the daemon hasn't finished
> +# cleaning up after itself and rmdir fail
Devin Lehmacher writes:
> + If your home directory is on a network-mounted filesystem, you
> + may need to change this to a local filesystem. You must specify
> + an absolute path.
Nicely explained.
If a socket cannot be created in "~/.git-credential-cache", existing
users would ha
Devin Lehmacher writes:
> +int directory_exists(const char *path)
> +{
> + struct stat sb;
> + int ret = lstat(path, &sb);
> + return ret == 0 && S_ISDIR(sb.st_mode);
> +}
I am not a great fan of using file_exists() [*1*] on anything other
than paths in the working tree (i.e. in prep
On 16/03/17 14:27, Jeff King wrote:
> The final() function accepts a NULL value for certain
> parameters, and falls back to writing into a reusable "name"
> buffer, and then either:
>
> 1. For "keep_name", requiring all uses to do "keep_name ?
> keep_name : name.buf". This is awkward, and
On 16/03/17 14:27, Jeff King wrote:
> In several places we write the name of the pack filename
> into a fixed-size buffer using snprintf(), but do not check
> the return value. As a result, a very long object directory
> could cause us to quietly truncate the pack filename
> (potentially leading
On Thu, Mar 16, 2017 at 10:27:06AM -0400, Jeff King wrote:
> -/*
> - * Return the name of the pack or index file with the specified sha1
> - * in its filename. *base and *name are scratch space that must be
> - * provided by the caller. which should be "pack" or "idx".
> - */
> -static char *sha
The final() function accepts a NULL value for certain
parameters, and falls back to writing into a reusable "name"
buffer, and then either:
1. For "keep_name", requiring all uses to do "keep_name ?
keep_name : name.buf". This is awkward, and it's easy
to accidentally look at the maybe-
The odb_pack_keep() function generates the name of a .keep
file and opens it. This has two problems:
1. It requires a fixed-size buffer to create the filename
and doesn't notice when the result is truncated.
2. Of the two callers, one sometimes wants to open a
filename it already ha
In several places we write the name of the pack filename
into a fixed-size buffer using snprintf(), but do not check
the return value. As a result, a very long object directory
could cause us to quietly truncate the pack filename
(potentially leading to a corrupted repository, as a newly
written p
These functions were originally conceived as wrapper
functions similar to xmkstemp(). They were later moved by
463db9b10 (wrapper: move odb_* to environment.c,
2010-11-06). The more appropriate place for a declaration is
in cache.h.
While we're at it, let's add some basic docstrings.
Signed-off-b
We provide sha1_pack_name() and sha1_pack_index_name(), but
the more generic form (which takes its own strbuf and an
arbitrary extension) is only used to implement the other
two. Let's make it available, but clean up a few things:
1. Name it odb_pack_name(), as the original
sha1_get_pack_n
Here's a re-roll of the series from:
http://public-inbox.org/git/20170315212617.6x57bvltinuoz...@sigill.intra.peff.net/
The general gist is the same, but there are a number of changes:
- I dropped the first patch factoring out finalize_file(), as Ramsay
pointed out a subtle difference b
I was rebasing with the new built-in sequencer code today, and I was
surprised to see the use of warning() here:
$ git rebase -i
[set one commit to 'edit']
warning: stopped at 6ce6b914a... odb_pack_keep(): stop generating keepfile
name
You can amend the commit now, with
[...more instr
On Thu, Mar 16, 2017 at 02:17:38AM -0400, Devin Lehmacher wrote:
> If the pwd contains a ' escape it as '\'' so that git will not fail
> while building on a path containing '.
I think this only fixes half the problem...
> diff --git a/Makefile b/Makefile
> index ed68700ac..5cf5d8537 100644
> ---
On Wed, Mar 15, 2017 at 3:50 PM, Junio C Hamano wrote:
> Here is a reroll of what I did in
>
> http://public-inbox.org/git/xmqqd1die00j@gitster.mtv.corp.google.com/
>
> Junio C Hamano (2):
> name-rev: refactor logic to see if a new candidate is a better name
> name-rev: favor describin
On Wed, Mar 15, 2017 at 10:10 AM, Stefan Beller wrote:
> On Fri, Mar 3, 2017 at 7:40 AM, Robert Dailey
> wrote:
>> I have a repository with a single submodule in it. Since the parent
>> repository represents the code base for an actual product, I tag
>> release versions in the parent repository.
98 matches
Mail list logo