nch, v6 [2].
They are also available from my GitHub fork [1] as branch
`separate-ref-cache`.
Happily, this patch series actually removes a few more lines than it
adds, mostly thanks to the simpler `verify_refname_available()`
implementation.
Michael
[1] https://github.com/mhagger/git
[2] http://public-inb
On 03/20/2017 01:09 PM, Duy Nguyen wrote:
> On Mon, Mar 20, 2017 at 4:05 AM, Michael Haggerty <mhag...@alum.mit.edu>
> wrote:
>>> [...]
>>> diff --git a/refs/refs-internal.h b/refs/refs-internal.h
>>> index f732473e1d..dfa1817929 100644
>>>
On 03/20/2017 01:01 PM, Duy Nguyen wrote:
> On Mon, Mar 20, 2017 at 1:59 PM, Michael Haggerty <mhag...@alum.mit.edu>
> wrote:
>> I guess I can hold my nose and accept storing worktree and submodule
>> `ref_store`s together in a single hashmap
>
> Release you
e" in the names, because that will be a continuing
source of confusion to readers. For example,
* lookup_submodule_ref_store()
* register_submodule_ref_store()
* submodule_hash_entry
* submodule_hash_cmp()
* alloc_submodule_hash_entry()
* submodule_ref_stores
Any docstrings would also have to be updated.
As a new naming scheme, maybe use s/submodule/other/, for example
`lookup_other_ref_store()` etc.
> [...]
Michael
On 20/03/2017 16:21, Jason Hennessey wrote:
On Wed, 8 Mar 2017, Johannes Schindelin wrote:
Linus Torvalds writes ("Re: RFC: Another proposed hash function transition plan"):
> > Of course, having written that, I now realize how it would cause
problems for the usual shit-for-brains
optional
comments, but nothing serious. With or without the suggested changes, I
think it's ready to go. Thanks for working on this!
Reviewed-by: Michael Haggerty <mhag...@alum.mit.edu>
Michael
ts. At least in
t1405 the names of the constants appear in the test name, meaning that
anybody changing the constants' values in the future will probably find
the "3" in that file. Would you do the same here, please, or at least
mention the constant names in a comment here?
> [...]
Michael
> * the ref_store and to record the ref_store for later lookup.
> */
> -typedef struct ref_store *ref_store_init_fn(const char *gitdir);
> +typedef struct ref_store *ref_store_init_fn(const char *gitdir,
> + unsigned int flags);
>
> typedef int ref_init_db_fn(struct ref_store *refs, struct strbuf *err);
Michael
[1]
http://public-inbox.org/git/8fafd49f-71a6-ee97-6a69-c23e23c5d...@alum.mit.edu/
py of `gitdir`?
> */
> -typedef struct ref_store *ref_store_init_fn(const char *submodule);
> +typedef struct ref_store *ref_store_init_fn(const char *gitdir);
>
> typedef int ref_init_db_fn(struct ref_store *refs, struct strbuf *err);
Michael
the index), return the repository
> + * path of that submodule in 'buf'. Return -1 on error or when the
> + * submodule is not initialized.
> + */
Thanks for writing a docstring, but given that this is a public
function, I think it is preferred to put the docstring in the header file.
> [...]
Michael
erfluous and the function could look like
static struct ref_store *get_main_ref_store(void)
{
if (!main_ref_store)
main_ref_store = ref_store_init(NULL);
return main_ref_store;
}
> [...]
Michael
[1]
http://public-inbox.org/git/0bef1e49-e96b-1666-9b88-f4262c2ae...@alum.mit.edu/
lace to be dealing
with such errors, and indeed it seems like the check
`is_nonbare_repository_dir()` in `get_ref_store()` should make such
errors impossible, so I think your change is OK. If you agree, it might
be appropriate to mention that reasoning in the commit message.
> [...]
Michael
to fix potential permission screwups.
>
> After 6fb5acfd8f, refs dirs are created after template is copied. Nobody
> will change directory permission again. So the extra adjust_shared_perm()
> is redudant. Delete them.
LGTM. Thanks for the careful research.
Michael
> * directory, where dirname is a reference directory name including
>
You changed the declaration, but the definition still makes the function
non-static.
Michael
git describe --debug localizes all debug messages but not the terms
head, lightweight, annotated that it outputs for the candidates.
Localize them, too.
Also, increase the width of that field to create room for the translated
terms.
Signed-off-by: Michael J Gruber <g...@drmicha.warpmail.
Signed-off-by: Michael J Gruber <g...@drmicha.warpmail.net>
---
Junio: this is just a l10n-followup to the previous code patch ;)
po/de.po | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/po/de.po b/po/de.po
index e9c86f5488..913db393dc 100644
--- a/po
Signed-off-by: Michael J Gruber <g...@drmicha.warpmail.net>
---
Just a minor thing. I'm wondering about lower/upper case
at the beginning of the line, though. Do we have a rule for de.po?
po/de.po | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/po/de.po b/po/de.po
soft failure. Alternatively, some form of stale
> lockfile handling (currently there is none) could be made to work with
> a writable HEAD.lock in a read-only bare repository.
>
> Obigatory HEAD.lock creation was introduced in the following commit:
>
> commit 92b1551b1d407
> hops, without taking the "taggerdate" into account. As we are
> taking over the "taggerdate" field to store the committer date for
> tips with commits:
>
> (1) keep the original logic when comparing names based on two refs
> both of which are from refs/tags/;
>
> (2) favoring a name
Junio C Hamano venit, vidit, dixit 15.03.2017 20:21:
> Michael J Gruber <g...@drmicha.warpmail.net> writes:
>
>> `git describe --contains` calls into `git name-rev` which does not have
>> any searching to do and thus does not display any debug information.
>>
Junio C Hamano venit, vidit, dixit 15.03.2017 20:25:
> Michael J Gruber <g...@drmicha.warpmail.net> writes:
>
>> git-prompt has various describe styles, among them "describe" (by
>> annotated tags) and "default" (by exact match with any tag).
>
git-prompt has various describe styles, among them "describe" (by
annotated tags) and "default" (by exact match with any tag).
Add a mode "tag" that describes by any tag, annotated or not.
Signed-off-by: Michael J Gruber <g...@drmicha.warpmail.net>
---
name (e.g. foo~5) coming from an annotated
tag.
Instead, assign the commit date to lightweight tags or branch refs so
that they get their fair chance of being picked up.
Signed-off-by: Michael J Gruber <g...@drmicha.warpmail.net>
---
Originally, I didn't even think of submitting this as is
2 patches and 1 RFD around describe (--contains). They are technically
independent, but happened along the same stroll in that area
when I tried to match documentation, my expectations, and reality.
1 and 2 should be no-brainers.
3 is something to ponder for a while.
Michael J Gruber (3
`git describe --contains` calls into `git name-rev` which does not have
any searching to do and thus does not display any debug information.
Say so in the documentation and catch the incompatible arguments.
Signed-off-by: Michael J Gruber <g...@drmicha.warpmail.net>
---
Documentati
Signed-off-by: Michael J Gruber <g...@drmicha.warpmail.net>
---
wt-status.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index d47012048f..234e77a6d6 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1730,12 +1730,1
Bernhard E. Reiter venit, vidit, dixit 13.03.2017 13:49:
> Am Montag 13 März 2017 11:14:57 schrieb Michael J Gruber:
>> Ævar Arnfjörð Bjarmason venit, vidit, dixit 10.03.2017 15:23:
>>> On Fri, Mar 10, 2017 at 11:00 AM, Bernhard E. Reiter
>
>>>> please consider us
ith
other things that require gpg.
As for the library: While - technically speaking - the command line is
not a stable API for gpg, it does work across versions of gpg, and gpg
2.2 will be the first real stable branch that uses the new key store
layout. So I'd rather wait for that to stabilize before going away from
what turned out to be most stable so far.
Note that we (git) refrain from parsing ordinary output/return codes of
gpg and use status-fd as we should (and as documented).
Michael
ath(refs, , dirname);
> path_baselen = path.len;
>
> if (err) {
I just noticed another thing. After this change, `err` is never set, so
the `if (err)` block (and `err` itself) can be deleted.
> [...]
Michael
e other, then maybe some of the setup code could be made to look
alike? Then the division could be one test file for the functions that
work for both main and submodules, and a second for the functions that
only work for main. Just a thought...
Michael
uch legwork and
added so many tests.
Michael
rev-parse foo` &&
> + git checkout --detach &&
> + test_commit bar-commit &&
> + git checkout -b bar &&
> + BAR_SHA1=`git rev-parse bar` &&
> + $RUN update-ref updating refs/heads/foo $BAR_SHA1 $FOO_SHA1 0 &&
> + echo $BAR_SHA1 >expected &&
> + git rev-parse refs/heads/foo >actual &&
> + test_cmp expected actual
> +'
> +
> +test_expect_success 'delete_ref(refs/heads/foo)' '
> + SHA1=`git rev-parse foo` &&
> + git checkout --detach &&
> + $RUN delete-ref refs/heads/foo $SHA1 0 &&
> + test_must_fail git rev-parse refs/heads/foo --
> +'
The last two tests have the same name.
You might also want to test these functions when the old oid is
incorrect or when the reference is missing.
> +test_done
Thanks for all the new tests!
Michael
ve_ref_unsafe(ref_store, "HEAD",
> +RESOLVE_REF_NO_RECURSE,
> +head_oid.hash, _type);
> + head_ref = xstrdup_or_null(head_ref);
If you combine the last two statements, you can avoid the ugly cast.
> [...]
Michael
t see a
strong argument for one vs. the other.
It might be more natural to make `delete_pseudoref()` take a `refs`
argument and do the check internally.
(Same comments below where `write_pseudoref()` is called.)
Michael
> return delete_pseudoref(refname, old_sha1);
> +
fs =
> + files_downcast(ref_store, REF_STORE_READ | REF_STORE_ODB,
> +"peel_ref");
> int flag;
> unsigned char base[20];
>
> + files_assert_main_repository(refs, "peel_ref");
Instead of this call, couldn't you add `REF_STORE_MAIN` to the flags
passed to `files_downcase()`?
> +
> if (current_ref_iter && current_ref_iter->refname == refname) {
> struct object_id peeled;
>
> [...]
Michael
- return ref_store;
> - }
> -
> refs->gitdir = xstrdup(gitdir);
> get_common_dir_noenv(, gitdir);
> refs->gitcommondir = strbuf_detach(, NULL);
> @@ -1014,8 +1000,7 @@ static struct ref_store *files_ref_store_create(const
> char *submodule)
> static void files_assert_main_repository(struct files_ref_store *refs,
>const char *caller)
> {
> - if (refs->submodule)
> - die("BUG: %s called for a submodule", caller);
> + /* This function is to be deleted in the next patch */
I don't think the above comment is correct anymore. Possibly the commit
log message is also out of date too, but I haven't read far enough ahead
to know.
> [...]
Michael
On 03/02/2017 07:13 AM, Duy Nguyen wrote:
> On Wed, Mar 1, 2017 at 10:11 PM, Michael Haggerty <mhag...@alum.mit.edu>
> wrote:
>> By trial and error, I found that the test succeeds if I comment out the
>> "for_each_reflog()" test. By having that test write its res
On 03/01/2017 01:34 PM, Duy Nguyen wrote:
> On Wed, Mar 1, 2017 at 12:34 AM, Michael Haggerty <mhag...@alum.mit.edu>
> wrote:
>> On 02/22/2017 03:04 PM, Nguyễn Thái Ngọc Duy wrote:
>>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com>
>>> ---
&
On 03/01/2017 01:00 PM, Duy Nguyen wrote:
> On Wed, Mar 1, 2017 at 1:03 AM, Michael Haggerty <mhag...@alum.mit.edu> wrote:
>>> struct ref_store *get_ref_store(const char *submodule)
>>> {
>>> struct strbuf submodule_sb = STRBUF_INIT;
>&g
> diff --git a/submodule.h b/submodule.h
> index 05ab674f0..fc3d0303e 100644
> --- a/submodule.h
> +++ b/submodule.h
> @@ -81,6 +81,7 @@ extern int push_unpushed_submodules(struct sha1_array
> *commits,
> int dry_run);
> extern void connect_work_tree_and_git_dir(const char *work_tree, const char
> *git_dir);
> extern int parallel_submodules(void);
> +int submodule_to_gitdir(struct strbuf *buf, const char *submodule);
A docstring is always nice :-)
>
> /*
> * Prepare the "env_array" parameter of a "struct child_process" for
> executing
>
Michael
On 02/22/2017 03:04 PM, Nguyễn Thái Ngọc Duy wrote:
> v5 goes a bit longer than v4, basically:
I've read through patch 14/24 so far, and they all look good except for
the mostly superficial comments that I have sent so far. I like the way
this is heading!
I'll try to continue tomorrow.
Michael
d to operate directly on ref stores.
Nice.
Michael
*get_ref_store(const char *submodule)
> {
> struct strbuf submodule_sb = STRBUF_INIT;
> @@ -1480,6 +1479,9 @@ struct ref_store *get_ref_store(const char *submodule)
> if (is_nonbare_repository_dir(_sb))
> refs = ref_store_init(submodule);
> strbuf_release(_sb);
> +
> + if (refs)
I think `refs` should always be non-NULL here for the same reason.
> + register_submodule_ref_store(refs, submodule);
> return refs;
> }
Michael
fs,
> return;
> }
>
> - strbuf_git_path(sb, "%s", refname);
> + switch (ref_type(refname)) {
> + case REF_TYPE_PER_WORKTREE:
> + case REF_TYPE_PSEUDOREF:
> + strbuf_addf(sb, "%s/%s", refs->gitdir, refname);
> + break;
> + case REF_TYPE_NORMAL:
> + strbuf_addf(sb, "%s/%s", refs->gitcommondir, refname);
> + break;
> + default:
> + die("BUG: unknown ref type %d of ref %s",
> + ref_type(refname), refname);
> + }
> }
>
> /*
>
Michael
+ if (main_ref_store)
> + return main_ref_store;
> +
> + refs = ref_store_init(NULL);
> + return refs;
Unnecessary temporary variable?
> [...]
Michael
h_submodule(, refs->submodule, "%s",
> dirname);
> - else
> - strbuf_git_path(, "%s", dirname);
> + files_refname_path(refs, , dirname);
It's so nice to see these ugly `if (refs->submodule)` code blocks
disappearing!
> [...]
Michael
ticed that
a test in this file fails:
t1406-submodule-ref-store.sh (Wstat: 256 Tests: 15
Failed: 1)
Failed test: 10
Non-zero exit status: 1
I didn't have time to look into it more; let me know if you can't
reproduce it.
Michael
sed use of worktrees is that the worktree might live far
from the main directory, or even on removable media. But it's not
possible to rename files across partitions. Maybe this will come out in
the wash once worktrees are ref_stores themselves.
For that matter, what if a user tries to rename a worktree ref into a
common ref or vice versa?
> if (delete_ref(oldrefname, orig_sha1, REF_NODEREF)) {
> [...]
Michael
gt; + safe_create_dir(sb.buf, 1);
> + strbuf_reset();
> + strbuf_git_path(, "refs/tags");
> + safe_create_dir(sb.buf, 1);
> + strbuf_reset();
> if (get_shared_repository()) {
> - adjust_shared_perm(git_path("refs/heads"));
> - adjust_shared_perm(git_path("refs/tags"));
> + strbuf_git_path(, "refs/heads");
> + adjust_shared_perm(sb.buf);
> + strbuf_reset();
> + strbuf_git_path(, "refs/tags");
> + adjust_shared_perm(sb.buf);
> }
> + strbuf_release();
> return 0;
> }
It looks to me like `safe_create_dir()` already has the ability to
`adjust_shared_perm()`, or am I missing something? (I realize that this
is preexisting code.)
Michael
merged cleanly but someone did a "git commit --amend" to
> make it the merge dirty after the fact.
>
> I do like your approach, it's very simple and reliable. But in my
> situation I'm writing pre-receive hooks for bare repos, so I don't
> think I can actually do "git merge"!
>
> I think my suggestion would work for OP, as long as they also run "git
> show -c" alongside it. (And your suggestion would work, too, of
> course).
If you're curious, I kept rebasing Thomas' remerge-diff (on top of our
next) so far. You can find it at
https://github.com/mjg/git/tree/remerge-diff
if you're interested. I don't know what problems were found back then,
or what it would take to get this in-tree now.
Michael
icle where Linus elaborated on this?
Thanks for your help.
Kind regards
Michael
ion to my design comments before doing so.
Thanks,
Michael
le_ref_store()`, added
in a later patch) in refs/refs-internal.h for now.
If you want to move the declarations straight to `refs.h` now to avoid
code churn in some later patch series, then please mention that fact in
the commit message.
Michael
On 02/20/2017 01:33 PM, Duy Nguyen wrote:
> On Mon, Feb 20, 2017 at 7:30 PM, Michael Haggerty <mhag...@alum.mit.edu>
> wrote:
>> On 02/20/2017 01:21 PM, Duy Nguyen wrote:
>>> On Mon, Feb 20, 2017 at 7:11 PM, Michael Haggerty <mhag...@alum.mit.edu>
>>> w
On 02/20/2017 01:21 PM, Duy Nguyen wrote:
> On Mon, Feb 20, 2017 at 7:11 PM, Michael Haggerty <mhag...@alum.mit.edu>
> wrote:
>> On 02/18/2017 02:33 PM, Nguyễn Thái Ngọc Duy wrote:
>>> Since submodule or not is irrelevant to files-backend after the last
>>&
troduced a
boolean "main_repository" flag in `struct ref_store`, and use that
member to implement `files_assert_main_repository()`. That way
`files_ref_store::submodule` can still be removed, which is the more
important goal from a design standpoint.
Michael
, )) { /* reflog */
> + if (is_per_worktree_ref(ref))
> + strbuf_addf(sb, "%s/%s", refs->gitdir.buf, tmp.buf);
> + else
> + strbuf_addf(sb, "%s/%s", refs->gitcommondir.buf,
> tmp.buf);
This code would also be simpler if there were separate functions for
packed-refs, loose references, and reflogs.
> [...]
Michael
ple so that reference names that differ only in
case can be stored on a case-insensitive filesystem, or to store reflogs
using a naming scheme that is not susceptible to D/F conflicts so that
we can retain reflogs for deleted references.
Michael
[1] The only exception I see is one call `files_pa
liased to `status -s -b -uno .'
As you see here, this can include non-option arguments such as the
pathsepc '.'.
You cannot alias options independent of the command, though.
Michael
fclose(fp);
>
> does the same thing.
True; I'd forgotten the convention that non-failing functions are
allowed to change errno. Your solution is obviously simpler and faster.
Michael
rious.
I'm curious; what fraction of the overall convert-to-object_id campaign
do you estimate is done so far? Are you getting close to the promised
land yet?
Michael
't it?
Also, I think instead of the initial test `sb->len < minlen`, it would
be enough to check `!sb->len` (i.e., error if it's zero to avoid a
buffer underflow in `sb->buf[sb->len - 1])`, because the
`parse_oid_hex()` calls together with the `*p++ != ' '` and
`sb->buf[sb->len - 1] != '\n'` checks already ensure that the string has
at least the minimum length.
Then you could do away with `minlen` entirely.
Michael
; makes it sound like the function
might be satisfied with fewer than 40 characters.
Finally, you might mention the useful fact that `p` is only updated if
the function succeeds.
> [...]
Michael
bject_oid.
> [...]
Michael
we don't know the
correct errno from the error reported by ferror(), so maybe the fclose()
errno is more likely to hint at the underlying reason for the failure.
So I (reluctantly) propose
if (ferror(fp)) {
if (!fclose(fp)) {
/*
* ferror() doesn't set errno, so we have to
* set one. (By contrast, when fclose() fails
* too, we leave *its* errno in place.)
*/
errno = EIO;
}
return -1;
}
return fclose();
Michael
On 02/10/2017 08:22 PM, Junio C Hamano wrote:
> Michael Haggerty <mhag...@alum.mit.edu> writes:
>> [...]
>
> OK, but one thing puzzles me...
>
>> @@ -1390,27 +1390,6 @@ static struct ref_store *main_ref_store;
>> static struct hashmap submodule_r
Aside from scaling better, this means that the submodule name needn't be
stored in the ref_store instance anymore (which will be changed in a
moment). This, in turn, will help loosen the strict 1:1 relationship
between ref_stores and submodules.
Signed-off-by: Michael Haggerty <m
resolve_ref_recursively() to be exposed to the refs
subsystem, though not to non-refs code.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs.c | 50 +-
refs/files-backend.c | 18 --
refs/refs-internal.h | 5 ++
This avoids the need to add forward declarations in the next step.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs.c | 64
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/refs.c b/refs.c
Move the responsibility for registering the ref_store for a submodule
from base_ref_store_init() to a new function, register_ref_store(). Call
the latter from ref_store_init().
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs.c | 43 +---
Push the submodule attribute down from ref_store to files_ref_store.
This is another step towards loosening the 1:1 connection between
ref_stores and submodules.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs.c | 11 --
refs/files-backend.
The only external entry point to the ref_store lookup functions is
get_ref_store(), which ensures that submodule == "" is passed along as
NULL. So ref_store_init() and lookup_ref_store() don't have to handle
submodule being specified as the empty string.
Signed-off-by: Michael Hagg
This is another step towards weakening the 1:1 relationship between
ref_stores and submodules.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs.c | 3 +--
refs/files-backend.c | 2 +-
refs/refs-internal.h | 7 +++
3 files changed, 5 insertions(+), 7 del
oring
NULL for this case is more idiomatic and a tiny bit less code.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index c9d2d28
The following functions currently don't need to be exposed:
* ref_store_init()
* lookup_ref_store()
That might change in the future, but for now make them private.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs.c | 19 +--
refs/refs-inte
le hashmap (the default
is OK).
This patch series is also available from my fork on GitHub [2] as
branch "submodule-hash".
Michael
[1] http://public-inbox.org/git/cover.1486629195.git.mhag...@alum.mit.edu/T/#u
[2] https://github.com/mhagger/git
Michael Haggerty (9):
refs: reorder some
On 02/10/2017 01:40 AM, Jeff King wrote:
> On Thu, Feb 09, 2017 at 10:23:35PM +0100, Michael Haggerty wrote:
>
>>>> So push the submodule attribute down to the `files_ref_store` class
>>>> (but continue to let the `ref_store`s be looked up by submodule).
>>
On 02/09/2017 09:34 PM, Junio C Hamano wrote:
> Michael Haggerty <mhag...@alum.mit.edu> writes:
>> [...]
>> +static int submodule_hash_cmp(const void *entry, const void *entry_or_key,
>> + const void *keydata)
>> +{
>> +const
On 02/09/2017 08:58 PM, Jeff King wrote:
> On Thu, Feb 09, 2017 at 02:26:57PM +0100, Michael Haggerty wrote:
> [...]
>> A `files_ref_store` would be perfectly happy to represent, say, the
>> references *physically* stored in a linked worktree (e.g., `HEAD`,
>> `refs/bis
On 02/09/2017 06:20 PM, Stefan Beller wrote:
> On Thu, Feb 9, 2017 at 5:27 AM, Michael Haggerty <mhag...@alum.mit.edu> wrote:
>> Move the responsibility for registering the ref_store for a submodule
>> from base_ref_store_init() to a new function, register_ref_store(). Ca
g etc.)
I suppose this code path could be changed to return NULL without
initializing the hashmap, but the hashmap will be initialized a moment
later by ref_store_init(), so I don't see much difference either way.
Thanks for your review!
Michael
far. Now we do.
>
> Expecting a reroll.
> cf. <5051c78e-51f9-becd-e1a6-9c0b781d6...@alum.mit.edu>
I think you missed v4 of this patch series [1], which is the re-roll
that you were waiting for. And I missed that you missed it...
Michael
[1] http://public-inbox.org/git/cover.1483719289.git.mhag...@alum.mit.edu/
indicate that rebase is fine as is? How about:
- introduce "git commit --fixup-fixed=" or the like which parses
commits "-m fixup! "
- teach "git commit --fixup=" to check for duplicates (same prefix,
maybe only in "recent" history) and make it issue a warning, say:
prefix matches the following commits:
Issue
git commit --amend -m 'fixup! '
to fixup a specific commit.
(Or git commit --amend --fixup-fixed= if that flies.)
Additionally, we could teach commit --fixup-fixed to commit -m "fixup!
" so that we have both uniqueness and verbosity in the
rebase-i-editor. This would allow "rebase -i" to fall back to the old
mode when "" is not in the range it operates on. We could also try
to rewrite s when rebasing (without squashing) fixup!-commits, of
course.
Michael
e who use less disciplined workflows than git.git or the Linux
kernel. For example, many people merge a lot more frequently and
chaotically, maybe even with the parents reversed from the canonical order.
Anyway, I mostly wanted to remind you of the earlier discussion of this
topic. There's a lot m
On 02/09/2017 12:59 PM, Duy Nguyen wrote:
> On Thu, Feb 9, 2017 at 1:07 PM, Michael Haggerty <mhag...@alum.mit.edu> wrote:
>> It is unquestionably a good goal to avoid parsing references outside of
>> `refs/files-backend.c`. But I'm not a fan of this approach.
>
&g
Push the submodule attribute down from ref_store to files_ref_store.
This is another step towards loosening the 1:1 connection between
ref_stores and submodules.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs.c | 9
refs/files-backend.
oring
NULL for this case is more idiomatic and a tiny bit less code.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 794b88c
resolve_ref_recursively() to be exposed to the refs
subsystem, though not to non-refs code.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs.c | 8
refs/files-backend.c | 18 --
refs/refs-internal.h | 5 +
3 files changed, 13 insertions(+), 18 del
ely() directly using
the `ref_store` instance that it already has in hand, rather than
indirectly via the public wrappers.
Michael
[1]
http://public-inbox.org/git/341999fc-4496-b974-c117-c18a2fca1...@alum.mit.edu/
[2]
http://public-inbox.org/git/37fe2024-0378-a974-a28d-18a89d3e2...@alum.mit.edu/
[3] https:
Aside from scaling better, this means that the submodule name needn't be
stored in the ref_store instance anymore (which will be changed in a
moment). This, in turn, will help loosen the strict 1:1 relationship
between ref_stores and submodules.
Signed-off-by: Michael Haggerty <m
ref_stores and
submodules.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs.c | 19 +--
refs/files-backend.c | 2 +-
refs/refs-internal.h | 15 ++-
3 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/refs.c b/refs.c
index 7
On 02/09/2017 07:55 AM, Junio C Hamano wrote:
> Michael Haggerty <mhag...@alum.mit.edu> writes:
>
>> There are two meanings of the concept of a "ref store", and I think this
>> change muddles them:
>>
>> 1. The references that happen to be *phy
est solution would be to expose the concept of `ref_store`
in the public refs API. Then users of submodules would essentially do
struct ref_store *refs = get_submodule_refs(submodule_path);
... resolve_ref_recursively(refs, refname, 0, sha1, ) ...
... for_each_ref(refs, fn, cb_data) ...
whereas for a worktree
submodule() assume that its submodule name is already clean?
It would be nice to have a docstring here.
I also have some higher-level concerns about the approach of this patch
series, which I'll write about in a comment to patch 2/2.
Michael
y #2: The three versions in the conflict file were "nothing" (the old
develop that had none of these changes), "what was checked in" (the feature
branch), and "everything"; what I wanted was "everything - what was checked in"
(which is what git diff r
merge and a merge
conflict that is resolved by with the changes from one the parents?
Thanks,
--Michael
eferences.
I've taken some stabs at picking these apart into separate ref stores,
but haven't had time to make very satisfying progress. By the time of
GitMerge I might have a better feeling for whether I can devote some
time to this project.
Michael
[1] https://github.com/mhagger/git
when running commands like pull and clone I get the following message:
Cygwin WARNING:
Couldn't compute FAST_CWD pointer. This typically occurs if you're using
an older Cygwin version on a newer Windows. Please update to the latest
available Cygwin version from https://cygwin.com/. If
On 01/10/2017 10:35 AM, Jeff King wrote:
> On Sun, Jan 08, 2017 at 10:52:25AM +0100, Michael Haggerty wrote:
>> [...]
Since my last email, I have implemented a bunch of what we discussed
[1]. Because of the new semantics, I also *renamed the main command* from
git t
Jeff King venit, vidit, dixit 04.01.2017 08:05:
> On Mon, Jan 02, 2017 at 12:14:49PM +0100, Michael J Gruber wrote:
>
>> Currently, the headers "error: ", "warning: " etc. - generated by die(),
>> warning() etc. - are not localized, but
701 - 800 of 4489 matches
Mail list logo