git mailing list

FromSubjectsort iconDate
Pierre Habouzit
[PATCH] Make git-send-email add missing angles < > aro...
This is a most annoying issue with git-send-email: I never know if it will add < > or not. Now, it just check if there are some or not, if not it adds them, so that it just works. Signed-off-by: Pierre Habouzit <madcoder@debian.org> --- git-send-email.perl | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index dd7560b..61e9c9c 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -632,6 +632,10 @@ X-Mai...
Sep 11, 8:00 pm 2007
Martin Langhoff
[BUG] Funny output from git grep -c
Nothing major, but I thought I'd mention it. If I pass the -c parameter to git grep, it invariably talks about /dev/null. $ git --version git version 1.5.3.1.40.g6972 $ git grep -c has_capability lib/weblib.php /dev/null:0 lib/weblib.php:29 $ git grep -c has_capability | head /dev/null:0 README.txt:0 ... cheers, m -
Sep 11, 6:14 pm 2007
Pierre Habouzit
[PATCH] Don't push /dev/null as an argument of grep when -c ...
Signed-off-by: Pierre Habouzit <madcoder@debian.org> --- builtin-grep.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/builtin-grep.c b/builtin-grep.c index e13cb31..b93fa00 100644 --- a/builtin-grep.c +++ b/builtin-grep.c @@ -261,7 +261,7 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached) * * GNU grep has "-H", but this is portable. */ - if (!opt->name_only && !opt->unmatch_name_only) + if (!opt->name_o...
Sep 11, 6:46 pm 2007
Junio C Hamano
Re: [PATCH] Don't push /dev/null as an argument of grep when...
I am afraid this does not work either. The /dev/null here is to avoid sending a singleton filename to the external grep when we need to split the argument list, as output from "grep foo A B" and concatenation of output from "grep foo A" and "grep foo B" are different. -
Sep 11, 6:58 pm 2007
Pierre Habouzit
[PATCH] Split grep arguments in a way that does not requires...
As adding /dev/null may create spurious output, and that grep applied to a singleton does not works the same way than when it's applied to more than one file, split the arguments in a way that the last batch has never a singleton. Though, when there is only one file in the repository, force adding /dev/null as we cannot do anything about it. Also, as we "spare" one argument from the batch before the last (supposedly a full batch) we must be sure this batch with one element less has at least 2 e...
Sep 11, 7:39 pm 2007
Pierre Habouzit
[PATCH] Split grep arguments in a way that does not requires...
As adding /dev/null may create spurious output, and that grep applied to a singleton does not works the same way than when it's applied to more than one file, split the arguments in a way that the last batch has never a singleton. Though, when there is only one file in the repository, force adding /dev/null as we cannot do anything about it. Also, as we "spare" one argument from the batch before the last (supposedly a full batch) we must be sure this batch with one element less has at least 2 e...
Sep 11, 7:36 pm 2007
Pierre Habouzit
Re: [PATCH] Split grep arguments in a way that does not requ...
Sorry, I sent the wrong patch (again, so sth is seriously broken in my workflow). the next one has the correct decrement: nbargs -=3D argc - nr, before argc =3D nr. --=20 =C2=B7O=C2=B7 Pierre Habouzit =C2=B7=C2=B7O madcoder@debia= n.org OOO http://www.madism.org
Sep 11, 7:41 pm 2007
Pierre Habouzit
Re: [PATCH] Don't push /dev/null as an argument of grep when...
oh, right, now I get it, I was confused by the comment before that code, now that you explain it it looks more obvious. So the better fix is that when we split, we should never be in the case when you have a singleton :) that should be not that hard. --=20 =C2=B7O=C2=B7 Pierre Habouzit =C2=B7=C2=B7O madcoder@debia= n.org OOO http://www.madism.org
Sep 11, 7:07 pm 2007
Ramsay Jones
[PATCH] Fix a test failure (t9500-*.sh) on cygwin
On filesystems where it is appropriate to set core.filemode to false, test 29 ("commitdiff(0): mode change") fails when git-commit does not notice a file (execute) permission change. A fix requires noting the new file execute permission in the index with a "git update-index --chmod=+x", prior to the commit. Add a function (note_chmod) which implements this idea, and insert a call in each test that modifies the x permission. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> --- Hi...
Sep 11, 2:16 pm 2007
Junio C Hamano Sep 11, 3:08 pm 2007
Josh England
[PATCH] Added post_merge hook, related documentation, and te...
The post_merge hook enables one to hook in for `git pull` operations in order to check and/or change attributes of a work tree from the hook. As an example, it can be used in combination with a pre-commit hook to save/restore file ownership and permissions data (or file ACLs) within the repository and transparently update the working tree after a `git pull` operation. Signed-off-by: Josh England <jjengla@sandia.gov> --- Round two for the post_merge hook. Let me know if I missed anything. ...
Sep 11, 12:59 pm 2007
Josh England
[PATCH] Added example hook script to save/restore permission...
Usage info is emebed in the script, but the gist of it is to run the script from a pre-commit hook to save permissions/ownership data to a file and check that file into the repository. Then, a post_merge hook reads the file and updates working tree permissions/ownership. All updates are transparent to the user (although there is a --verbose option). Merge conflicts are handled in the "read" phase (in pre-commit), and the script aborts the commit and tells you how to fix things in the case of a merg...
Sep 11, 12:59 pm 2007
Martin Koegler
Re: [PATCH 0/3] more threaded delta patches
pack.deltaCacheSize = maxium memory, that can be used for caching deltas pack.deltaCacheLimit = cache all deltas smaller than this value (if the cache is not full) Additonally, deltas very much smaller than their source objects are cached (if the cache is not full). mfg Martin K
Sep 11, 2:02 am 2007
Karl
[StGit PATCH] Remove the --force flag to "stg rebase" and "s...
Instead, always behave as if the force flag was given; that is, don't check if rebasing would leave a dangling commit behind. Reasons: * The check for this was very strict and caused a lot of false positives. * Everything is recorded in the reflog, so we can't actually lose commits. This fixes bug 9181. Signed-off-by: Karl Hasselström <kha@treskal.com> --- This is not in my safe branch, on purpose; I want to hear any protests and test it a bit more first. It is howev...
Sep 11, 12:56 am 2007
Karl
[StGit PATCH 0/7] Assorted enhancements
This is the contents of git://repo.or.cz/stgit/kha.git safe Pavel's test suite fix is in there, as well as code to make fancy cover mails like this one! --- Karl Hasselström (6): Include summary of added/deleted files in diffstat Add shortlog of patch series to cover mail Add diffstat of whole patch series to cover mail Add --sign and --ack options to "stg import" Add the any() and all() utility functions from Python 2.5 Discard stderr when determini...
Sep 11, 12:49 am 2007
Karl
[StGit PATCH 6/7] Add shortlog of patch series to cover mail
Unlike the cover mail diffstat, this covers exactly the selected patches and nothing else. Signed-off-by: Karl Hasselström <kha@treskal.com> --- stgit/commands/mail.py | 41 +++++++++++++++++++++++++---------------- stgit/stack.py | 7 +++++++ templates/covermail.tmpl | 3 +++ 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py index c223665..c32894e 100644 --- a/stgit/commands/mail.py +++ b/stgit/co...
Sep 11, 12:50 am 2007
Karl
[StGit PATCH 4/7] Set GIT_TEMPLATE_DIR in the testsuite, lik...
From: Pavel Roskin <proski@gnu.org> Otherwise, the git configuration affects the testsuite. Since we don't have git templates in the source tree, use our "template" directory. No templates are really needed, it's just a directory with known contents. Remove the command that moves .git/hooks away, as it's not created anymore. Create empty .git/info/, as some tests assume it to exist. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Karl Hasselström <kha@treskal.com&...
Sep 11, 12:50 am 2007
Karl
[StGit PATCH 5/7] Add diffstat of whole patch series to cove...
Note: The diffstat is computed from the bottom of the first patch to the top of the last, which gives a correct result if and only if the series is contiguous. This is often the case, and handling anything but this case is nontrivial, as it would involve creating a temporary series of commits that are contiguous, with all the performance and merge problems that would entail. Signed-off-by: Karl Hasselström <kha@treskal.com> --- stgit/commands/mail.py | 17 ++++++++++------- templa...
Sep 11, 12:50 am 2007
Karl
[StGit PATCH 7/7] Include summary of added/deleted files in ...
Signed-off-by: Karl Hasselström <kha@treskal.com> --- stgit/git.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/stgit/git.py b/stgit/git.py index 181e10d..539d699 100644 --- a/stgit/git.py +++ b/stgit/git.py @@ -764,7 +764,7 @@ def diff(files = None, rev1 = 'HEAD', rev2 = None, diff_flags = []): def diffstat(files = None, rev1 = 'HEAD', rev2 = None): """Return the diffstat between rev1 and rev2.""" - return GRun('git-apply', '--stat' + r...
Sep 11, 12:50 am 2007
Karl
[StGit PATCH 2/7] Add the any() and all() utility functions ...
Signed-off-by: Karl Hasselström <kha@treskal.com> --- stgit/utils.py | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/stgit/utils.py b/stgit/utils.py index 02e98e9..34c0f96 100644 --- a/stgit/utils.py +++ b/stgit/utils.py @@ -214,3 +214,18 @@ def make_patch_name(msg, unacceptable, default_name = 'patch'): suffix += 1 patchname = '%s-%d' % (patchname, suffix) return patchname + +# any and all functions are builtin i...
Sep 11, 12:50 am 2007
Karl
[StGit PATCH 3/7] Add --sign and --ack options to "stg import"
Do this by factoring out the handling of these options from "stg refresh". Also, don't add sign lines that are already present. Signed-off-by: Karl Hasselström <kha@treskal.com> --- stgit/commands/imprt.py | 6 ++++-- stgit/commands/refresh.py | 24 ++++-------------------- stgit/stack.py | 9 +-------- stgit/utils.py | 28 +++++++++++++++++++++++++++- 4 files changed, 36 insertions(+), 31 deletions(-) diff --git a/stgit/commands/imprt.py b/stg...
Sep 11, 12:50 am 2007
Karl
[StGit PATCH 1/7] Discard stderr when determining if a patch...
An error from git-apply just means that the patch isn't applied. Signed-off-by: Karl Hasselström <kha@treskal.com> --- stgit/git.py | 3 ++- stgit/run.py | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/stgit/git.py b/stgit/git.py index f847cce..181e10d 100644 --- a/stgit/git.py +++ b/stgit/git.py @@ -628,7 +628,8 @@ def apply_diff(rev1, rev2, check_index = True, files = None): diff_str = diff(files, rev1, rev2) if diff_str: ...
Sep 11, 12:49 am 2007
Junio C Hamano
Re: [PATCH 2/2] Make "git reset" a builtin.
Not that git-reset is so performance sensitive, but you could do this from built-in without exec, by just reading the index and Instead of making a call to this one after read_from_tree() returns, immediately before writing the index out at the end of read_from_tree(), you have the index in core. I think you can call read-cache.c::refresh_index() at that point and then do the * When we can have both rev and path params, and the user calls us without '--' disambiguation, we make sure th...
Sep 11, 3:32 am 2007
Pierre Habouzit
Re: [PATCH 12/13] Add bundle transport
Not that I care that much, and I don't know what is done in git usually. But aren't C99 initializer safer ? (wrt struct transport_ops API possible changes in the future). --=20 =C2=B7O=C2=B7 Pierre Habouzit =C2=B7=C2=B7O madcoder@debia= n.org OOO http://www.madism.org
Sep 11, 4:23 am 2007
Johannes Schindelin
Re: [PATCH 12/13] Add bundle transport
Hi, No, they are not, since we do not allow such backwards incompatibilifiers to creep into git's code. Yes, I know some would prefer the latest and greatest, and another language altogether, but keep this in mind: what if somebody made git incompatible with _your_ setup? So really, don't do it to others that lightly. Ciao, Dscho -
Sep 11, 12:26 pm 2007
Pierre Habouzit
Re: [PATCH 12/13] Add bundle transport
It has nothing to do with latest. I feel that if for some reason transport_ops need a new function, it will break silentely, whereas if you use: static const struct transport_ops bundle_transport =3D { + .set_option =3D NULL, + .get_refs_list =3D &get_refs_from_bundle, + .fetch_refs =3D &fetch_refs_from_bundle, + .fetch_objs =3D NULL, + .push =3D NULL, + .disconnect =3D &close_bundle Or even: static const struct transport_ops bundle_transport =3D { ...
Sep 11, 1:30 pm 2007
Nicolas Pitre
Re: [PATCH 12/13] Add bundle transport
No. Git is meant to be compilable with as many C compilers as reasonably possible, including old compilers found on some systems that don't The Linux kernel is a different story. It is intimately tied to gcc and heavily relies on gcc extensions already. That makes it impossible to compile with anything else than gcc or a gcc clone. Nicolas -
Sep 11, 2:09 pm 2007
Johannes Schindelin
Re: [PATCH 12/13] Add bundle transport
Hi, As far as I am concerned, this kind of depending on newer features (this _is_ C99, right?) will not happen. So the discussion is moot. Ciao, Dscho -
Sep 11, 1:55 pm 2007
Linus Torvalds
Re: [PATCH 12/13] Add bundle transport
But it does. The "latest" being the compiler. A lot of people have old compilers, possibly even ones where there *are* The best way to handle that is to make sure you use ANSI C (which we *do* depend on), and strict prototypes everywhere. Then, any breakage will not be silent, because different functions will have different prototypes. Yes, C99 structure initializers are a good thing, and we use them in the linux kernel, but the kernel can make more assumptions about the compiler ...
Sep 11, 1:46 pm 2007
Junio C Hamano
Re: [PATCH 01-13/13] builtin-fetch series.
Very impressed by the entire series and mildly amused. Thanks. A few C++ style comments sprinkled here and there were eyesore, but I'll hopefully survive. You seem to have a stray printf("connect to ...\n"); as the command is expected to show the list of refs it fetched from the other side, this may interfere with what the caller wants to do. The changes to t5515 test vectors worry me quite a lot, as the distinction between not-for-merge and others is what decides the outcome of a pull, but I...
Sep 11, 3:03 am 2007
Daniel Barkalow
Re: [PATCH 01-13/13] builtin-fetch series.
You're welcome. I should mention that I've sent all of this in before, although not in a single series; the verdict was "post-1.5.3", so I tucked Go ahead and fix them. It's not a coding style thing that I really notice one way or the other, so I don't mind other people changing them but I I realized after using this for a while that I have no idea exactly what "git fetch" is expected to print. I should be able to match any particular style, but I can't really follow the shell version, and...
Sep 11, 11:27 am 2007
Junio C Hamano
Re: [PATCH] Add tests for documented features of "git reset".
I think what the tests try to catch are sensible, but I wonder if this cannot be done without hardcoding too many object this can be done without hardcoding the exact commit object name if you tag the commits while you build the test repository and give tag relative name in "$1" (you have to do "git rev-parse" ... 3ec3965 here. I'd like to keep the very low level details of how exactly object names are computed isolated to t0000 as much as possible. I also suspect this would not pass on C...
Sep 11, 2:01 am 2007
Russ Brown
Re: Removing an individual stashed state
Just came across another use case that might be nice to have: to be able to delete all stashes that were taken from a given branch. -- Russ -
Sep 11, 11:30 am 2007
David Kastrup
Re: Removing an individual stashed state
git has no notion of "given branch", does it? It can map any branch head to a particular commit at any given point of time, and any commit to one or more parents. But there is no dependable connection of some commit to a particular branch head as far as I can see. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum -
Sep 11, 5:39 pm 2007
Junio C Hamano
Re: Removing an individual stashed state
Yes, but that is irrelevant in the scope of this thread isn't it? As stash entries records which branch the stash was made on as part of their message, you can tell which ones were created while on which branch. -
Sep 11, 5:53 pm 2007
Jeff King
Re: Removing an individual stashed state
Then perhaps the right solution is to move it to a "DONE" pile (rather than leaving it on "IN" or deleting it entirely). It _should_ be a simple matter of just removing the N'th line of the reflog and appending it to an 'applied-stash' reflog. However, there are a few problems: - Finding the line number is non-trivial. git-stash never actually parses stash@{1}, but hands it off to rev-parse. So it is legal to say stash@{10.minutes.ago}. - When you apply a stash, there might be conf...
Sep 11, 12:25 am 2007
Joel Becker
Re: Remote branches and better documentation
I'm not asking you to ;-) This is about real world usage, not No, but software can be written to know how to determine it is too old and fail. eg, a protocol often has a version in the header so Of course not, nor would I advocate such. When it comes to "new version changed something that an old version won't understand", that's the only time you'd have to write out a flag. People making this change to the software had better be aware that they have added this Nor do I. I'm *still* n...
Sep 11, 4:36 am 2007
Andreas Ericsson
Re: Decreasing gains from git lost-found
Originally I was trying to find the lost tip, which was made impossible due to Yes, but since reflogs *are* taken into account when pruning lost tips, So how does one unpack a packfile to extract the loose objects? mv .git/objects/pack/*.pack /tmp/git-packs for p in /tmp/git-packs/*.pack; do git unpack-objects < $p; done ? Seems like an awful lot of trouble. I'll look into patching builtin-pack-objects.c instead to accept an "--ignore-reflog" flag and prune reflog-accessible objects...
Sep 11, 7:42 am 2007
Matthieu Moy
Re: Decreasing gains from git lost-found
Then, you'll most likely prune the branch you were looking for, won't you? -- Matthieu -
Sep 11, 10:20 am 2007
Andreas Ericsson
Re: Decreasing gains from git lost-found
I would obviously not use the flag when I'm looking for things, but when I'm cleaning up after a workday when I *know* that everything is where it's supposed to be, as it will then let me use git-lost-found to find the single loose tip I'm interested in rather than having to wade through the 500+ lines of cruft in the reflog. No offence to the reflog inventors. It's a great thing to have to prevent users from screwing up their repos, but it sucks that you can't disable its use without either dele...
Sep 11, 10:31 am 2007
Nicolas Pitre
Re: Decreasing gains from git lost-found
I'm not the reflog inventor, but I think it was a really clever addition to git. The fact that you insist to work against the tool is beyond me though. Nicolas -
Sep 11, 11:15 am 2007
Andreas Ericsson
Re: Decreasing gains from git lost-found
Well, I fall into a fairly uncommon category of users. Earlier I followed git development with great interest, and then other things came up that forced me to loose sight of the git list for quite some time. Now I've got time to read it again, so I *think* I know how git works, but forget that I *did* rather than *do*. Ah well. One lives and one learns. Sometimes even at the same time :-) -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB [ message continues ]
" title="www.op...">www.op...
Sep 11, 11:36 am 2007
Nicolas Pitre
Re: Decreasing gains from git lost-found
Why would you want to extract loose objects in the first place? That appears to be a really funny goal to me. If you want to retrieve a lost branch tip, it is certainly not an old one, otherwise you'd certainly have forgotten about it. So why not simply consulting the reflog, which, incidentally, was designed exactly for that usage scenario, i.e. retrieving lost branches? It is certainly This is not meant to be used by script as much as users. I'd suggest you simply try: git ref...
Sep 11, 9:50 am 2007
Andreas Ericsson
Re: Decreasing gains from git lost-found
So maybe we should deprecate git-lost-found? Since that was *also* designed for the scenario where one has lost a branch tip. Anyways, in this case the lost tip was the result of a git rebase, of which there are usually 20 or so every day in my reflog. I knew what the commit- subject was (roughly), but had no idea which of the 8 straight rebases that Why? I'd have no idea where I'd end up. I can't remember exactly what I did to my branch head more than 5 revs (or 15 minutes) ago, and since th...
Sep 11, 10:27 am 2007
Nicolas Pitre
Re: Decreasing gains from git lost-found
... by incident, since it is rather suboptimal at that. And it is meant to rescue dangling blobs too, which the reflog won't see. So there is no reason to deprecate lost-found as it still has some usefulness, but Then, maybe you would be interested by 'git log -g' if 'git reflog' As you wish. Nicolas -
Sep 11, 11:12 am 2007
Andreas Ericsson
Re: Decreasing gains from git lost-found
Ah, now this is more like it. I should have known someone would have *giggles* It works nicely with git-shortlog too. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 -
Sep 11, 11:39 am 2007
Andreas Ericsson
Re: Decreasing gains from git lost-found
I'll expand on this a bit. I thought that the loose tips weren't being pruned because they were packed. I had forgotten about the reflog protecting them from deletion, so in order to get rid of the loose tips after I was done getting my data back, I wanted to prune all the objects. Since I believed that would require all the objects to be loose, I sought to unpack the packs I had created. I realize now that unpack-objects *must* work as Junio explained in another email (ie, not unpack anything ...
Sep 11, 10:38 am 2007
Nicolas Pitre
Re: Decreasing gains from git lost-found
Note that if you truly want to get rid of unreferenced objects, you simply have to run 'git gc' or 'git repack -a -d'. The unreferenced objects will vanish, even if they were already packed previously. The new pack will simply not contain them anymore. Nicolas -
Sep 11, 10:58 am 2007
Andreas Ericsson
Re: Decreasing gains from git lost-found
That's what I thought, but because of the reflog they aren't pruned. Since I never use the reflog I didn't remember that it was that particular feature that protected my refs, and so the only thing I could think of that made them *not* go away was the fact that they were packed. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 -
Sep 11, 11:25 am 2007
Shawn O. Pearce
Re: [PATCH] git-gui: Localize commit/author dates when displ...
Raw timestamps would be easiest. But this is for-each-ref, not git-log. Its %(authortime) macro in the --format string does not support any sort of date formatting options. So uh, no, --pretty=format won't help me here. I'd have to make code changes to for-each-ref to allow control of how timestamps are output. Then I'd have to put magic flags into git-gui to see what version of git I'm using and assume if the flag will work or not. And if it won't then I still have to fall back into the c...
Sep 11, 12:42 am 2007
previous daytodaynext day
September 10, 2007September 11, 2007September 12, 2007