* Re: [PATCH 1/2] rm: only refresh entries that we may touch
From: Nguyen Thai Ngoc Duy @ 2010-01-16 10:58 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7v8wbyiry4.fsf@alter.siamese.dyndns.org>
On 1/16/10, Junio C Hamano <gitster@pobox.com> wrote:
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>
> > diff --git a/builtin-rm.c b/builtin-rm.c
> > index 57975db..4cac3d1 100644
> > --- a/builtin-rm.c
> > +++ b/builtin-rm.c
> > @@ -169,7 +169,6 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
> >
> > if (read_cache() < 0)
> > die("index file corrupt");
> > - refresh_cache(REFRESH_QUIET);
> >
> > pathspec = get_pathspec(prefix, argv);
> > seen = NULL;
> > @@ -181,6 +180,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
> > struct cache_entry *ce = active_cache[i];
> > if (!match_pathspec(pathspec, ce->name, ce_namelen(ce), 0, seen))
> > continue;
> > + refresh_cache_entry(ce, 1);
>
>
> Why does this pass "1" instead of "0"? The existing code does not give
> refresh_cache() REFRESH_REALLY bit, and a patch that is marked as a pure
> optimization should pass 0. If you really mean it, please spell it as
> CE_MATCH_IGNORE_VALID and justify why it is a good change in a separate
> patch.
"refresh_cache(REFRESH_QUIET);" does pass "0" indeed. Can you please
change it to "0"? Thanks.
--
Duy
^ permalink raw reply
* Re: [PATCH v2 13/14] daemon: use select() instead of poll()
From: Johannes Sixt @ 2010-01-16 10:44 UTC (permalink / raw)
To: kusmabite; +Cc: msysgit, git
In-Reply-To: <40aa078e1001160114k5ce0414et7cd645724973609b@mail.gmail.com>
On Samstag, 16. Januar 2010, Erik Faye-Lund wrote:
> On Sat, Jan 16, 2010 at 9:08 AM, Johannes Sixt <j6t@kdbg.org> wrote:
> > Wouldn't it be possible to call getsockopt(), and if it returns ENOTSOCK
> > (WSAENOTSOCK), then it is a pipe?
>
> I read reports that this didn't work in Wine. Not that I care that
> much about Wine.
What does it mean that "it does not work"? Is it that it does not return
ENOTSOCK, so that we mistake pipes as sockets?
-- Hannes
^ permalink raw reply
* Re: [PATCH v2 13/14] daemon: use select() instead of poll()
From: Johannes Sixt @ 2010-01-16 10:38 UTC (permalink / raw)
To: kusmabite; +Cc: msysgit, git
In-Reply-To: <40aa078e1001160126q34bc066as3adb9b61eac690d@mail.gmail.com>
On Samstag, 16. Januar 2010, Erik Faye-Lund wrote:
> On Sat, Jan 16, 2010 at 9:06 AM, Johannes Sixt <j6t@kdbg.org> wrote:
> > On Samstag, 16. Januar 2010, Erik Faye-Lund wrote:
> >> +static inline void mingw_fd_set(int fd, fd_set *set)
> >> +{
> >> + FD_SET(_get_osfhandle(fd), set);
> >> +}
> >> #undef FD_SET
> >> +#define FD_SET(a,b) mingw_fd_set(a,b)
> >> +
> >> #undef FD_ISSET
> >> #define FD_ISSET(fd, set) __WSAFDIsSet(_get_osfhandle(fd), (fd_set
> >> *)(set))
> >
> > Ah, yes, how obvious ;) You are going to do the same with FD_ISSET as
> > well, aren't you?
>
> Do I really need to? There's already a single function for that, with
> no "ugly hidden internals" there; __WSAFDIsSet() is documented in
> MSDN. I mean, Sure... I could... I just don't see the point.
__WSAFDIsSet is "ugly hidden internals" and we should not rely on it when we
can use the official FD_ISSET for our own FD_ISSET.
-- Hannes
^ permalink raw reply
* Re: [PATCH] Fix bad quoting in documentation
From: Thomas Rast @ 2010-01-16 10:20 UTC (permalink / raw)
To: Ramkumar Ramachandra; +Cc: git
In-Reply-To: <f3271551001160002r25cb0ac7hc96891f4af22bd03@mail.gmail.com>
Ramkumar Ramachandra wrote:
> Reported by Frédéric Brière <fbriere@fbriere.net> through
> http://bugs.debian.org/540001
Does this fix anything except the instances already handled by 71c020c
(Disable asciidoc 8.4.1+ semantics for `{plus}` and friends,
2009-07-25)?
If so, please point them out for easier review.
If not, please tell the debian guys to set ASCIIDOC8=YesPlease when
building the docs.
--
Thomas Rast
trast@{inf,student}.ethz.ch
^ permalink raw reply
* Re: [RFC] Git Wiki Move
From: Clemens Buchacher @ 2010-01-16 10:17 UTC (permalink / raw)
To: J.H.; +Cc: Sverre Rabbelier, Pieter de Bie, Matthieu Moy, Petr Baudis, git
In-Reply-To: <4B5113FD.9020004@eaglescrag.net>
On Fri, Jan 15, 2010 at 05:18:53PM -0800, J.H. wrote:
> On 01/15/2010 04:44 PM, Sverre Rabbelier wrote:
> > On Sat, Jan 16, 2010 at 01:28, J.H. <warthog19@eaglescrag.net> wrote:
> >>> <!-- GitLink[git-name] Because Linus is an egotistical git -->
> >>
> >> Probably, should be fixed now, found it on GitBot too.
> >
> > I guess you removed them rather than turning them in to comments
> > (probably due to MediaWiki's lake of comments)? Works for me, we can
> > figure out something else for gitbot. A regular text file that it can
> > slurp or something. We being Pieter perhaps (as he is the original author)?
> >
>
> The templates giving me a PITA trying to get it to actually generate a
> comment, easiest thing might be to hide it in the span or something, or
> add the comments in manually.
>
While we are at it, it would be good to put gitlink's past the section
name, so that it is available when using section editing (the lack of which
was a huge PITA in moinmoin).
Also, it would be better to actually show the gitlink name and comment with
the regular content. Maybe using a special tag which makes it look like a
comment. For example
== Why won't I see changes in the remote repo after "git push"? ==
{{gitlink|non-bare|Pushing to non-bare repositories is discouraged}}
which gets translated to
<div id="contentSub">
non-bare -- Pushing to non-bare repositories is discouraged
</div>
Clemens
^ permalink raw reply
* [PATCH] Update documentation: git-commit is not a shell command
From: Ramkumar Ramachandra @ 2010-01-16 9:35 UTC (permalink / raw)
To: git
Reported by Osamu Aoki through http://bugs.debian.org/560795
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
Documentation/gitcore-tutorial.txt | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/Documentation/gitcore-tutorial.txt
b/Documentation/gitcore-tutorial.txt
index f762dca..ebc5d0b 100644
--- a/Documentation/gitcore-tutorial.txt
+++ b/Documentation/gitcore-tutorial.txt
@@ -454,14 +454,7 @@ will be pruned out, and the rest will be used as
the commit message for
the change. If you decide you don't want to commit anything after all at
this point (you can continue to edit things and update the index), you
can just leave an empty message. Otherwise `git commit` will commit
-the change for you.
-
-You've now made your first real git commit. And if you're interested in
-looking at what `git commit` really does, feel free to investigate:
-it's a few very simple shell scripts to generate the helpful (?) commit
-message headers, and a few one-liners that actually do the
-commit itself ('git-commit').
-
+the change for you. You've now made your first real git commit.
Inspecting Changes
------------------
--
1.6.5
^ permalink raw reply related
* Re: [PATCH v2 13/14] daemon: use select() instead of poll()
From: Erik Faye-Lund @ 2010-01-16 9:26 UTC (permalink / raw)
To: Johannes Sixt; +Cc: msysgit, git
In-Reply-To: <201001160906.26270.j6t@kdbg.org>
On Sat, Jan 16, 2010 at 9:06 AM, Johannes Sixt <j6t@kdbg.org> wrote:
> On Samstag, 16. Januar 2010, Erik Faye-Lund wrote:
>> +static inline void mingw_fd_set(int fd, fd_set *set)
>> +{
>> + FD_SET(_get_osfhandle(fd), set);
>> +}
>> #undef FD_SET
>> +#define FD_SET(a,b) mingw_fd_set(a,b)
>> +
>> #undef FD_ISSET
>> #define FD_ISSET(fd, set) __WSAFDIsSet(_get_osfhandle(fd), (fd_set
>> *)(set))
>
> Ah, yes, how obvious ;) You are going to do the same with FD_ISSET as well,
> aren't you?
>
> -- Hannes
>
Do I really need to? There's already a single function for that, with
no "ugly hidden internals" there; __WSAFDIsSet() is documented in
MSDN. I mean, Sure... I could... I just don't see the point.
--
Erik "kusma" Faye-Lund
^ permalink raw reply
* [PATCH v3] Add push --set-upstream
From: Ilari Liusvaara @ 2010-01-16 9:23 UTC (permalink / raw)
To: git
Frequent complaint is lack of easy way to set up upstream (tracking)
references for git pull to work as part of push command. So add switch
--set-upstream (-u) to do just that.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
---
Differences from v2:
- Only pretend to set up tracking in case of --dry-run.
Documentation/git-push.txt | 9 +++++-
builtin-push.c | 1 +
t/t5523-push-upstream.sh | 69 ++++++++++++++++++++++++++++++++++++++++++++
transport.c | 56 +++++++++++++++++++++++++++++++++++
transport.h | 1 +
5 files changed, 135 insertions(+), 1 deletions(-)
create mode 100755 t/t5523-push-upstream.sh
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index e3eb1e8..2a5394b 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git push' [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
- [--repo=<repository>] [-f | --force] [-v | --verbose]
+ [--repo=<repository>] [-f | --force] [-v | --verbose] [-u | --set-upstream]
[<repository> <refspec>...]
DESCRIPTION
@@ -122,6 +122,13 @@ nor in any Push line of the corresponding remotes file---see below).
the name "origin" is used. For this latter case, this option
can be used to override the name "origin". In other words,
the difference between these two commands
+
+-u::
+--set-upstream::
+ For every branch that is up to date or successfully pushed, add
+ upstream (tracking) reference, used by argument-less
+ linkgit:git-pull[1] and other commands. For more information,
+ see 'branch.<name>.merge' in linkgit:git-config[1].
+
--------------------------
git push public #1
diff --git a/builtin-push.c b/builtin-push.c
index 28a26e7..75ddaf4 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -218,6 +218,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
OPT_BOOLEAN( 0 , "thin", &thin, "use thin pack"),
OPT_STRING( 0 , "receive-pack", &receivepack, "receive-pack", "receive pack program"),
OPT_STRING( 0 , "exec", &receivepack, "receive-pack", "receive pack program"),
+ OPT_BIT('u', "set-upstream", &flags, "Set upstream for git pull", TRANSPORT_PUSH_SET_UPSTREAM),
OPT_END()
};
diff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh
new file mode 100755
index 0000000..00da707
--- /dev/null
+++ b/t/t5523-push-upstream.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+test_description='push with --set-upstream'
+. ./test-lib.sh
+
+test_expect_success 'setup bare parent' '
+ git init --bare parent &&
+ git remote add upstream parent
+'
+
+test_expect_success 'setup local commit' '
+ echo content >file &&
+ git add file &&
+ git commit -m one
+'
+
+check_config() {
+ (echo $2; echo $3) >expect.$1
+ (git config branch.$1.remote
+ git config branch.$1.merge) >actual.$1
+ test_cmp expect.$1 actual.$1
+}
+
+test_expect_success 'push -u master:master' '
+ git push -u upstream master:master &&
+ check_config master upstream refs/heads/master
+'
+
+test_expect_success 'push -u master:other' '
+ git push -u upstream master:other &&
+ check_config master upstream refs/heads/other
+'
+
+test_expect_success 'push -u --dry-run master:otherX' '
+ git push -u --dry-run upstream master:otherX &&
+ check_config master upstream refs/heads/other
+'
+
+test_expect_success 'push -u master2:master2' '
+ git branch master2 &&
+ git push -u upstream master2:master2 &&
+ check_config master2 upstream refs/heads/master2
+'
+
+test_expect_success 'push -u master2:other2' '
+ git push -u upstream master2:other2 &&
+ check_config master2 upstream refs/heads/other2
+'
+
+test_expect_success 'push -u :master2' '
+ git push -u upstream :master2 &&
+ check_config master2 upstream refs/heads/other2
+'
+
+test_expect_success 'push -u --all' '
+ git branch all1 &&
+ git branch all2 &&
+ git push -u --all &&
+ check_config all1 upstream refs/heads/all1 &&
+ check_config all2 upstream refs/heads/all2
+'
+
+test_expect_success 'push -u HEAD' '
+ git checkout -b headbranch &&
+ git push -u upstream HEAD &&
+ check_config headbranch upstream refs/heads/headbranch
+'
+
+test_done
diff --git a/transport.c b/transport.c
index b5332c0..12b3d69 100644
--- a/transport.c
+++ b/transport.c
@@ -8,6 +8,7 @@
#include "bundle.h"
#include "dir.h"
#include "refs.h"
+#include "branch.h"
/* rsync support */
@@ -135,6 +136,53 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list)
}
}
+static void set_upstreams(struct transport *trans, struct ref *refs,
+ int pretend)
+{
+ struct ref *i;
+ for (i = refs; i; i = i->next) {
+ const char *localname;
+ const char *tmp;
+ const char *remotename;
+ unsigned char sha[20];
+ int flag = 0;
+ /*
+ * Check suitability for tracking. Must be successful /
+ * alreay up-to-date ref create/modify (not delete).
+ */
+ if (i->status != REF_STATUS_OK &&
+ i->status != REF_STATUS_UPTODATE)
+ continue;
+ if (!i->peer_ref)
+ continue;
+ if (!i->new_sha1 || is_null_sha1(i->new_sha1))
+ continue;
+
+ /* Chase symbolic refs (mainly for HEAD). */
+ localname = i->peer_ref->name;
+ remotename = i->name;
+ tmp = resolve_ref(localname, sha, 1, &flag);
+ if (tmp && flag & REF_ISSYMREF &&
+ !prefixcmp(tmp, "refs/heads/"))
+ localname = tmp;
+
+ /* Both source and destination must be local branches. */
+ if (!localname || prefixcmp(localname, "refs/heads/"))
+ continue;
+ if (!remotename || prefixcmp(remotename, "refs/heads/"))
+ continue;
+
+ if (!pretend)
+ install_branch_config(BRANCH_CONFIG_VERBOSE,
+ localname + 11, trans->remote->name,
+ remotename);
+ else
+ printf("Would set upstream '%s' -> '%s' of '%s'\n",
+ localname + 11, remotename + 11,
+ trans->remote->name);
+ }
+}
+
static const char *rsync_url(const char *url)
{
return prefixcmp(url, "rsync://") ? skip_prefix(url, "rsync:") : url;
@@ -974,6 +1022,10 @@ int transport_push(struct transport *transport,
verify_remote_names(refspec_nr, refspec);
if (transport->push) {
+ /* Maybe FIXME. But no important transport uses this case. */
+ if (flags & TRANSPORT_PUSH_SET_UPSTREAM)
+ die("This transport does not support using --set-upstream");
+
return transport->push(transport, refspec_nr, refspec, flags);
} else if (transport->push_refs) {
struct ref *remote_refs =
@@ -983,6 +1035,7 @@ int transport_push(struct transport *transport,
int verbose = flags & TRANSPORT_PUSH_VERBOSE;
int quiet = flags & TRANSPORT_PUSH_QUIET;
int porcelain = flags & TRANSPORT_PUSH_PORCELAIN;
+ int pretend = flags & TRANSPORT_PUSH_DRY_RUN;
int ret;
if (flags & TRANSPORT_PUSH_ALL)
@@ -1002,6 +1055,9 @@ int transport_push(struct transport *transport,
verbose | porcelain, porcelain,
nonfastforward);
+ if (flags & TRANSPORT_PUSH_SET_UPSTREAM)
+ set_upstreams(transport, remote_refs, pretend);
+
if (!(flags & TRANSPORT_PUSH_DRY_RUN)) {
struct ref *ref;
for (ref = remote_refs; ref; ref = ref->next)
diff --git a/transport.h b/transport.h
index 97ba251..c4314dd 100644
--- a/transport.h
+++ b/transport.h
@@ -91,6 +91,7 @@ struct transport {
#define TRANSPORT_PUSH_VERBOSE 16
#define TRANSPORT_PUSH_PORCELAIN 32
#define TRANSPORT_PUSH_QUIET 64
+#define TRANSPORT_PUSH_SET_UPSTREAM 128
/* Returns a transport suitable for the url */
struct transport *transport_get(struct remote *, const char *);
--
1.6.6.102.gd6f8f.dirty
^ permalink raw reply related
* [PATCH] t7111: fix bad HEAD in tests with unmerged entries
From: Christian Couder @ 2010-01-16 9:20 UTC (permalink / raw)
To: Junio C Hamano
Cc: git, Linus Torvalds, Johannes Schindelin, Stephan Beyer,
Daniel Barkalow, Jakub Narebski, Paolo Bonzini, Johannes Sixt,
Stephen Boyd
When testing what happens on unmerged entries, the HEAD is the
commit we are starting from before the merge that fails and create
the unmerged entries. It is not the commit before.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
t/t7111-reset-table.sh | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/t/t7111-reset-table.sh b/t/t7111-reset-table.sh
index 0a362a1..de896c9 100755
--- a/t/t7111-reset-table.sh
+++ b/t/t7111-reset-table.sh
@@ -73,13 +73,13 @@ test_expect_success 'setting up branches to test with unmerged entries' '
git checkout branch1 &&
test_commit B1 file1 &&
git checkout branch2 &&
- test_commit B2 file1
+ test_commit B file1
'
while read W1 I1 H1 T opt W2 I2 H2
do
test_expect_success "check: $W1 $I1 $H1 $T --$opt $W2 $I2 $H2" '
- git reset --hard B2 &&
+ git reset --hard B &&
test_must_fail git merge branch1 &&
cat file1 >X_file1 &&
if test "$W2" != "XXXXX"
@@ -100,14 +100,14 @@ do
fi
'
done <<\EOF
-X U C D soft XXXXX
-X U C D mixed X D D
-X U C D hard D D D
-X U C D merge D D D
-X U C C soft XXXXX
-X U C C mixed X C C
-X U C C hard C C C
-X U C C merge C C C
+X U B C soft XXXXX
+X U B C mixed X C C
+X U B C hard C C C
+X U B C merge C C C
+X U B B soft XXXXX
+X U B B mixed X B B
+X U B B hard B B B
+X U B B merge B B B
EOF
test_done
--
1.6.6.271.gc8799
^ permalink raw reply related
* Re: [PATCH v2 13/14] daemon: use select() instead of poll()
From: Erik Faye-Lund @ 2010-01-16 9:14 UTC (permalink / raw)
To: Johannes Sixt; +Cc: msysgit, git
In-Reply-To: <201001160908.33996.j6t@kdbg.org>
On Sat, Jan 16, 2010 at 9:08 AM, Johannes Sixt <j6t@kdbg.org> wrote:
> On Samstag, 16. Januar 2010, Erik Faye-Lund wrote:
>> The problem with that is differentiating between pipes and sockets.
>> GetFileType() returns FILE_TYPE_PIPE for sockets (ugh). I did find
>> some code in gnulib that used WSAEnumNetworkEvents() to differentiate
>> between them, but I find this quite hacky.
>
> Wouldn't it be possible to call getsockopt(), and if it returns ENOTSOCK
> (WSAENOTSOCK), then it is a pipe?
>
> -- Hannes
>
I read reports that this didn't work in Wine. Not that I care that
much about Wine.
--
Erik "kusma" Faye-Lund
^ permalink raw reply
* Re: [PATCH v2 06/14] mingw: use real pid
From: Erik Faye-Lund @ 2010-01-16 9:12 UTC (permalink / raw)
To: Johannes Sixt; +Cc: msysgit, git
In-Reply-To: <201001160903.25162.j6t@kdbg.org>
On Sat, Jan 16, 2010 at 9:03 AM, Johannes Sixt <j6t@kdbg.org> wrote:
> On Freitag, 15. Januar 2010, Erik Faye-Lund wrote:
>> On Fri, Jan 15, 2010 at 11:30 PM, Johannes Sixt <j6t@kdbg.org> wrote:
>> > On Freitag, 15. Januar 2010, Erik Faye-Lund wrote:
>> >> @@ -729,7 +729,7 @@ static pid_t mingw_spawnve(const char *cmd, const
>> >> char **argv, char **env, return -1;
>> >> }
>> >> CloseHandle(pi.hThread);
>> >> - return (pid_t)pi.hProcess;
>> >> + return (pid_t)pi.dwProcessId;
>> >> }
>> >
>> > You are not using the pi.hProcess anymore, so you must close it.
>>
>> No. If I do, the pid becomes invalid after the process is finished,
>> and waitpid won't work. I couldn't find anywhere were we actually were
>> closing the handle, even after it was finished. So I don't think we
>> leak any more than we already did (for non-daemon purposes).
>
> Previously, this handle was closed by _cwait() (it was the "pid"), so we
> didn't leak it.
Oh, I see. My planned route with this (before I looked for where the
handle was closed), was to maintain some sort of list of each started
PID and their handle, and lookup in that list instead of using
OpenProcess. I guess that would solve the problem here, but it feels a
bit nasty. Not as nasty as introducing a leak, though.
>
> I somehow thought that you need the process ID instead of the handle for
> TerminateProcess, but now I see that this is not the case (it takes the
> handle). So I don't see the point of this change anymore. You say the process
> handle "does not work consistently with getpid", but I don't know what you
> mean. Please explain.
getpid() returns the real PID, and is used for prefixing each logged
message by git-daemon. However, the root process reports whenever a
new process is started or has terminated using the PID returned by
mingw_spawnve(), and this handle does not match up with the PID that
getpid() reports. Thus it becomes impossible to tell which reported
error belongs to which client.
--
Erik "kusma" Faye-Lund
^ permalink raw reply
* Re: [PATCH v2 13/14] daemon: use select() instead of poll()
From: Johannes Sixt @ 2010-01-16 8:08 UTC (permalink / raw)
To: kusmabite; +Cc: msysgit, git
In-Reply-To: <40aa078e1001151508j208fa50boc5565a3be6bef893@mail.gmail.com>
On Samstag, 16. Januar 2010, Erik Faye-Lund wrote:
> The problem with that is differentiating between pipes and sockets.
> GetFileType() returns FILE_TYPE_PIPE for sockets (ugh). I did find
> some code in gnulib that used WSAEnumNetworkEvents() to differentiate
> between them, but I find this quite hacky.
Wouldn't it be possible to call getsockopt(), and if it returns ENOTSOCK
(WSAENOTSOCK), then it is a pipe?
-- Hannes
^ permalink raw reply
* Re: [PATCH v2 13/14] daemon: use select() instead of poll()
From: Johannes Sixt @ 2010-01-16 8:06 UTC (permalink / raw)
To: kusmabite; +Cc: msysgit, git
In-Reply-To: <40aa078e1001151523o538b44c7x95def3447650eea4@mail.gmail.com>
On Samstag, 16. Januar 2010, Erik Faye-Lund wrote:
> +static inline void mingw_fd_set(int fd, fd_set *set)
> +{
> + FD_SET(_get_osfhandle(fd), set);
> +}
> #undef FD_SET
> +#define FD_SET(a,b) mingw_fd_set(a,b)
> +
> #undef FD_ISSET
> #define FD_ISSET(fd, set) __WSAFDIsSet(_get_osfhandle(fd), (fd_set
> *)(set))
Ah, yes, how obvious ;) You are going to do the same with FD_ISSET as well,
aren't you?
-- Hannes
^ permalink raw reply
* Re: [PATCH v2 06/14] mingw: use real pid
From: Johannes Sixt @ 2010-01-16 8:03 UTC (permalink / raw)
To: kusmabite; +Cc: msysgit, git
In-Reply-To: <40aa078e1001151453i3576a345k217944c38887b61f@mail.gmail.com>
On Freitag, 15. Januar 2010, Erik Faye-Lund wrote:
> On Fri, Jan 15, 2010 at 11:30 PM, Johannes Sixt <j6t@kdbg.org> wrote:
> > On Freitag, 15. Januar 2010, Erik Faye-Lund wrote:
> >> @@ -729,7 +729,7 @@ static pid_t mingw_spawnve(const char *cmd, const
> >> char **argv, char **env, return -1;
> >> }
> >> CloseHandle(pi.hThread);
> >> - return (pid_t)pi.hProcess;
> >> + return (pid_t)pi.dwProcessId;
> >> }
> >
> > You are not using the pi.hProcess anymore, so you must close it.
>
> No. If I do, the pid becomes invalid after the process is finished,
> and waitpid won't work. I couldn't find anywhere were we actually were
> closing the handle, even after it was finished. So I don't think we
> leak any more than we already did (for non-daemon purposes).
Previously, this handle was closed by _cwait() (it was the "pid"), so we
didn't leak it.
I somehow thought that you need the process ID instead of the handle for
TerminateProcess, but now I see that this is not the case (it takes the
handle). So I don't see the point of this change anymore. You say the process
handle "does not work consistently with getpid", but I don't know what you
mean. Please explain.
-- Hannes
^ permalink raw reply
* [PATCH] Fix bad quoting in documentation
From: Ramkumar Ramachandra @ 2010-01-16 8:02 UTC (permalink / raw)
To: git
Reported by Frédéric Brière <fbriere@fbriere.net> through
http://bugs.debian.org/540001
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
Documentation/diff-options.txt | 2 +-
Documentation/git-add.txt | 4 ++--
Documentation/git-bundle.txt | 8 ++++----
Documentation/git-checkout.txt | 4 ++--
Documentation/git-filter-branch.txt | 30 +++++++++++++++---------------
Documentation/git-format-patch.txt | 4 ++--
Documentation/git-rebase.txt | 8 ++++----
Documentation/git-reflog.txt | 6 +++---
Documentation/git-rev-parse.txt | 24 ++++++++++++------------
Documentation/git-rm.txt | 6 +++---
10 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 8707d0e..6f3c115 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -54,7 +54,7 @@ endif::git-format-patch[]
giving another width to it separated by a comma.
--numstat::
- Similar to `\--stat`, but shows number of added and
+ Similar to `--stat`, but shows number of added and
deleted lines in decimal notation and pathname without
abbreviation, to make it more machine friendly. For
binary files, outputs two `-` instead of saying
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 1f1b199..838ad6f 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -149,14 +149,14 @@ those in info/exclude. See
linkgit:gitrepository-layout[5].
EXAMPLES
--------
-* Adds content from all `\*.txt` files under `Documentation` directory
+* Adds content from all `*.txt` files under `Documentation` directory
and its subdirectories:
+
------------
$ git add Documentation/\\*.txt
------------
+
-Note that the asterisk `\*` is quoted from the shell in this
+Note that the asterisk `*` is quoted from the shell in this
example; this lets the command include the files from
subdirectories of `Documentation/` directory.
diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt
index c3a066e..ee8722f 100644
--- a/Documentation/git-bundle.txt
+++ b/Documentation/git-bundle.txt
@@ -60,7 +60,7 @@ unbundle <file>::
[git-rev-list-args...]::
A list of arguments, acceptable to 'git-rev-parse' and
'git-rev-list', that specifies the specific objects and references
- to transport. For example, `master\~10..master` causes the
+ to transport. For example, `master~10..master` causes the
current master reference to be packaged along with all objects
added since its 10th ancestor commit. There is no explicit
limit to the number of references and objects that may be
@@ -79,12 +79,12 @@ SPECIFYING REFERENCES
'git-bundle' will only package references that are shown by
'git-show-ref': this includes heads, tags, and remote heads. References
-such as `master\~1` cannot be packaged, but are perfectly suitable for
+such as `master~1` cannot be packaged, but are perfectly suitable for
defining the basis. More than one reference may be packaged, and more
than one basis can be specified. The objects packaged are those not
contained in the union of the given bases. Each basis can be
-specified explicitly (e.g. `^master\~10`), or implicitly (e.g.
-`master\~10..master`, `--since=10.days.ago master`).
+specified explicitly (e.g. `^master~10`), or implicitly (e.g.
+`master~10..master`, `--since=10.days.ago master`).
It is very important that the basis used be held by the destination.
It is okay to err on the side of caution, causing the bundle file
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 37c1810..df27ca5 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -133,9 +133,9 @@ edits from your current working tree.
commit, your HEAD becomes "detached" and you are no longer on
any branch (see below for details).
+
-As a special case, the `"@\{-N\}"` syntax for the N-th last branch
+As a special case, the '@\{-N\}' syntax for the N-th last branch
checks out the branch (instead of detaching). You may also specify
-`-` which is synonymous with `"@\{-1\}"`.
+`-` which is synonymous with '@\{-1\}'.
<new_branch>::
Name for the new branch.
diff --git a/Documentation/git-filter-branch.txt
b/Documentation/git-filter-branch.txt
index 394a77a..2fa46cc 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -95,8 +95,8 @@ OPTIONS
--index-filter <command>::
This is the filter for rewriting the index. It is similar to the
tree filter but does not check out the tree, which makes it much
- faster. Frequently used with `git rm \--cached
- \--ignore-unmatch ...`, see EXAMPLES below. For hairy
+ faster. Frequently used with `git rm --cached
+ --ignore-unmatch ...`, see EXAMPLES below. For hairy
cases, see linkgit:git-update-index[1].
--parent-filter <command>::
@@ -221,11 +221,11 @@ However, if the file is absent from the tree of
some commit,
a simple `rm filename` will fail for that tree and commit.
Thus you may instead want to use `rm -f filename` as the script.
-Using `\--index-filter` with 'git-rm' yields a significantly faster
+Using `--index-filter` with 'git-rm' yields a significantly faster
version. Like with using `rm filename`, `git rm --cached filename`
will fail if the file is absent from the tree of a commit. If you
want to "completely forget" a file, it does not matter when it entered
-history, so we also add `\--ignore-unmatch`:
+history, so we also add `--ignore-unmatch`:
--------------------------------------------------------------------------
git filter-branch --index-filter 'git rm --cached --ignore-unmatch
filename' HEAD
@@ -241,8 +241,8 @@ git filter-branch --subdirectory-filter foodir -- --all
-------------------------------------------------------
Thus you can, e.g., turn a library subdirectory into a repository of
-its own. Note the `\--` that separates 'filter-branch' options from
-revision options, and the `\--all` to rewrite all branches and tags.
+its own. Note the `--` that separates 'filter-branch' options from
+revision options, and the `--all` to rewrite all branches and tags.
To set a commit (which typically is at the tip of another
history) to be the parent of the current initial commit, in
@@ -370,18 +370,18 @@ Checklist for Shrinking a Repository
------------------------------------
git-filter-branch is often used to get rid of a subset of files,
-usually with some combination of `\--index-filter` and
-`\--subdirectory-filter`. People expect the resulting repository to
+usually with some combination of `--index-filter` and
+`--subdirectory-filter`. People expect the resulting repository to
be smaller than the original, but you need a few more steps to
actually make it smaller, because git tries hard not to lose your
objects until you tell it to. First make sure that:
* You really removed all variants of a filename, if a blob was moved
- over its lifetime. `git log \--name-only \--follow \--all \--
+ over its lifetime. `git log --name-only --follow --all --
filename` can help you find renames.
-* You really filtered all refs: use `\--tag-name-filter cat \--
- \--all` when calling git-filter-branch.
+* You really filtered all refs: use `--tag-name-filter cat --
+ --all` when calling git-filter-branch.
Then there are two ways to get a smaller repository. A safer way is
to clone, that keeps your original intact.
@@ -396,14 +396,14 @@ approach, so *make a backup* or go back to
cloning it. You have been
warned.
* Remove the original refs backed up by git-filter-branch: say `git
- for-each-ref \--format="%(refname)" refs/original/ | xargs -n 1 git
+ for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git
update-ref -d`.
-* Expire all reflogs with `git reflog expire \--expire=now \--all`.
+* Expire all reflogs with `git reflog expire --expire=now --all`.
-* Garbage collect all unreferenced objects with `git gc \--prune=now`
+* Garbage collect all unreferenced objects with `git gc --prune=now`
(or if your git-gc is not new enough to support arguments to
- `\--prune`, use `git repack -ad; git prune` instead).
+ `--prune`, use `git repack -ad; git prune` instead).
Author
diff --git a/Documentation/git-format-patch.txt
b/Documentation/git-format-patch.txt
index f1fd0df..20d1960 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -44,7 +44,7 @@ There are two ways to specify which commits to operate on.
The first rule takes precedence in the case of a single <commit>. To
apply the second rule, i.e., format everything since the beginning of
history up until <commit>, use the '\--root' option: `git format-patch
-\--root <commit>`. If you want to format only <commit> itself, you
+--root <commit>`. If you want to format only <commit> itself, you
can do this with `git format-patch -1 <commit>`.
By default, each output file is numbered sequentially from 1, and uses the
@@ -133,7 +133,7 @@ include::diff-options.txt[]
The optional <style> argument can be either `shallow` or `deep`.
'shallow' threading makes every mail a reply to the head of the
series, where the head is chosen from the cover letter, the
-`\--in-reply-to`, and the first patch mail, in this order. 'deep'
+`--in-reply-to`, and the first patch mail, in this order. 'deep'
threading makes every mail a reply to the previous one.
+
The default is `--no-thread`, unless the 'format.thread' configuration
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index ca5e1e8..9554c63 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -512,8 +512,8 @@ Easy case: The changes are literally the same.::
Hard case: The changes are not the same.::
This happens if the 'subsystem' rebase had conflicts, or used
- `\--interactive` to omit, edit, or squash commits; or if the
- upstream used one of `commit \--amend`, `reset`, or
+ `--interactive` to omit, edit, or squash commits; or if the
+ upstream used one of `commit --amend`, `reset`, or
`filter-branch`.
@@ -549,7 +549,7 @@ correspond to the ones before the rebase.
NOTE: While an "easy case recovery" sometimes appears to be successful
even in the hard case, it may have unintended consequences. For
example, a commit that was removed via `git rebase
- \--interactive` will be **resurrected**!
+ --interactive` will be **resurrected**!
The idea is to manually tell 'git-rebase' "where the old 'subsystem'
ended and your 'topic' began", that is, what the old merge-base
@@ -557,7 +557,7 @@ between them was. You will have to find a way to
name the last commit
of the old 'subsystem', for example:
* With the 'subsystem' reflog: after 'git-fetch', the old tip of
- 'subsystem' is at `subsystem@\{1}`. Subsequent fetches will
+ 'subsystem' is at 'subsystem@\{1\}'. Subsequent fetches will
increase the number. (See linkgit:git-reflog[1].)
* Relative to the tip of 'topic': knowing that your 'topic' has three
diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt
index 7f7a544..32baa14 100644
--- a/Documentation/git-reflog.txt
+++ b/Documentation/git-reflog.txt
@@ -40,13 +40,13 @@ as well). It is an alias for `git log -g
--abbrev-commit --pretty=oneline`;
see linkgit:git-log[1].
The reflog is useful in various git commands, to specify the old value
-of a reference. For example, `HEAD@\{2\}` means "where HEAD used to be
-two moves ago", `master@\{one.week.ago\}` means "where master used to
+of a reference. For example, 'HEAD@\{2\}' means "where HEAD used to be
+two moves ago", 'master@\{one.week.ago\}' means "where master used to
point to one week ago", and so on. See linkgit:git-rev-parse[1] for
more details.
To delete single entries from the reflog, use the subcommand "delete"
-and specify the _exact_ entry (e.g. "`git reflog delete master@\{2\}`").
+and specify the _exact_ entry (e.g. "`git reflog delete master@{2}`").
OPTIONS
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 82045a2..c332a3c 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -74,7 +74,7 @@ OPTIONS
properly quoted for consumption by shell. Useful when
you expect your parameter to contain whitespaces and
newlines (e.g. when using pickaxe `-S` with
- 'git-diff-\*'). In contrast to the `--sq-quote` option,
+ 'git-diff-*'). In contrast to the `--sq-quote` option,
the command input is still interpreted as usual.
--not::
@@ -88,7 +88,7 @@ OPTIONS
form as close to the original input as possible.
--symbolic-full-name::
- This is similar to \--symbolic, but it omits input that
+ This is similar to `--symbolic`, but it omits input that
are not refs (i.e. branch or tag names; or more
explicitly disambiguating "heads/master" form, when you
want to name the "master" branch when there is an
@@ -246,14 +246,14 @@ when you run 'git-merge'.
the usage of this form.
* A suffix '{caret}' followed by an object type name enclosed in
- brace pair (e.g. `v0.99.8{caret}\{commit\}`) means the object
+ brace pair (e.g. 'v0.99.8{caret}\{commit\}') means the object
could be a tag, and dereference the tag recursively until an
object of that type is found or the object cannot be
- dereferenced anymore (in which case, barf). `rev{caret}0`
- introduced earlier is a short-hand for `rev{caret}\{commit\}`.
+ dereferenced anymore (in which case, barf). 'rev{caret}0'
+ introduced earlier is a short-hand for 'rev{caret}\{commit\}'.
* A suffix '{caret}' followed by an empty brace pair
- (e.g. `v0.99.8{caret}\{\}`) means the object could be a tag,
+ (e.g. 'v0.99.8{caret}\{\}') means the object could be a tag,
and dereference the tag recursively until a non-tag object is
found.
@@ -314,25 +314,25 @@ specifying a single revision with the notation
described in the
previous section means the set of commits reachable from that
commit, following the commit ancestry chain.
-To exclude commits reachable from a commit, a prefix `{caret}`
-notation is used. E.g. `{caret}r1 r2` means commits reachable
+To exclude commits reachable from a commit, a prefix '{caret}'
+notation is used. E.g. '{caret}r1 r2' means commits reachable
from `r2` but exclude the ones reachable from `r1`.
This set operation appears so often that there is a shorthand
for it. When you have two commits `r1` and `r2` (named according
to the syntax explained in SPECIFYING REVISIONS above), you can ask
for commits that are reachable from r2 excluding those that are reachable
-from r1 by `{caret}r1 r2` and it can be written as `r1..r2`.
+from r1 by '{caret}r1 r2' and it can be written as 'r1..r2'.
-A similar notation `r1\...r2` is called symmetric difference
+A similar notation 'r1\...r2' is called symmetric difference
of `r1` and `r2` and is defined as
`r1 r2 --not $(git merge-base --all r1 r2)`.
It is the set of commits that are reachable from either one of
`r1` or `r2` but not from both.
Two other shorthands for naming a set that is formed by a commit
-and its parent commits exist. The `r1{caret}@` notation means all
-parents of `r1`. `r1{caret}!` includes commit `r1` but excludes
+and its parent commits exist. The 'r1{caret}@' notation means all
+parents of `r1`. 'r1{caret}!' includes commit `r1` but excludes
all of its parents.
Here are a handful of examples:
diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt
index c21d19e..fe3ee38 100644
--- a/Documentation/git-rm.txt
+++ b/Documentation/git-rm.txt
@@ -78,7 +78,7 @@ a file that you have not told git about does not
remove that file.
File globbing matches across directory boundaries. Thus, given
two directories `d` and `d2`, there is a difference between
-using `git rm \'d\*\'` and `git rm \'d/\*\'`, as the former will
+using `git rm 'd*'` and `git rm 'd/*'`, as the former will
also remove all of directory `d2`.
REMOVING FILES THAT HAVE DISAPPEARED FROM THE FILESYSTEM
@@ -136,10 +136,10 @@ git diff --name-only --diff-filter=D -z | xargs
-0 git rm --cached
EXAMPLES
--------
git rm Documentation/\\*.txt::
- Removes all `\*.txt` files from the index that are under the
+ Removes all `*.txt` files from the index that are under the
`Documentation` directory and any of its subdirectories.
+
-Note that the asterisk `\*` is quoted from the shell in this
+Note that the asterisk `*` is quoted from the shell in this
example; this lets git, and not the shell, expand the pathnames
of files and subdirectories under the `Documentation/` directory.
--
1.6.5
^ permalink raw reply related
* Re: [PATCH] grep --no-index: allow use of "git grep" outside a git repository
From: Junio C Hamano @ 2010-01-16 7:21 UTC (permalink / raw)
To: David Aguilar; +Cc: Jeff King, git, Nanako Shiraishi
In-Reply-To: <20100116065135.GA15104@gmail.com>
David Aguilar <davvid@gmail.com> writes:
> On Fri, Jan 15, 2010 at 08:15:49PM -0800, Junio C Hamano wrote:
>
>> Realistically, this most often is used when grepping in the log, e.g.
>>
>> git log --all-match --author=peff --grep=test
>>
>> I actually wish "log" to somehow default to --all-match mode at least when
>> using the --author option. "Change by Jeff, or about test by anybody" is
>> rarely what I would want to look for.
>
> Kinda like this?
Not quite. What I really want is
git log --author=davvid --grep=difftool --grep=mergetool
to find all commits by you that is about (either diff or mergetool). I
think your patch will limit the search only to your patch that talks about
both of these two tools (not necessarily on the same line, but in the same
commit).
The extended "grep" expression parser by default creates a list of OR'ed
terms. What --all-match does is to make this top-level chain to mean "all
of these must trigger somewhere in the whole _document_ (not an individual
line), for the document to be considered a hit" for the purpose of "grep -l",
and when used with "log" family, --author/--committer/--grep are used to
limit the output to commits "grep -l" would say "yes, this document has
matched".
Currently,
git log --author=davvid --grep=difftool --grep=mergetool
will parse to a list of three terms:
GREP_PATTERN_HEAD("^author .*davvid")
GREP_PATTERN_BODY("difftool")
GREP_PATTERN_BODY("mergetool")
And giving --all-match will require all of these OR'ed terms to appear in
the commit object.
My dream one will probably has to make a list of two terms as its parse
tree instead, like this:
GREP_PATTERN_HEAD("^author .*davvid")
GREP_NODE_OR(
GREP_PATTERN_BODY("difftool")
GREP_PATTERN_BODY("mergetool")
)
and then run it with --all-match semantics. The top-level consists of two
terms, and they both must hit, but the second term is an OR'ed one.
It is unclear how we would want to throw the committer in the mix. If we
make this parse tree:
GREP_PATTERN_HEAD("^author .*davvid")
GREP_PATTERN_HEAD("^committer .*gitster")
GREP_NODE_OR(
GREP_PATTERN_BODY("difftool")
GREP_PATTERN_BODY("mergetool")
)
we would be looking for your patch about either diff or mergetool _and_
it has to be committed by me. On the other hand, if we do this:
GREP_NODE_OR(
GREP_PATTERN_HEAD("^author .*davvid")
GREP_PATTERN_HEAD("^committer .*gitster")
)
GREP_NODE_OR(
GREP_PATTERN_BODY("difftool")
GREP_PATTERN_BODY("mergetool")
)
we would be looking for a patch about (either diff or mergetool) _and_
(either committed by me or written by you).
I think the former makes more sense in _our_ project (because there are
very few committers), but in the context of other projects, e.g. the Linux
kernel, you may want to give "Linus" to both --author and --committer to
track what he did (either as an author to some other subsystem, or as the
top-level integrator for the entire system), and for such a use case, the
latter would make more sense.
Unfortunately, the parsing of --grep/--author/--committer options to the
log family is quite limited (you cannot give --and, --or and --not, for
example), and it would be hard to express these distinction.
^ permalink raw reply
* Re: [PATCH] grep --no-index: allow use of "git grep" outside a git repository
From: David Aguilar @ 2010-01-16 6:51 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jeff King, git, Nanako Shiraishi
In-Reply-To: <7vpr5ait1m.fsf@alter.siamese.dyndns.org>
On Fri, Jan 15, 2010 at 08:15:49PM -0800, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> >> git grep --all-match -e Junio -e Dscho
> >
> > That one is a little harder (though it is not something I do very often,
> > and I had to actually read the docs to find what --all-match does):
> >
> > grep Junio `grep -l Dscho *`
> >
> > which of course has problems with exotic filenames.
>
> Also it doesn't find lines that match Dscho in the result ;-)
>
> Realistically, this most often is used when grepping in the log, e.g.
>
> git log --all-match --author=peff --grep=test
>
> I actually wish "log" to somehow default to --all-match mode at least when
> using the --author option. "Change by Jeff, or about test by anybody" is
> rarely what I would want to look for.
Kinda like this?
I originally had it set grep_filter.all_match in --author only,
but then I thought "why author and not commiter too", so changing
the default seemed like the natural thing to do. Or it could be
a cat brained idea, I dunno ;)
-- -- -- 8< -- -- -- 8< -- -- --
From 2277a6e512c2f597c6240f06c9e7d5ff83e2fe3f Mon Sep 17 00:00:00 2001
From: David Aguilar <davvid@gmail.com>
Date: Fri, 15 Jan 2010 21:18:36 -0800
Subject: [PATCH] Make --all-match the default in "log" family
'git log --author=peff --grep=test' means "search for commits by Jeff,
or about test by anybody," which is rarely what what we want to do.
The original behavior can by achieved by specifying --no-all-match.
Reference: http://article.gmane.org/gmane.comp.version-control.git/137197
Signed-off-by: David Aguilar <davvid@gmail.com>
---
Documentation/rev-list-options.txt | 1 +
revision.c | 3 +++
t/t7002-grep.sh | 2 +-
3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 1f57aed..0ce1008 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -179,6 +179,7 @@ endif::git-rev-list[]
--all-match::
Limit the commits output to ones that match all given --grep,
--author and --committer instead of ones that match at least one.
+ --all-match is the defaullt and can be disabled with --no-all-match.
-i::
--regexp-ignore-case::
diff --git a/revision.c b/revision.c
index 25fa14d..64ebdc5 100644
--- a/revision.c
+++ b/revision.c
@@ -804,6 +804,7 @@ void init_revisions(struct rev_info *revs, const char *prefix)
revs->commit_format = CMIT_FMT_DEFAULT;
+ revs->grep_filter.all_match = 1;
revs->grep_filter.status_only = 1;
revs->grep_filter.pattern_tail = &(revs->grep_filter.pattern_list);
revs->grep_filter.regflags = REG_NEWLINE;
@@ -1222,6 +1223,8 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
revs->grep_filter.fixed = 1;
} else if (!strcmp(arg, "--all-match")) {
revs->grep_filter.all_match = 1;
+ } else if (!strcmp(arg, "--no-all-match")) {
+ revs->grep_filter.all_match = 0;
} else if (!prefixcmp(arg, "--encoding=")) {
arg += 11;
if (strcmp(arg, "none"))
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index 76c5e09..92ef534 100755
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
@@ -358,7 +358,7 @@ test_expect_success 'log grep (4)' '
test_expect_success 'log grep (5)' '
git log --author=Thor -F --grep=Thu --pretty=tformat:%s >actual &&
- ( echo third ; echo initial ) >expect &&
+ : >expect &&
test_cmp expect actual
'
--
1.6.6.197.g2277
^ permalink raw reply related
* Re: [PATCH] Remove some junk characters from COPYING
From: Junio C Hamano @ 2010-01-16 5:38 UTC (permalink / raw)
To: Ramkumar Ramachandra; +Cc: Robin Rosenberg, Linus Torvalds, git
In-Reply-To: <f3271551001152000r6facd476we7f0a1d3ed5cdf87@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
>> It is a form-feed (force new page when printing) so it should probably be
>> called by that name, if it were to be removed.
>
> Oh, thanks for that- I just looked it up. I don't know if they should
> be removed at all.
Most likely the copy we have is what Linus copied from the kernel tree and
adjusted his preamble without touching these form feeds.
While I don't think these form-feeds alone would be a good enough reason
to touch the file, FSF's address has changed some time ago, and the copy
we have does not reflect it, while the copy in the kernel tree was updated
in Sep 2005. Curiously enough, the copy in the kernel tree doesn't have
the more recent update to rename "GNU Library General Public License" to
"GNU Lesser General Public License" (I am CC'ing Linus in case he cares).
I'll update our copy with http://www.gnu.org/licenses/gpl-2.0.txt. This
will automatically lose the form-feeds.
Thanks.
-- >8 --
Subject: Update COPYING with GPLv2 with new FSF address
The mailing address of FSF changed quite a while ago. Also the expansion
of the acronym LGPL (which we don't use) is "Lesser GPL" not "Library GPL"
these days in recent copies of GPLv2. Update the copy we have with a
fresh download of <http://www.gnu.org/licenses/gpl-2.0.txt>.
This incidentally removes form-feeds in the text we retained for all these
years.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
diff --git a/COPYING b/COPYING
index 6ff87c4..536e555 100644
--- a/COPYING
+++ b/COPYING
@@ -22,8 +22,8 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -36,7 +36,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
+the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@@ -76,7 +76,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
-\f
+
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -131,7 +131,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
-\f
+
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@@ -189,7 +189,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
-\f
+
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@@ -246,7 +246,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
-\f
+
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@@ -299,7 +299,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
-\f
+
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
@@ -324,10 +324,9 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
@@ -357,5 +356,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
+library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
^ permalink raw reply related
* Re: [PATCH v2] Add push --set-upstream
From: Tay Ray Chuan @ 2010-01-16 4:55 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Nanako Shiraishi, Ilari Liusvaara, git
In-Reply-To: <7vljfyiswv.fsf@alter.siamese.dyndns.org>
Hi,
On Sat, Jan 16, 2010 at 12:18 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Tay Ray Chuan <rctay89@gmail.com> writes:
>>
>>> After all, there's already the config called branch.autosetupmerge and
>>> branch.autosetuprebase.
>>
>> Do you mean Ilari's patch already sets up branch.name.rebase for people
>> with branch.autosetuprebase true?
>
> I checked; the patch uses install_branch_config() so it should get this
> right automatically.
ok, then ignore my suggestion about --setup-merge and --setup-rebase.
I guess Nanako's query about 'pull --rebase' is settled as well.
--
Cheers,
Ray Chuan
^ permalink raw reply
* Re: [PATCH 2/2] status: only touch path we may need to check
From: Junio C Hamano @ 2010-01-16 4:41 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1263481341-28401-3-git-send-email-pclouds@gmail.com>
Will queue this one (but not the "rm" one, yet). Thanks.
^ permalink raw reply
* Re: [PATCH 1/2] rm: only refresh entries that we may touch
From: Junio C Hamano @ 2010-01-16 4:39 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1263481341-28401-2-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> diff --git a/builtin-rm.c b/builtin-rm.c
> index 57975db..4cac3d1 100644
> --- a/builtin-rm.c
> +++ b/builtin-rm.c
> @@ -169,7 +169,6 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
>
> if (read_cache() < 0)
> die("index file corrupt");
> - refresh_cache(REFRESH_QUIET);
>
> pathspec = get_pathspec(prefix, argv);
> seen = NULL;
> @@ -181,6 +180,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
> struct cache_entry *ce = active_cache[i];
> if (!match_pathspec(pathspec, ce->name, ce_namelen(ce), 0, seen))
> continue;
> + refresh_cache_entry(ce, 1);
Why does this pass "1" instead of "0"? The existing code does not give
refresh_cache() REFRESH_REALLY bit, and a patch that is marked as a pure
optimization should pass 0. If you really mean it, please spell it as
CE_MATCH_IGNORE_VALID and justify why it is a good change in a separate
patch.
Thanks.
^ permalink raw reply
* Re: [PATCH v2] Add push --set-upstream
From: Junio C Hamano @ 2010-01-16 4:18 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Tay Ray Chuan, Nanako Shiraishi, Ilari Liusvaara, git
In-Reply-To: <7vhbqmn9c4.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Tay Ray Chuan <rctay89@gmail.com> writes:
>
>> After all, there's already the config called branch.autosetupmerge and
>> branch.autosetuprebase.
>
> Do you mean Ilari's patch already sets up branch.name.rebase for people
> with branch.autosetuprebase true?
I checked; the patch uses install_branch_config() so it should get this
right automatically.
I'll queue the v2 patch on 'pu'; we might want an update to move the code
inside "unless --dry-run" condition, but other than that I think what we
reviewed in this thread was pretty good.
^ permalink raw reply
* Re: [PATCH] grep --no-index: allow use of "git grep" outside a git repository
From: Junio C Hamano @ 2010-01-16 4:15 UTC (permalink / raw)
To: Jeff King; +Cc: git, Nanako Shiraishi
In-Reply-To: <20100116011512.GA27082@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
>> git grep --all-match -e Junio -e Dscho
>
> That one is a little harder (though it is not something I do very often,
> and I had to actually read the docs to find what --all-match does):
>
> grep Junio `grep -l Dscho *`
>
> which of course has problems with exotic filenames.
Also it doesn't find lines that match Dscho in the result ;-)
Realistically, this most often is used when grepping in the log, e.g.
git log --all-match --author=peff --grep=test
I actually wish "log" to somehow default to --all-match mode at least when
using the --author option. "Change by Jeff, or about test by anybody" is
rarely what I would want to look for.
^ permalink raw reply
* Re: [PATCH] Remove some junk characters from COPYING
From: Ramkumar Ramachandra @ 2010-01-16 4:00 UTC (permalink / raw)
To: Robin Rosenberg; +Cc: git
In-Reply-To: <201001160209.22589.robin.rosenberg@dewire.com>
Hi,
> It is a form-feed (force new page when printing) so it should probably be
> called by that name, if it were to be removed.
Oh, thanks for that- I just looked it up. I don't know if they should
be removed at all.
^ permalink raw reply
* Re: [PATCH] Remove some junk characters from COPYING
From: Ramkumar Ramachandra @ 2010-01-16 3:52 UTC (permalink / raw)
To: David Aguilar; +Cc: git
In-Reply-To: <20100115222811.GB18878@gmail.com>
Hi,
> http://git.or.cz/gitwiki/GitTips#Usingmsmtptosendyourpatches
Thank you for the link! Yes, I know about git send-imap, but I my
firewall blocked traffic on all ports except 80 and 443 until
yesterday. I jumped some hoops and got a few more ports opened up for
myself yesterday, so no more attachments in Gmail :)
> I'm sure there are other ways, but that's the one that works for
> me. I also use mutt to read gmail; also highly recommended :)
In that case, check out Sup. It's *much* better than mutt :)
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox