* [PATCH 2/2] make the ST_{C,M}TIME_NSEC macros more function like
From: Kjetil Barvik @ 2009-03-15 11:38 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Kjetil Barvik
In-Reply-To: <cover.1237115791.git.barvik@broadpark.no>
Make the macros take a pointer to a 'struct stat'. This is so that it
should be easier to understand what is going on, and that the macros
can later be implemented as a inline function if we want to.
Impact: cosmetic change
Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
---
builtin-fetch-pack.c | 4 ++--
git-compat-util.h | 8 ++++----
read-cache.c | 12 ++++++------
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index d571253..0cd50f3 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -800,13 +800,13 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
int fd;
mtime.sec = st.st_mtime;
- mtime.nsec = ST_MTIME_NSEC(st);
+ mtime.nsec = ST_MTIME_NSEC(&st);
if (stat(shallow, &st)) {
if (mtime.sec)
die("shallow file was removed during fetch");
} else if (st.st_mtime != mtime.sec
#ifdef USE_NSEC
- || ST_MTIME_NSEC(st) != mtime.nsec
+ || ST_MTIME_NSEC(&st) != mtime.nsec
#endif
)
die("shallow file was changed during fetch");
diff --git a/git-compat-util.h b/git-compat-util.h
index 1906253..4a633be 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -394,11 +394,11 @@ void git_qsort(void *base, size_t nmemb, size_t size,
#define ST_MTIME_NSEC(st) 0
#else
#ifdef USE_ST_TIMESPEC
-#define ST_CTIME_NSEC(st) ((unsigned int)((st).st_ctimespec.tv_nsec))
-#define ST_MTIME_NSEC(st) ((unsigned int)((st).st_mtimespec.tv_nsec))
+#define ST_CTIME_NSEC(st) ((unsigned int)((st)->st_ctimespec.tv_nsec))
+#define ST_MTIME_NSEC(st) ((unsigned int)((st)->st_mtimespec.tv_nsec))
#else
-#define ST_CTIME_NSEC(st) ((unsigned int)((st).st_ctim.tv_nsec))
-#define ST_MTIME_NSEC(st) ((unsigned int)((st).st_mtim.tv_nsec))
+#define ST_CTIME_NSEC(st) ((unsigned int)((st)->st_ctim.tv_nsec))
+#define ST_MTIME_NSEC(st) ((unsigned int)((st)->st_mtim.tv_nsec))
#endif
#endif
diff --git a/read-cache.c b/read-cache.c
index 3f58711..cff85e3 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -69,8 +69,8 @@ void fill_stat_cache_info(struct cache_entry *ce, struct stat *st)
{
ce->ce_ctime.sec = (unsigned int)st->st_ctime;
ce->ce_mtime.sec = (unsigned int)st->st_mtime;
- ce->ce_ctime.nsec = ST_CTIME_NSEC(*st);
- ce->ce_mtime.nsec = ST_MTIME_NSEC(*st);
+ ce->ce_ctime.nsec = ST_CTIME_NSEC(st);
+ ce->ce_mtime.nsec = ST_MTIME_NSEC(st);
ce->ce_dev = st->st_dev;
ce->ce_ino = st->st_ino;
ce->ce_uid = st->st_uid;
@@ -204,9 +204,9 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
changed |= CTIME_CHANGED;
#ifdef USE_NSEC
- if (ce->ce_mtime.nsec != ST_MTIME_NSEC(*st))
+ if (ce->ce_mtime.nsec != ST_MTIME_NSEC(st))
changed |= MTIME_CHANGED;
- if (trust_ctime && ce->ce_ctime.nsec != ST_CTIME_NSEC(*st))
+ if (trust_ctime && ce->ce_ctime.nsec != ST_CTIME_NSEC(st))
changed |= CTIME_CHANGED;
#endif
@@ -1299,7 +1299,7 @@ int read_index_from(struct index_state *istate, const char *path)
dst_offset += ce_size(ce);
}
istate->timestamp.sec = st.st_mtime;
- istate->timestamp.nsec = ST_MTIME_NSEC(st);
+ istate->timestamp.nsec = ST_MTIME_NSEC(&st);
while (src_offset <= mmap_size - 20 - 8) {
/* After an array of active_nr index entries,
@@ -1564,7 +1564,7 @@ int write_index(struct index_state *istate, int newfd)
if (ce_flush(&c, newfd) || fstat(newfd, &st))
return -1;
istate->timestamp.sec = (unsigned int)st.st_mtime;
- istate->timestamp.nsec = ST_MTIME_NSEC(st);
+ istate->timestamp.nsec = ST_MTIME_NSEC(&st);
return 0;
}
--
1.6.2.GIT
^ permalink raw reply related
* [PATCH 1/2] checkout bugfix: use stat.mtime instead of stat.ctime in two places
From: Kjetil Barvik @ 2009-03-15 11:38 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Kjetil Barvik
In-Reply-To: <cover.1237115791.git.barvik@broadpark.no>
Commit e1afca4fd "write_index(): update index_state->timestamp after
flushing to disk" on 2009-02-23 used stat.ctime to record the
timestamp of the index-file. This is wrong, so fix this and use the
correct stat.mtime timestamp instead.
Commit 110c46a909 "Not all systems use st_[cm]tim field for ns
resolution file timestamp" on 2009-03-08, has a similar bug for the
builtin-fetch-pack.c file.
Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
---
builtin-fetch-pack.c | 2 +-
read-cache.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 0b1a356..d571253 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -806,7 +806,7 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
die("shallow file was removed during fetch");
} else if (st.st_mtime != mtime.sec
#ifdef USE_NSEC
- || ST_CTIME_NSEC(st) != mtime.nsec
+ || ST_MTIME_NSEC(st) != mtime.nsec
#endif
)
die("shallow file was changed during fetch");
diff --git a/read-cache.c b/read-cache.c
index 7f74c8d..3f58711 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1563,8 +1563,8 @@ int write_index(struct index_state *istate, int newfd)
if (ce_flush(&c, newfd) || fstat(newfd, &st))
return -1;
- istate->timestamp.sec = (unsigned int)st.st_ctime;
- istate->timestamp.nsec = ST_CTIME_NSEC(st);
+ istate->timestamp.sec = (unsigned int)st.st_mtime;
+ istate->timestamp.nsec = ST_MTIME_NSEC(st);
return 0;
}
--
1.6.2.GIT
^ permalink raw reply related
* [PATCH 0/2] git checkout: one bugfix and one cosmetic change
From: Kjetil Barvik @ 2009-03-15 11:38 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Kjetil Barvik
Just one small bugfix patch, and one small cosmetic change.
By the way, I wonder how often the list of 'Primary Authors' and
'Contributors' on the webpage http://git-scm.com/about is updated.
Should'nt it be updated when a new release, like v1.6.2, is made?
Kjetil Barvik (2):
checkout bugfix: use stat.mtime instead of stat.ctime in two places
make the ST_{C,M}TIME_NSEC macros more function like
^ permalink raw reply
* Re: [JGIT PATCH] Create a debugging tool "jgit rebuild-commitgraph"
From: Robin Rosenberg @ 2009-03-15 11:34 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git
In-Reply-To: <1236954901-30990-1-git-send-email-spearce@spearce.org>
I'd hate to put such a dangerous thing in the list of normal tools. If the user
want to shoot him/her-self in the foot they should get a license first.
-- robin
^ permalink raw reply
* Re: [JGIT PATCH 6/5 v2] Add tests for RevWalk and its supporting code
From: Robin Rosenberg @ 2009-03-15 11:34 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git
In-Reply-To: <20090314005617.GK22920@spearce.org>
A few /09 interesting/ places in StartGenerator are not covered by the tests.
if (q instanceof DateRevQueue)
pending = (DateRevQueue)q;
else
--> pending = new DateRevQueue(q);
and
if (tf != TreeFilter.ALL) {
--> rf = AndRevFilter.create(rf, new RewriteTreeFilter(w, tf));
--> pendingOutputType |= HAS_REWRITE | NEEDS_REWRITE;
}
PendingGenerator
if (n != null && n.commitTime >= last.commitTime) {
// This is too close to call. The next commit we
// would pop is dated after the last one produced.
// We have to keep going to ensure that we carry
// flags as much as necessary.
//
--> overScan = OVER_SCAN;
I'll merge it anyway since this is still a huge improvement compared to the previous
state.
-- robin
^ permalink raw reply
* Re: [PATCH] git-push.txt: describe how to default to pushing only
From: Chris Johnsen @ 2009-03-15 11:30 UTC (permalink / raw)
To: Jeff King; +Cc: git, Junio C Hamano, Chris Johnsen
In-Reply-To: <1237085349-14824-1-git-send-email-chris_johnsen@pobox.com>
On 2009 Mar 14, at 21:49, Chris Johnsen wrote:
> On 2009 Mar 14, at 15:56, Jeff King wrote:
> > On Sat, Mar 14, 2009 at 04:34:34PM -0400, Jeff King wrote:
> > > The question is how it _should_ be rendered. Monospace isn't really
> > > useful for terminals. Maybe simply putting quotation marks around it
> > > would cover all situations (I'm worried it will look funny for
> > > single-word instances).
> >
> > And here's a patch that does that; skimming through the output it
> > doesn't look too bad. What do you guys think?
> >
> > ---
>
> The presentation seems OK to me. I thought of two issues:
>
> 1) literals that contain a double quote
>
> $ git grep '`[^`]*"[^`]`' | cat
> config.txt:You can have `[section]` if you have `[section "subsection"]`, but you
>
> There might be a better regexp to find these, I did not think
> about it too long. The above "hit" seems like a reasonable
Of course the above regexp fails miserably since there are many
other instances of `..."...` in the documentation. I eventually
ended up using this one:
git grep -e "\`.*['\"]" -e "['\"].*\`" master -- Documentation
It catches a lot more than just "`...`" and `"..."`, but I tried
to plow through it all. I turns out that there are lots of
instances of double quotes inside or just outside backticks in
the documentation.
I edited out all the ones that did not seem to be meaningful. But
there are still many places where there is a meaningful double
quote inside a literal section. So, I think the workaround of
wrapping double quotes around manpage-destined literal sections
may not work well.
A patch to remove much of the extra quoting/emphasis
around/inside literal sections follows, but it will likely
negatively affect the manpages unless we can find a different way
to render the literal sections in manpages. It seems likely that
this patch should just be "parked" in the list archives until
someone can work out a way to emphasize the literal sections for
manpages.
The '`...`' style used in parts of config.txt yields underlined
text in my terminal-based view of the manpage. If underlining (or
whatever other formatting) could be applied to manpage-destined
literal text, that might work out better. I have not yet searched
for a way to make that happen through XSL. It might be as simple
as taking Peff's approach and using \fI and \fR instead of double
quotes (codes taken from other text that shows up as underlined
on my system; also the more I look into the asciidoc/docbook
stuff, the less I think anything involving more than one version
can be "simple").
-- >8 --
Subject: [PATCH] Documentation: remove extra quoting/emphasis around literal texts
If literal text (asciidoc `...`) can be rendered in a differently from
normal text for each output format (man, HTML), then we do not need
extra quotes or other wrapping around inline literal text segments.
config.txt
Change '`...`' to `...`. In asciidoc, the single quotes provide
emphasis, literal text should be distintive enough.
Change "`...`" to `...`. These double quotes do not work if present
in the described config value, so drop them.
git-checkout.txt
Change "`...`" to `...` or `"..."`. All instances are command line
argument examples. One "`-`" becomes `-`. Two others are involve
curly braces, so move the double quotes inside the literal region to
indicate that they might need to be quoted on the command line of
certain shells (tcsh).
git-merge.txt
Change "`...`" to `...`. All instances are used to describe merge
conflict markers. The quotes should are not important.
git-rev-parse.txt
Change "`...`" to `...`. All instances are around command line
arguments where no in-shell quoting should be necessary.
gitcli.txt
Change `"..."` to `...`. All instances are around command line
examples or single command arguments. They do not semanticly belong
inside the literal text, and they are not needed outside it.
glossary-content.txt
user-manual.txt
Change "`...`" to `...`. All instances were around command lines.
Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
---
Documentation/config.txt | 24 ++++++++++++------------
Documentation/git-checkout.txt | 4 ++--
Documentation/git-merge.txt | 6 +++---
Documentation/git-rev-parse.txt | 8 ++++----
Documentation/gitcli.txt | 24 ++++++++++++------------
Documentation/glossary-content.txt | 2 +-
Documentation/user-manual.txt | 6 +++---
7 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 14f861a..11f37d3 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -25,7 +25,7 @@ blank lines are ignored.
The file consists of sections and variables. A section begins with
the name of the section in square brackets and continues until the next
section begins. Section names are not case sensitive. Only alphanumeric
-characters, '`-`' and '`.`' are allowed in section names. Each variable
+characters, `-` and `.` are allowed in section names. Each variable
must belong to some section, which means that there must be section
header before first setting of a variable.
@@ -39,7 +39,7 @@ in the section header, like in example below:
--------
Subsection names can contain any characters except newline (doublequote
-'`"`' and backslash have to be escaped as '`\"`' and '`\\`',
+`"` and backslash have to be escaped as `\"` and `\\`,
respectively) and are case sensitive. Section header cannot span multiple
lines. Variables may belong directly to a section or to a given subsection.
You can have `[section]` if you have `[section "subsection"]`, but you
@@ -53,7 +53,7 @@ All the other lines are recognized as setting variables, in the form
'name = value'. If there is no equal sign on the line, the entire line
is taken as 'name' and the variable is recognized as boolean "true".
The variable names are case-insensitive and only alphanumeric
-characters and '`-`' are allowed. There can be more than one value
+characters and `-` are allowed. There can be more than one value
for a given variable; we say then that variable is multivalued.
Leading and trailing whitespace in a variable value is discarded.
@@ -69,15 +69,15 @@ String values may be entirely or partially enclosed in double quotes.
You need to enclose variable value in double quotes if you want to
preserve leading or trailing whitespace, or if variable value contains
beginning of comment characters (if it contains '#' or ';').
-Double quote '`"`' and backslash '`\`' characters in variable value must
-be escaped: use '`\"`' for '`"`' and '`\\`' for '`\`'.
+Double quote `"` and backslash `\` characters in variable value must
+be escaped: use `\"` for `"` and `\\` for `\`.
-The following escape sequences (beside '`\"`' and '`\\`') are recognized:
-'`\n`' for newline character (NL), '`\t`' for horizontal tabulation (HT, TAB)
-and '`\b`' for backspace (BS). No other char escape sequence, nor octal
+The following escape sequences (beside `\"` and `\\`) are recognized:
+`\n` for newline character (NL), `\t` for horizontal tabulation (HT, TAB)
+and `\b` for backspace (BS). No other char escape sequence, nor octal
char sequences are valid.
-Variable value ending in a '`\`' is continued on the next line in the
+Variable value ending in a `\` is continued on the next line in the
customary UNIX fashion.
Some variables may require special value format.
@@ -382,9 +382,9 @@ core.pager::
to override git's default settings this way, you need
to be explicit. For example, to disable the S option
in a backward compatible manner, set `core.pager`
- to "`less -+$LESS -FRX`". This will be passed to the
+ to `less -+$LESS -FRX`. This will be passed to the
shell by git, which will translate the final command to
- "`LESS=FRSX less -+FRSX -FRX`".
+ `LESS=FRSX less -+FRSX -FRX`.
core.whitespace::
A comma separated list of common whitespace problems to
@@ -1161,7 +1161,7 @@ pager.<cmd>::
particular git subcommand when writing to a tty. If
`\--paginate` or `\--no-pager` is specified on the command line,
it takes precedence over this option. To disable pagination for
- all commands, set `core.pager` or 'GIT_PAGER' to "`cat`".
+ all commands, set `core.pager` or `GIT_PAGER` to `cat`.
pull.octopus::
The default merge strategy to use when pulling multiple branches
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 125d8f3..1a6c19e 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -133,9 +133,9 @@ the conflicted merge in the specified paths.
When this parameter names a non-branch (but still a valid commit object),
your HEAD becomes 'detached'.
+
-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\}"`.
Detached HEAD
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index f7be584..cc0d30f 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -146,7 +146,7 @@ And here is another line that is cleanly resolved or unmodified.
------------
The area where a pair of conflicting changes happened is marked with markers
-"`<<<<<<<`", "`=======`", and "`>>>>>>>`". The part before the "`=======`"
+`<<<<<<<`, `=======`, and `>>>>>>>`. The part before the `=======`
is typically your side, and the part afterwards is typically their side.
The default format does not show what the original said in the conflicting
@@ -173,8 +173,8 @@ Git makes conflict resolution easy.
And here is another line that is cleanly resolved or unmodified.
------------
-In addition to the "`<<<<<<<`", "`=======`", and "`>>>>>>>`" markers, it uses
-another "`|||||||`" marker that is followed by the original text. You can
+In addition to the `<<<<<<<`, `=======`, and `>>>>>>>` markers, it uses
+another `|||||||` marker that is followed by the original text. You can
tell that the original just stated a fact, and your side simply gave in to
that statement and gave up, while the other side tried to have a more
positive attitude. You can sometimes come up with a better resolution by
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 3ccef2f..5ed2bc8 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -299,18 +299,18 @@ 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
+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)`".
+`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.
diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt
index 29e5929..be39ed7 100644
--- a/Documentation/gitcli.txt
+++ b/Documentation/gitcli.txt
@@ -46,20 +46,20 @@ Here are the rules regarding the "flags" that you should follow when you are
scripting git:
* it's preferred to use the non dashed form of git commands, which means that
- you should prefer `"git foo"` to `"git-foo"`.
+ you should prefer `git foo` to `git-foo`.
- * splitting short options to separate words (prefer `"git foo -a -b"`
- to `"git foo -ab"`, the latter may not even work).
+ * splitting short options to separate words (prefer `git foo -a -b`
+ to `git foo -ab`, the latter may not even work).
* when a command line option takes an argument, use the 'sticked' form. In
- other words, write `"git foo -oArg"` instead of `"git foo -o Arg"` for short
- options, and `"git foo --long-opt=Arg"` instead of `"git foo --long-opt Arg"`
+ other words, write `git foo -oArg` instead of `git foo -o Arg` for short
+ options, and `git foo --long-opt=Arg` instead of `git foo --long-opt Arg`
for long options. An option that takes optional option-argument must be
written in the 'sticked' form.
* when you give a revision parameter to a command, make sure the parameter is
not ambiguous with a name of a file in the work tree. E.g. do not write
- `"git log -1 HEAD"` but write `"git log -1 HEAD --"`; the former will not work
+ `git log -1 HEAD` but write `git log -1 HEAD --`; the former will not work
if you happen to have a file called `HEAD` in the work tree.
@@ -99,17 +99,17 @@ usage: git-describe [options] <committish>*
Negating options
~~~~~~~~~~~~~~~~
-Options with long option names can be negated by prefixing `"--no-"`. For
-example, `"git branch"` has the option `"--track"` which is 'on' by default. You
-can use `"--no-track"` to override that behaviour. The same goes for `"--color"`
-and `"--no-color"`.
+Options with long option names can be negated by prefixing `--no-`. For
+example, `git branch` has the option `--track` which is 'on' by default. You
+can use `--no-track` to override that behaviour. The same goes for `--color`
+and `--no-color`.
Aggregating short options
~~~~~~~~~~~~~~~~~~~~~~~~~
Commands that support the enhanced option parser allow you to aggregate short
-options. This means that you can for example use `"git rm -rf"` or
-`"git clean -fdx"`.
+options. This means that you can for example use `git rm -rf` or
+`git clean -fdx`.
Separating argument from the option
diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
index 9afca75..4fc1cf1 100644
--- a/Documentation/glossary-content.txt
+++ b/Documentation/glossary-content.txt
@@ -262,7 +262,7 @@ This commit is referred to as a "merge commit", or sometimes just a
'origin' is used for that purpose. New upstream updates
will be fetched into remote <<def_tracking_branch,tracking branches>> named
origin/name-of-upstream-branch, which you can see using
- "`git branch -r`".
+ `git branch -r`.
[[def_pack]]pack::
A set of objects which have been compressed into one file (to save space
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 96af897..e33b29b 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1136,10 +1136,10 @@ Ignoring files
A project will often generate files that you do 'not' want to track with git.
This typically includes files generated by a build process or temporary
backup files made by your editor. Of course, 'not' tracking files with git
-is just a matter of 'not' calling "`git-add`" on them. But it quickly becomes
+is just a matter of 'not' calling `git-add` on them. But it quickly becomes
annoying to have these untracked files lying around; e.g. they make
-"`git add .`" practically useless, and they keep showing up in the output of
-"`git status`".
+`git add .` practically useless, and they keep showing up in the output of
+`git status`.
You can tell git to ignore certain files by creating a file called .gitignore
in the top level of your working directory, with contents such as:
--
1.6.2
^ permalink raw reply related
* Re: [PATCH] config: --replace-all with one argument exits properly with a better message.
From: Felipe Contreras @ 2009-03-15 10:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Carlos Rica, git, johannes.schindelin
In-Reply-To: <7vab7na6wb.fsf@gitster.siamese.dyndns.org>
On Sun, Mar 15, 2009 at 3:53 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> On Sat, Mar 14, 2009 at 10:53 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> Carlos Rica <jasampler@gmail.com> writes:
>>>
>>>> 'config --replace-all ONE_ARG' was being treated as 'config NAME VALUE',
>>>> showing the error "key does not contain a section: --replace-all".
>>>
>>> Hmm, I am getting "error: wrong number of arguments" followed by the long
>>> and somewhat annoying "usage" from the parseopt table dump.
>>
>> If you find it annoying why don't you remove the usage?
>
> Because the primary target audience of the help text is not me?
Ok. I don't think it makes a big difference to leave it on or off.
People not familiar with 'git config' might find it handy, but I admit
that I also find it a bit annoying, mainly because the error message
gets lost in the noise.
>>> Can you work with Felipe to see if this is still needed, or needs to be
>>> fixed in a different way? It could be that your tests may already pass
>>> over there on 'next'. I didn't check.
>>
>> The new code is already checking correctly that --replace-all needs at
>> least two arguments. However, the "usage" is incorrect and of course
>> the test will come in handy.
>
> So perhaps you can pick a part of it and send in an update to your
> parseoptification series? I think the series is ready for 'master'
> sometime next week if not sooner.
Or maybe Carlos can beat me to do it since it seems he is interested.
Otherwise yeah, I'll do it.
--
Felipe Contreras
^ permalink raw reply
* excluding files from a merge
From: Daniel Jacobs @ 2009-03-15 1:23 UTC (permalink / raw)
To: git
Our project has two main branches set up, one called 'development, and
another called 'production'.
Each branch has a file in it called database.yml, (this is a rails project)...
The development branch and the
production branch are supposed to have different versions of this file.
(and not only this file, but other
config sorts of files as well, but this is a good example).
At the same time, when development is ready for deployment, we will do
git checkout production
git merge development
I would like it if every file was merged, except for files that were explictly
excluded from a merge between these two branches. Is there a good way to do
this?
-Daniel
^ permalink raw reply
* [ANNOUNCE] CGIT 0.8.2.1
From: Lars Hjemli @ 2009-03-15 8:41 UTC (permalink / raw)
To: Git Mailing List
A new bugfix-release of cgit, a fast webinterface for git, is now available:
Clone: git://hjemli.net/pub/git/cgit
Browse: http://hjemli.net/git/cgit
Shortlog since v0.8.2:
Eric Wong (1):
fix segfault when displaying empty blobs
Lars Hjemli (3):
ui-tree: escape ascii-text properly in hexdump view
ui-snapshot: avoid segfault when no filename is specified
CGIT 0.8.2.1
^ permalink raw reply
* What's in git.git (Mar 2009, #04; Sat, 14)
From: Junio C Hamano @ 2009-03-15 6:29 UTC (permalink / raw)
To: git
Perhaps I'll cut the first maintenance release since 1.6.2 sometime soon.
It turns out that 1.6.2 cycle was quite successful in producing a solid
release.
Quite a many topics have graduated to 'master'. Perhaps we can start the
pre-release freeze in two weeks for 1.6.3.
* The 'maint' branch has these fixes since the last announcement.
Chris Johnsen (1):
builtin-revert.c: release index lock when cherry-picking an empty commit
Christian Couder (1):
Documentation: fix badly indented paragraphs in "--bisect-all"
description
Elijah Newren (1):
Ensure proper setup of git_dir for git-hash-object
Finn Arne Gangstad (1):
Support "\" in non-wildcard exclusion entries
Jay Soffian (4):
send-email: allow send-email to run outside a repo
send-email: handle multiple Cc addresses when reading mbox message
send-email: --suppress-cc improvements
send-email: don't create temporary compose file until it is needed
Jeff King (3):
never fallback relative times to absolute
t1300: use test_must_fail as appropriate
document config --bool-or-int
Junio C Hamano (2):
git-add -i/-p: learn to unwrap C-quoted paths
Update draft release notes for 1.6.2.1
René Scharfe (1):
cleanup: add isascii()
* The 'master' branch has these since the last announcement
in addition to the above.
Benjamin Kramer (3):
Remove unused function scope local variables
Move local variables to narrower scopes
Remove unused assignments
Daniel Barkalow (1):
Include log_config module in apache.conf
David Aguilar (1):
contrib/difftool: use a separate config namespace for difftool commands
Erik Faye-Lund (1):
connect.c: remove a few globals by using git_config callback data
Eugene Letuchy (1):
Make git blame's date output format configurable, like git log
Jay Soffian (3):
bash completion: fix completion issues with fetch, pull, and push
bash completion: refactor --strategy completion
bash completion: teach fetch, pull, and push to complete their options
Jeff King (1):
clone: run post-checkout hook when checking out
Johannes Schindelin (5):
Brown paper bag fix for MinGW 64-bit stat
Add an (optional, since expensive) test for >2gb clones
MinGW: fix diff --no-index /dev/null ...
test: do not LoadModule log_config_module unconditionally
test-lib: write test results to test-results/<basename>-<pid>
Johannes Sixt (1):
test-suite: Make test script numbers unique
Junio C Hamano (8):
git-repack: resist stray environment variable
has_sha1_pack(): refactor "pretend these packs do not exist" interface
has_sha1_kept_pack(): take "struct rev_info"
Consolidate ignore_packed logic more
Simplify is_kept_pack()
is_kept_pack(): final clean-up
Update draft release notes to 1.6.3
Update release notes to 1.6.3
Michael J Gruber (3):
git submodule: Add test cases for git submodule add
git submodule: Fix adding of submodules at paths with ./, .. and //
Typo and language fixes for git-checkout.txt
Michael Lai (1):
git-svn: support intermediate paths when matching tags/branches
Pete Wyckoff (1):
git-p4: remove tabs from usermap file
Ramsay Allan Jones (1):
git-instaweb: fix lighttpd configuration on cygwin
René Scharfe (8):
diffcore-pickaxe: use memmem()
optimize compat/ memmem()
parseopt: add PARSE_OPT_KEEP_UNKNOWN
parseopt: add PARSE_OPT_NO_INTERNAL_HELP
parseopt: make usage optional
archive: use parseopt for local-only options
parseopt: document KEEP_ARGV0, KEEP_UNKNOWN, NO_INTERNAL_HELP
parseopt: prevent KEEP_UNKNOWN and STOP_AT_NON_OPTION from being used
together
Tay Ray Chuan (1):
http.c: use strbuf API in quote_ref_url
Thomas Rast (13):
format-patch: threading test reactivation
Support coverage testing with GCC/gcov
Test that diff can read from stdin
Test diff --dirstat functionality
Test log --graph
Test fsck a bit harder
Test log --decorate
Test rev-list --parents/--children
Test git-patch-id
format-patch: track several references
format-patch: thread as reply to cover letter even with in-reply-to
format-patch: support deep threading
Documentation: filter-branch: show --ignore-unmatch in main index-filter
example
Tor Arne Vestbø (2):
git-rebase: Add --stat and --no-stat for producing diffstat on rebase
git-pull: Allow --stat and --no-stat to be used with --rebase
^ permalink raw reply
* What's cooking in git.git (Mar 2009, #04; Sat, 14)
From: Junio C Hamano @ 2009-03-15 6:28 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'. The ones
marked with '.' do not appear in any of the branches, but I am still
holding onto them.
The topics list the commits in reverse chronological order. The topics
meant to be merged to the maintenance series have "maint-" in their names.
----------------------------------------------------------------
[New Topics]
* bw/autoconf (Thu Mar 12 15:20:12 2009 -0400) 7 commits
- configure: rework pthread handling to allow for user defined flags
- configure: make iconv tests aware of user arguments
- configure: asciidoc version test cleanup
- configure: wrap some library tests with GIT_STASH_FLAGS
- configure: add macros to stash FLAG variables
- configure: reorganize flow of argument checks
- configure: ensure settings from user are also usable in the script
Looked quite expertly done but I do not use autoconf myself, so I'd merge
this to 'next' soon and see anybody screams.
* jc/maint-1.6.0-read-tree-overlay (Thu Mar 12 00:02:12 2009 -0700) 1 commit
- read-tree A B C: do not create a bogus index and do not segfault
* fg/push-default (Wed Mar 11 23:01:45 2009 +0100) 1 commit
- New config push.default to decide default behavior for push
Replaced the old series with the first step to allow a smooth transition.
Some might argue that this should not give any warning but just give users
this new configuration to play with first, and after we know we are going
to switch default some day, start the warning.
* ps/blame (Thu Mar 12 21:30:03 2009 +1100) 1 commit
- blame.c: start libifying the blame infrastructure
* jc/attributes-checkout (Fri Mar 13 21:24:08 2009 -0700) 1 commit
- Read attributes from the index that is being checked out
----------------------------------------------------------------
[Graduated to "master"]
* mg/maint-submodule-normalize-path (Tue Mar 3 16:08:21 2009 +0100) 2 commits
+ git submodule: Fix adding of submodules at paths with ./, .. and
//
+ git submodule: Add test cases for git submodule add
* rs/memmem (Tue Mar 3 00:19:30 2009 +0100) 2 commits
+ optimize compat/ memmem()
+ diffcore-pickaxe: use memmem()
* tv/rebase-stat (Sun Mar 1 22:28:28 2009 +0100) 2 commits
+ git-pull: Allow --stat and --no-stat to be used with --rebase
+ git-rebase: Add --stat and --no-stat for producing diffstat on
rebase
* jk/clone-post-checkout (Tue Mar 3 00:37:51 2009 -0500) 1 commit
+ clone: run post-checkout hook when checking out
* jc/maint-1.6.0-keep-pack (Sat Feb 28 00:37:19 2009 -0800) 6 commits
+ is_kept_pack(): final clean-up
+ Simplify is_kept_pack()
+ Consolidate ignore_packed logic more
+ has_sha1_kept_pack(): take "struct rev_info"
+ has_sha1_pack(): refactor "pretend these packs do not exist"
interface
+ git-repack: resist stray environment variable
This is in response to Linus's "Really slow 'git gc'" ($gmane/110743)
* el/blame-date (Fri Feb 20 14:51:11 2009 -0800) 1 commit
+ Make git blame's date output format configurable, like git log
* tr/gcov (Thu Feb 19 12:13:42 2009 +0100) 8 commits
+ Test git-patch-id
+ Test rev-list --parents/--children
+ Test log --decorate
+ Test fsck a bit harder
+ Test log --graph
+ Test diff --dirstat functionality
+ Test that diff can read from stdin
+ Support coverage testing with GCC/gcov
* tr/format-patch-thread (Thu Feb 19 22:26:33 2009 +0100) 4 commits
+ format-patch: support deep threading
+ format-patch: thread as reply to cover letter even with in-reply-
to
+ format-patch: track several references
+ format-patch: threading test reactivation
----------------------------------------------------------------
[Will merge to 'master' soon]
* kb/checkout-optim (Sun Mar 8 17:22:51 2009 -0400) 18 commits
+ Makefile: Set compiler switch for USE_NSEC
+ Create USE_ST_TIMESPEC and turn it on for Darwin
+ Not all systems use st_[cm]tim field for ns resolution file
timestamp
+ Record ns-timestamps if possible, but do not use it without
USE_NSEC
+ write_index(): update index_state->timestamp after flushing to
disk
+ verify_uptodate(): add ce_uptodate(ce) test
+ make USE_NSEC work as expected
+ fix compile error when USE_NSEC is defined
+ check_updates(): effective removal of cache entries marked
CE_REMOVE
+ lstat_cache(): print a warning if doing ping-pong between cache
types
+ show_patch_diff(): remove a call to fstat()
+ write_entry(): use fstat() instead of lstat() when file is open
+ write_entry(): cleanup of some duplicated code
+ create_directories(): remove some memcpy() and strchr() calls
+ unlink_entry(): introduce schedule_dir_for_removal()
+ lstat_cache(): swap func(length, string) into func(string, length)
+ lstat_cache(): generalise longest_match_lstat_cache()
+ lstat_cache(): small cleanup and optimisation
Kjetil has another fix-up patch for ctime/mtime gotcha that is not on this
list but after that is applied this series can go to 'master'.
* tr/maint-1.6.0-send-email-irt (Wed Mar 11 23:40:13 2009 +0100) 2 commits
+ send-email: test --no-thread --in-reply-to combination
+ send-email: respect in-reply-to regardless of threading
* js/remote-improvements (Sun Mar 8 00:10:33 2009 -0800) 23 commits
+ builtin-remote.c: no "commented out" code, please
+ builtin-remote: new show output style for push refspecs
+ builtin-remote: new show output style
+ remote: make guess_remote_head() use exact HEAD lookup if it is
available
+ builtin-remote: add set-head subcommand
+ builtin-remote: teach show to display remote HEAD
+ builtin-remote: fix two inconsistencies in the output of "show
<remote>"
+ builtin-remote: make get_remote_ref_states() always populate
states.tracked
+ builtin-remote: rename variables and eliminate redundant function
call
+ builtin-remote: remove unused code in get_ref_states
+ builtin-remote: refactor duplicated cleanup code
+ string-list: new for_each_string_list() function
+ remote: make match_refs() not short-circuit
+ remote: make match_refs() copy src ref before assigning to
peer_ref
+ remote: let guess_remote_head() optionally return all matches
+ remote: make copy_ref() perform a deep copy
+ remote: simplify guess_remote_head()
+ move locate_head() to remote.c
+ move duplicated ref_newer() to remote.c
+ move duplicated get_local_heads() to remote.c
+ refactor find_ref_by_name() to accept const list
+ add basic http clone/fetch tests
+ test scripts: refactor start_httpd helper
----------------------------------------------------------------
[Discarded]
* jc/commit-assume-also-during-merge (Thu Jan 22 22:21:49 2009 -0800) 3 commits
. git commit: pathspec without -i/-o implies -i semantics during a
merge
. builtin-commit: shorten eye-sore overlong lines
. Add "partial commit" tests during a conflicted merge
This was only meant as a weatherballoon to help facilitate discussion.
----------------------------------------------------------------
[Stalled and may need help and prodding to go forward]
* jc/log-tz (Tue Mar 3 00:45:37 2009 -0800) 1 commit
- Allow --date=local --date=other-format to work as expected
The one I posted had a few corner-case bugs that was caught with the test
suite; this one has them fixed. People did not like the UI so it is kept
out of 'next'
* lh/submodule-tree-traversal (Sun Jan 25 01:52:06 2009 +0100) 1 commit
- archive.c: add support for --submodules[=(all|checkedout)]
Discussion stalled on the submodule selection criteria.
* jc/merge-convert (Mon Jan 26 16:45:01 2009 -0800) 1 commit
- git-merge-file: allow converting the results for the work tree
This is a feature waiting for a user.
We did not give scripted Porcelains a way to say "this temporary file I am
using for merging is for this path, so use the core.autocrlf and attributes
rules for that final path". Instead, merge-file simply wrote out the
data in the canonical repository representation.
rerere has the same issue, but it is a lot worse. It reads the three
files (preimage, postimage and thisimage) from the work tree in the work
tree representation, merges them without converting them to the canonical
representation first but inserts the conflict markers with the canonical
representation and writes the resulting mess out. It needs to be fixed to
read with convert_to_git(), merge them while they are still in the
canonical representation and possibly add conflict markers, and then write
the results out after convert_to_working_tree(). It also needs to write
in binary mode as well.
* db/foreign-scm (Sun Jan 11 15:12:10 2009 -0500) 3 commits
- Support fetching from foreign VCSes
- Add specification of git-vcs helpers
- Add "vcs" config option in remotes
The "spec" did not seem quite well cooked yet, but in the longer term I
think something like this to allow interoperating with other SCMs as if
the other end is a native git repository is a very worthy goal.
* cc/replace (Mon Feb 2 06:13:06 2009 +0100) 11 commits
- builtin-replace: use "usage_msg_opt" to give better error messages
- parse-options: add new function "usage_msg_opt"
- builtin-replace: teach "git replace" to actually replace
- Add new "git replace" command
- environment: add global variable to disable replacement
- mktag: call "check_sha1_signature" with the replacement sha1
- replace_object: add a test case
- object: call "check_sha1_signature" with the replacement sha1
- sha1_file: add a "read_sha1_file_repl" function
- replace_object: add mechanism to replace objects found in
"refs/replace/"
- refs: add a "for_each_replace_ref" function
----------------------------------------------------------------
[Actively cooking]
* mg/http-auth (Thu Mar 12 22:34:43 2009 -0700) 4 commits
+ http.c: CURLOPT_NETRC_OPTIONAL is not available in ancient
versions of cURL
+ http authentication via prompts
+ http_init(): Fix config file parsing
+ http.c: style cleanups
This does only the fetch side but without any additional configuration
variables that looked like band-aid.
* db/maint-missing-origin (Wed Mar 11 01:47:20 2009 -0400) 1 commit
+ Give error when no remote is configured
* js/sideband-stderr (Tue Mar 10 22:58:09 2009 +0100) 2 commits
+ winansi: support ESC [ K (erase in line)
+ recv_sideband: Bands #2 and #3 always go to stderr
* js/rsync-local (Mon Mar 9 19:44:55 2009 +0100) 1 commit
+ rsync transport: allow local paths, and fix tests
* rs/color-grep (Sun Mar 8 18:22:44 2009 -0700) 6 commits
+ grep: cast printf %.*s "precision" argument explicitly to int
+ grep: add support for coloring with external greps
+ grep: color patterns in output
+ grep: add pmatch and eflags arguments to match_one_pattern()
+ grep: remove grep_opt argument from match_expr_eval()
+ grep: micro-optimize hit collection for AND nodes
* db/refspec-wildcard-in-the-middle (Sat Mar 7 01:11:39 2009 -0500) 5 commits
+ Support '*' in the middle of a refspec
+ Keep '*' in pattern refspecs
+ Use the matching function to generate the match results
+ Use a single function to match names against patterns
+ Make clone parse the default refspec with the normal code
* db/push-cleanup (Sun Mar 8 21:06:07 2009 -0400) 2 commits
- Move push matching and reporting logic into transport.c
- Use a common function to get the pretty name of refs
* xx/db-refspec-vs-js-remote (Sun Mar 8 00:12:33 2009 -0800) 1 commit
+ Adjust js/remote-improvements and db/refspec-wildcard-in-the-
middle
* hv/cvsimport-tests (Mon Mar 2 18:59:36 2009 +0100) 1 commit
+ cvsimport: add test illustrating a bug in cvsps
Yet more tests without fixing anything...
* jc/clone-branch-rebase (Tue Mar 10 01:20:42 2009 -0700) 2 commits
+ Improve "git branch --tracking" output
+ Make git-clone respect branch.autosetuprebase
This is a rewrite of a patch from Pat Notz.
* kb/tracking-count-no-merges (Wed Mar 4 18:47:39 2009 +0100) 1 commit
+ stat_tracking_info(): only count real commits
This gives the merge commits zero weight when talking about how many
commits you have ahead (or behind) of the branch you are tracking. Even
though I agree that they should carry much less weight than the "real"
commits, because your repeated merge from the other branch does not really
add any real value to the end result, giving them absolute zero weight
somehow feels wrong. At least it shows that your have been _active_ on the
branch. But I do not feel very strongly about it.
* js/rebase-i-opt (Tue Mar 3 10:55:31 2009 +0100) 1 commit
+ rebase -i: avoid 'git reset' when possible
* mv/parseopt-ls-files (Sat Mar 7 20:27:22 2009 -0500) 4 commits
+ ls-files: fix broken --no-empty-directory
+ t3000: use test_cmp instead of diff
+ parse-opt: migrate builtin-ls-files.
+ Turn the flags in struct dir_struct into a single variable
The tip one was a subject for further discussion, but nothing is queued
yet.
* fc/parseopt-config (Sat Mar 7 12:14:05 2009 -0500) 9 commits
+ config: set help text for --bool-or-int
+ git config: don't allow --get-color* and variable type
+ git config: don't allow extra arguments for -e or -l.
+ git config: don't allow multiple variable types
+ git config: don't allow multiple config file locations
+ git config: reorganize to use parseopt
+ git config: reorganize get_color*
+ git config: trivial rename in preparation for parseopt
+ git_config(): not having a per-repo config file is not an error
* mh/cvsimport-tests (Mon Feb 23 06:08:14 2009 +0100) 5 commits
+ Add a test of "git cvsimport"'s handling of tags and branches
+ Add some tests of git-cvsimport's handling of vendor branches
+ Test contents of entire cvsimported "master" tree contents
+ Use CVS's -f option if available (ignore user's ~/.cvsrc file)
+ Start a library for cvsimport-related tests
Tests without fixes are of dubious value. Any takers?
* js/notes (Wed Feb 18 11:17:27 2009 -0800) 14 commits
- tests: fix "export var=val"
- notes: refuse to edit notes outside refs/notes/
- t3301: use test_must_fail instead of !
- t3301: fix confusing quoting in test for valid notes ref
- notes: use GIT_EDITOR and core.editor over VISUAL/EDITOR
- notes: only clean up message file when editing
- handle empty notes gracefully
- git notes show: test empty notes
- git-notes: fix printing of multi-line notes
- notes: fix core.notesRef documentation
- Add an expensive test for git-notes
- Speed up git notes lookup
- Add a script to edit/inspect notes
- Introduce commit notes
Rebased and then kicked back to 'pu' to give the author a chance to
rearrange if necessary. Nothing happened yet, but I see Dscho has been
busy on msysgit side of the world, so it is understandable.
----------------------------------------------------------------
[On Hold]
* jc/deny-delete-current-1.7.0 (Mon Feb 9 00:19:46 2009 -0800) 1 commit
- receive-pack: default receive.denyDeleteCurrent to refuse
* jc/refuse-push-to-current-1.7.0 (Wed Feb 11 02:28:03 2009 -0800) 1 commit
- Refuse updating the current branch in a non-bare repository via
push
These are for 1.7.0, but the messages when they trigger together may need
to be rethought.
^ permalink raw reply
* Re: setting up tracking on push
From: John M. Dlugosz @ 2009-03-15 3:28 UTC (permalink / raw)
To: git
In-Reply-To: <76718490903111814t1ab90a39h9252d0ccf8af05c4@mail.gmail.com>
Jay Soffian jaysoffian-at-gmail.com |git| wrote:
> - The branches under refs/remotes (those shown by "git branch -r") are
> remote tracking branches.
> So that tells git fetch where to fetch from, which remote branches to
> fetch, and where to store those branches locally. In this case, each
> branch under refs/heads/ on git://git.kernel.org/pub/scm/git/git.git
> will be fetched and stored locally as refs/remotes/origin/. Locally
> the branches are called "remote tracking branches".
>
>
Things under refs/remotes are remote tracking branches, and local
branches (under refs/heads) that automatically updated based on a fetch
("store locally" means merge or rebase, right?) are also called remote
tracking branches.
I think that's why some of us are confused.
--John
^ permalink raw reply
* Re: [PATCH] git-push.txt: describe how to default to pushing only current branch
From: Chris Johnsen @ 2009-03-15 2:49 UTC (permalink / raw)
To: Jeff King; +Cc: git, Junio C Hamano, Chris Johnsen
In-Reply-To: <20090314205628.GA17445@coredump.intra.peff.net>
On 2009 Mar 14, at 15:56, Jeff King wrote:
> On Sat, Mar 14, 2009 at 04:34:34PM -0400, Jeff King wrote:
> > The question is how it _should_ be rendered. Monospace isn't really
> > useful for terminals. Maybe simply putting quotation marks around it
> > would cover all situations (I'm worried it will look funny for
> > single-word instances).
>
> And here's a patch that does that; skimming through the output it
> doesn't look too bad. What do you guys think?
>
> ---
The presentation seems OK to me. I thought of two issues:
1) literals that contain a double quote
$ git grep '`[^`]*"[^`]`' | cat
config.txt:You can have `[section]` if you have `[section "subsection"]`, but you
There might be a better regexp to find these, I did not think
about it too long. The above "hit" seems like a reasonable
literal string. Maybe it is OK to live with this one
("[section "subsection"]").
2) manpage-1.72.xsl
I have been setting DOCBOOK_XSL_172 to avoid the ".ft" problem
(<http://article.gmane.org/gmane.comp.version-control.git/112943>;
my system is Mac OS X 10.4.11 with MacPorts asciidoc 8.3.1,
xmlto version 0.0.21, and docbook-xsl 1.74.0). Since non-null
DOCBOOK_XSL_172 replaces callouts.xsl with manpage-1.72.xsl, I
added the line to manpage-1.72.xsl.
Here is the patch if it is deemed appropriate (same line Peff
added to callouts.xsl):
-- >8 --
Subject: [PATCH] manpage-1.72.xsl: wrap inline literal text with double quotes
Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
---
Documentation/manpage-1.72.xsl | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Documentation/manpage-1.72.xsl b/Documentation/manpage-1.72.xsl
index 4065a3a..a39fd55 100644
--- a/Documentation/manpage-1.72.xsl
+++ b/Documentation/manpage-1.72.xsl
@@ -18,4 +18,6 @@
<xsl:text>⌂br </xsl:text>
</xsl:template>
+<xsl:template match="literal">"<xsl:apply-templates/>"</xsl:template>
+
</xsl:stylesheet>
--
1.6.2
^ permalink raw reply related
* [PATCH v2] git-push.txt: describe how to default to pushing only current branch
From: Chris Johnsen @ 2009-03-15 2:32 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Jeff King, Chris Johnsen
In-Reply-To: <7vd4cjc3da.fsf@gitster.siamese.dyndns.org>
Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
---
On 2009 Mar 14, at 14:26, Junio C Hamano wrote:
> The new text looks reasonable. Sign-off?
Oops, sorry for the omission. Here it is again with the S-o-B (or
insert it by hand if you like).
---
Documentation/git-push.txt | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 4e7e5a7..fd53c49 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -24,8 +24,8 @@ every time you push into it, by setting up 'hooks' there. See
documentation for linkgit:git-receive-pack[1].
-OPTIONS
--------
+OPTIONS[[OPTIONS]]
+------------------
<repository>::
The "remote" repository that is destination of a push
operation. This parameter can be either a URL
@@ -187,6 +187,28 @@ reason::
Examples
--------
+git push::
+ Works like `git push <remote>`, where <remote> is the
+ current branch's remote (or `origin`, if no remote is
+ configured for the current branch).
+
+git push origin::
+ Without additional configuration, works like
+ `git push origin :`.
++
+The default behavior of this command when no <refspec> is given can be
+configured by setting the `push` option of the remote.
++
+For example, to default to pushing only the current branch to `origin`
+use `git config remote.origin.push HEAD`. Any valid <refspec> (like
+the ones in the examples below) can be configured as the default for
+`git push origin`.
+
+git push origin :::
+ Push "matching" branches to `origin`. See
+ <refspec> in the <<OPTIONS,OPTIONS>> section above for a
+ description of "matching" branches.
+
git push origin master::
Find a ref that matches `master` in the source repository
(most likely, it would find `refs/heads/master`), and update
--
1.6.2
^ permalink raw reply related
* Re: [PATCH] config: --replace-all with one argument exits properly with a better message.
From: Junio C Hamano @ 2009-03-15 1:53 UTC (permalink / raw)
To: Felipe Contreras; +Cc: Carlos Rica, git, johannes.schindelin
In-Reply-To: <94a0d4530903141434w2fb8aa28we087465482a12e41@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
> On Sat, Mar 14, 2009 at 10:53 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Carlos Rica <jasampler@gmail.com> writes:
>>
>>> 'config --replace-all ONE_ARG' was being treated as 'config NAME VALUE',
>>> showing the error "key does not contain a section: --replace-all".
>>
>> Hmm, I am getting "error: wrong number of arguments" followed by the long
>> and somewhat annoying "usage" from the parseopt table dump.
>
> If you find it annoying why don't you remove the usage?
Because the primary target audience of the help text is not me?
>> Can you work with Felipe to see if this is still needed, or needs to be
>> fixed in a different way? It could be that your tests may already pass
>> over there on 'next'. I didn't check.
>
> The new code is already checking correctly that --replace-all needs at
> least two arguments. However, the "usage" is incorrect and of course
> the test will come in handy.
So perhaps you can pick a part of it and send in an update to your
parseoptification series? I think the series is ready for 'master'
sometime next week if not sooner.
^ permalink raw reply
* Re: [JGIT PATCH 3/3] Use a common skipObject method to avoid UNINTERESTING items
From: Robin Rosenberg @ 2009-03-15 0:25 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git
In-Reply-To: <1236967912-15088-3-git-send-email-spearce@spearce.org>
fredag 13 mars 2009 19:11:52 skrev "Shawn O. Pearce" <spearce@spearce.org>:
> All cases are using the same logic to decide that we should skip
> this current object and not return it to the caller. A common
> implementation makes the code easier to follow, especially as it
> reduces the ugly line wrap involved in the loop body.
Java conventions dictate that this method should be called shouldSkipObject. It
is a boolean method that actually does not itself skip any objects.
I can amend that for you.
-- robin
^ permalink raw reply
* Re: [PATCH] git-push.txt: describe how to default to pushing only current branch
From: Jeff King @ 2009-03-14 21:46 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Chris Johnsen, git
In-Reply-To: <7veiwzajbc.fsf@gitster.siamese.dyndns.org>
On Sat, Mar 14, 2009 at 02:25:11PM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > Actually, looking closer, the information seems to be lost entirely.
> > Asciidoc renders this to <literal> in the XML, but docbook seems to
> > throw it away when converting to a manpage. In theory it's possible to
> > apply our own xsl style to turn this into something else, and I think
> > that is a better solution than just trying to fix this one spot.
>
> When I check the asciidoc output for manpages (which I rarely do), I often
> render it to Postscript to see the typesetting. I guess not many people
> consider manpages are for printing anymore but are solely for monospaced
> terminal consumption these days.
How do you render it? From the XML, or from the roff? Because if I am
reading it right (which it is entirely possible that I am not), the
information is lost in the roff version. And that is the version I would
expect people to be looking at (via man -Tps, or just plain man).
-Peff
^ permalink raw reply
* Re: [PATCH] config: --replace-all with one argument exits properly with a better message.
From: Felipe Contreras @ 2009-03-14 21:34 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Carlos Rica, git, johannes.schindelin
In-Reply-To: <7vtz5vakrp.fsf@gitster.siamese.dyndns.org>
On Sat, Mar 14, 2009 at 10:53 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Carlos Rica <jasampler@gmail.com> writes:
>
>> 'config --replace-all ONE_ARG' was being treated as 'config NAME VALUE',
>> showing the error "key does not contain a section: --replace-all".
>
> Hmm, I am getting "error: wrong number of arguments" followed by the long
> and somewhat annoying "usage" from the parseopt table dump.
If you find it annoying why don't you remove the usage?
> Ahh, that is because I am running the version from 'next', which contains
> the fc/parseopt-config topic that rewrites the option parser and error
> checking almost completely.
>
> Can you work with Felipe to see if this is still needed, or needs to be
> fixed in a different way? It could be that your tests may already pass
> over there on 'next'. I didn't check.
The new code is already checking correctly that --replace-all needs at
least two arguments. However, the "usage" is incorrect and of course
the test will come in handy.
Cheers.
--
Felipe Contreras
^ permalink raw reply
* Re: [PATCH] git-push.txt: describe how to default to pushing only current branch
From: Junio C Hamano @ 2009-03-14 21:25 UTC (permalink / raw)
To: Jeff King; +Cc: Chris Johnsen, git
In-Reply-To: <20090314203434.GA15444@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Actually, looking closer, the information seems to be lost entirely.
> Asciidoc renders this to <literal> in the XML, but docbook seems to
> throw it away when converting to a manpage. In theory it's possible to
> apply our own xsl style to turn this into something else, and I think
> that is a better solution than just trying to fix this one spot.
When I check the asciidoc output for manpages (which I rarely do), I often
render it to Postscript to see the typesetting. I guess not many people
consider manpages are for printing anymore but are solely for monospaced
terminal consumption these days.
^ permalink raw reply
* Re: [PATCH] Remove unused assignments
From: Benjamin Kramer @ 2009-03-14 20:57 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7v7i2rc0zp.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
>
> Thanks. I eyeballed all of them and they look safe, but this patch made
> me wonder...
>
> Did you use some dataflow analysis tool to spot these?
>
> It will never scale if a human has to sanity check output from a
> mechanical process like this patch, especially when the human is already a
> chokepoint of the whole process (i.e. the maintainer).
Yep, they were found with a little help of the clang static analyzer
http://clang.llvm.org/StaticAnalysis.html
It is in early stages of development so it may report false positives and
it chokes on some files. Here is the latest output I have, with my patch
applied:
http://doktorz.mooltied.de/stuff/scan-build-2009-03-13-2/
I've looked briefly at the "Logic Errors" and they all seem to be false
positives. I did not have enough time to look into all the remaining "Dead
Stores" though.
-- Benjamin
^ permalink raw reply
* Re: [PATCH v2] New config push.default to decide default behavior for push
From: Junio C Hamano @ 2009-03-14 20:56 UTC (permalink / raw)
To: Finn Arne Gangstad; +Cc: git
In-Reply-To: <20090312115433.GA2848@pvv.org>
Finn Arne Gangstad <finnag@pvv.org> writes:
> Something like this amended into the last commit? I can amend it on top
> of the last one and resend if that is better.
Thanks.
I looked at these two patches after squashing them into one, and I think
it makes sense as the final shape of a two patch series.
Although the purist in me tells me that addition of the "tracking" and the
"current" should be in a separate commit as they are purely new features,
I think it is Ok. In that sense, "nothing" is a new feature anyway, and
"current" is something we already have, so the true addition here is only
the "tracking" one.
I also reworded the commit log message a bit, like this:
Author: Finn Arne Gangstad <finnag@pvv.org>
Date: Wed Mar 11 23:01:45 2009 +0100
New config push.default to decide default behavior for push
When "git push" is not told what refspecs to push, it pushes all matching
branches to the current remote. For some workflows this default is not
useful, and surprises new users. Some have even found that this default
behaviour too easy to trigger by accident with unwanted consequences.
Introduce a new configuration variable "push.default" that decides what
action git push should take if no refspecs are given or implied by the
command line arguments or the current remote configuration. If this
variable is unconfigured, display a prominent warning when default
behavior is triggered.
Possible values are:
'nothing' : Push nothing;
'matching' : Current default behaviour, push all branches that already
exist in the current remote;
'tracking' : Push the current branch to whatever it is tracking;
'current' : Push the current branch to a branch of the same name,
i.e. HEAD.
Signed-off-by: Finn Arne Gangstad <finnag@pvv.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
I however had to scratch my head for 20 seconds wondering where the push
happens when do_default_push() codepath is taken, and it turns out that
the function is there merely to set up the push refspecs for the default
case; the function is misnamed. I'd further squash the following patch
in.
diff --git a/builtin-push.c b/builtin-push.c
index 51f4c4a..e4988da 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -76,8 +76,7 @@ static const char *warn_unconfigured_push_msg[] = {
" 'nothing' : Do not push anythig",
" 'matching' : Push all matching branches (the current default)",
" 'tracking' : Push the current branch to whatever it is tracking",
- " 'current' : Push the current branch",
- ""
+ " 'current' : Push the current branch"
};
static void warn_unconfigured_push(void)
@@ -87,7 +86,7 @@ static void warn_unconfigured_push(void)
warning("%s", warn_unconfigured_push_msg[i]);
}
-static void do_default_push(void)
+static void setup_default_push_refspecs(void)
{
git_config(git_default_config, NULL);
switch (push_default) {
@@ -147,7 +146,7 @@ static int do_push(const char *repo, int flags)
refspec = remote->push_refspec;
refspec_nr = remote->push_refspec_nr;
} else if (!(flags & TRANSPORT_PUSH_MIRROR))
- do_default_push();
+ setup_default_push_refspecs();
}
errs = 0;
for (i = 0; i < remote->url_nr; i++) {
^ permalink raw reply related
* Re: [PATCH] git-push.txt: describe how to default to pushing only current branch
From: Jeff King @ 2009-03-14 20:56 UTC (permalink / raw)
To: Chris Johnsen; +Cc: Junio C Hamano, git
In-Reply-To: <20090314203434.GA15444@coredump.intra.peff.net>
On Sat, Mar 14, 2009 at 04:34:34PM -0400, Jeff King wrote:
> The question is how it _should_ be rendered. Monospace isn't really
> useful for terminals. Maybe simply putting quotation marks around it
> would cover all situations (I'm worried it will look funny for
> single-word instances).
And here's a patch that does that; skimming through the output it
doesn't look too bad. What do you guys think?
---
diff --git a/Documentation/callouts.xsl b/Documentation/callouts.xsl
index 6a361a2..01df100 100644
--- a/Documentation/callouts.xsl
+++ b/Documentation/callouts.xsl
@@ -27,4 +27,6 @@
</xsl:if>
</xsl:template>
+<xsl:template match="literal">"<xsl:apply-templates/>"</xsl:template>
+
</xsl:stylesheet>
^ permalink raw reply related
* Re: [PATCH] builtin-tag.c: remove global variable to use the callback data of git-config.
From: Junio C Hamano @ 2009-03-14 20:54 UTC (permalink / raw)
To: Carlos Rica; +Cc: git, johannes.schindelin, gitster
In-Reply-To: <1237015035.9952.10.camel@luis-desktop>
Carlos Rica <jasampler@gmail.com> writes:
> Signed-off-by: Carlos Rica <jasampler@gmail.com>
> ---
>
> Here I declare a struct to wrap the new local array along with its size.
> QUESTION: An alternative to this is strbuf, would it be preferable?
The command already uses strbuf for other purposes, so why not?
^ permalink raw reply
* Re: [PATCH] config: --replace-all with one argument exits properly with a better message.
From: Junio C Hamano @ 2009-03-14 20:53 UTC (permalink / raw)
To: Carlos Rica; +Cc: git, johannes.schindelin, Felipe Contreras
In-Reply-To: <1236998552.9952.2.camel@luis-desktop>
Carlos Rica <jasampler@gmail.com> writes:
> 'config --replace-all ONE_ARG' was being treated as 'config NAME VALUE',
> showing the error "key does not contain a section: --replace-all".
Hmm, I am getting "error: wrong number of arguments" followed by the long
and somewhat annoying "usage" from the parseopt table dump.
Ahh, that is because I am running the version from 'next', which contains
the fc/parseopt-config topic that rewrites the option parser and error
checking almost completely.
Can you work with Felipe to see if this is still needed, or needs to be
fixed in a different way? It could be that your tests may already pass
over there on 'next'. I didn't check.
^ permalink raw reply
* Re: [PATCH] Autoconf: Disable inline for compilers that don't support it.
From: Junio C Hamano @ 2009-03-14 20:46 UTC (permalink / raw)
To: git; +Cc: Allan Caffee
In-Reply-To: <20090314010421.GA6642@linux.vnet>
Allan Caffee <allan.caffee@gmail.com> writes:
> The Autoconf macro AC_C_INLINE will redefine the inline keyword to whatever the
> current compiler supports (including possibly nothing).
>
> Signed-off-by: Allan Caffee <allan.caffee@gmail.com>
As far as I can tell, this makes scriptlet to set ac_cv_c_inline and then
the result is written to confdefs.h:
case $ac_cv_c_inline in
inline | yes) ;;
*)
case $ac_cv_c_inline in
no) ac_val=;;
*) ac_val=$ac_cv_c_inline;;
esac
cat >>confdefs.h <<_ACEOF
#ifndef __cplusplus
#define inline $ac_val
#endif
_ACEOF
;;
esac
which is used only during the ./configure run but not during the actual
build.
What am I missing?
^ 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