Git development
 help / color / mirror / Atom feed
* Re: [PATCH 16/18] blob.c: remove unused function
From: Daniel Barkalow @ 2010-01-12 17:37 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <1263282781-25596-17-git-send-email-gitster@pobox.com>

On Mon, 11 Jan 2010, Junio C Hamano wrote:

> parse_blob() is not used anywhere since a510bfa (Mark blobs as parsed when
> they're actually parsed, 2005-04-28).

Perhaps it should be replaced with a comment that blobs are never parsed, 
because they don't need to be? We don't need the actual function, but I 
think it's worth having a note where the function would be.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply

* Re: git-log - hide parent (was: merging two equivalent branches)
From: David Reitter @ 2010-01-12 16:59 UTC (permalink / raw)
  To: git; +Cc: Christian MICHON, Christian Couder, Avery Pennarun
In-Reply-To: <201001080600.26088.chriscool@tuxfamily.org>


[-- Attachment #1.1: Type: text/plain, Size: 1234 bytes --]

On Jan 8, 2010, at 12:00 AM, Christian Couder wrote:
> What you could perhaps do with "git replace" or a graft is to change the 
> merge commit so that it has only one parent instead of 2.

Thanks, also to Avery for his idea with "git .", which works well for me. 

For the benefit of others, here's what I've done in the end in order to get rid of the extra 100,000 commits in the old upstream branch.

A very simple little script takes care of remapping the merges of the old upstream branch to the new one.
It takes the output of this

git log --since=2009-01-01  --format="%H %f"

on each of the two upstream branches and finds corresponding commits using the first commit line.  With this alignment in place, we then need the list of merge commits that need to be redirected:

export BRANCHES='b1 b2 b3'
git log --since=2009-01-01 --author="my name" --format="%H %P" $BRANCHES

This can be fairly broad, but I didn't want BRANCHES to contain the upstream branches (even then it probably doesn't matter).

I then used a little piece of trivial code to apply the alignment to the parents of potential merge commits, to generate the grafts.
This is what's attached, in case anyone will find it useful.





[-- Attachment #1.2: make-grafts.py --]
[-- Type: text/x-python-script, Size: 3901 bytes --]

#!/usr/bin/python

# This will output a Git "grafts" file to use when a (set of) downstream branch(es)
# is to switch from merging with one upstream branch to another upstream branch, without
# keeping the full history of both upstream branches in the repository.
# If the upstream branches contain the same history information (semantically speaking),
# such as when they represent different conversions from an old CVS/SVN repository, then
# this script will find an alignment between them.
# The resulting grafts file will map past merges in the downstream branch to the new
# upstream branch, as if the old upstream branch never existed.
# If this works well, a "git filter-branch" should burn in the grafts so that they can
# be removed.  (This is a history-changing operation.)

# See also:
# http://thread.gmane.org/gmane.comp.version-control.git/136377


# recommended usage:
#./make-grafts.py | sort | uniq > .git/info/grafts

# set input file names
upstream1 = "em-log"
upstream2 = "em-new-log"
mergecommits = "aq-merges"


# produce files:
# git checkout upstream1
# git log --since=2009-01-01  --format="%H %f">../emc/em-log
# git checkout upstream2
# git log --since=2009-01-01  --format="%H %f">../emc/em-new-log
# export BRANCHES='topic/b1 topic/b2 john jane master'
# git log --since=2009-01-01 --author="David Reitter" --format="%H %P" $BRANCHES >../emc/aq-merges; git log --since=2009-01-01 --merges --format="%H %P" $BRANCHES >>../emc/aq-merges

#################

import re
import sys

r1msgs = {}
r1revids = {}
# checkout emacs
# git log --since=2009-01-01  --format="%H %f">../emc/em-log
file = open(upstream1, 'r')
for l in file:
    m =    re.match("([a-f0-9]*) (.*)", l)
    if m:
       r1msgs[m.group(1)] = m.group(2)
       r1revids[m.group(2)] = m.group(1)
file.close()


r2msgs = {}
r2revids = {}
# checkout emacs23
# git log --since=2009-01-01  --format="%H %f" >../emc/em-new-log
file = open(upstream2, 'r')
for l in file:
    m = re.match("([a-f0-9]*) (.*)", l)
    if m:
       r2msgs[m.group(1)] = m.group(2)
       r2revids[m.group(2)] = m.group(1)
file.close()

# checkout master
# export BRANCHES='23.1.undone  Aquamacs22  dr-after-merge  dr/dev  dr/experimental  dr/suedit master topic/NSAlertDialogs  topic/dialogs  topic/face-remapping  topic/mac-support  topic/menu-bar  topic/minibuffer  topic/option-key-remap  topic/printing  topic/python-mode  topic/reconf  topic/smart-spacing  topic/spelling  topic/tabbar  topic/tmm  topic/toolbar'
# git log --since=2009-01-01 --author="David Reitter" --merges --format="%H %P" $BRANCHES >../emc/aq-merges
# it's better to use all commits so we don't miss anything
# git log --since=2009-01-01 --author="David Reitter" --format="%H %P" $BRANCHES >../emc/aq-merges; git log --since=2009-01-01 --merges --format="%H %P" $BRANCHES >>../emc/aq-merges
def replace (revid):
   if revid in r1msgs:
      r1m = r1msgs[revid]
      if r1m in r2revids:
         r2r = r2revids[r1m]
         if r2r:
            return r2r
         else:
            print >> sys.stderr, "can't get mapping for revid "+revid+ r1m
            
      else:
         print >> sys.stderr, "can't find message of revid "+revid
   return revid
      

# checkout master
# 

file = open(mergecommits, 'r')
for l in file:
    revids = l.rstrip().split(" ")
    if revids:

        # test:
        # revids2 = revids
        # for r in revids[1:]:
        #     r2 = replace(r)
        #     if r != r2:
        #         revids2 = revids2 + [r2]
        # correct alternative
        revids2 = [revids[0]] + map(replace, revids[1:])
        if revids != revids2:
            # make graft entry to write the merge such that it
            # looks like the merge came from the other branch
            print " ".join(revids2)
        else:
            print >> sys.stderr, "no remappings found for parents of merge revid "+" ".join(revids)

file.close()



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 203 bytes --]

^ permalink raw reply

* Re: [PATCH 4/4] ls-files: fix overeager pathspec optimization
From: Jeff King @ 2010-01-12 16:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Linus Torvalds, Michael J Gruber, Jon Schewe, spearce
In-Reply-To: <1263022535-12822-4-git-send-email-gitster@pobox.com>

On Fri, Jan 08, 2010 at 11:35:35PM -0800, Junio C Hamano wrote:

> This patch changes the optimization so that it notices when the common
> prefix directory that it starts reading from is an ignored one.

Having just produced the similar but more ugly and messy patch earlier
in the thread, this series looks right to me.

-Peff

^ permalink raw reply

* Re: [PATCHv2 0/3] rebase-i: Ignore comments and blank lines among squash/fixup commands
From: Johannes Schindelin @ 2010-01-12 16:37 UTC (permalink / raw)
  To: Michael Haggerty; +Cc: git, gitster
In-Reply-To: <cover.1263310175.git.mhagger@alum.mit.edu>

Hi,

On Tue, 12 Jan 2010, Michael Haggerty wrote:

> Here is v2 of the patch (now patch series) for making "rebase -i" ignore 
> comments and blank lines while it is processing blocks of squash/fixup 
> commands.

Me likee.

Thanks,
Dscho

^ permalink raw reply

* Re: "What's cooking" incremental edition
From: Jeff King @ 2010-01-12 16:27 UTC (permalink / raw)
  To: Sverre Rabbelier; +Cc: Junio C Hamano, git
In-Reply-To: <fabb9a1e1001101221i389c05a8v7ff241859d5e8dae@mail.gmail.com>

On Sun, Jan 10, 2010 at 03:21:20PM -0500, Sverre Rabbelier wrote:

> On Sun, Jan 10, 2010 at 14:55, Junio C Hamano <gitster@pobox.com> wrote:
> >  * jn/makefile (2010-01-06) 4 commits
> > - - Makefile: consolidate .FORCE-* targets
> > - - Makefile: learn to generate listings for targets requiring special flags
> > - - Makefile: use target-specific variable to pass flags to cc
> > - - Makefile: regenerate assembler listings when asked
> > +  (merged to 'next' on 2010-01-10 at f5a5d42)
> > + + Makefile: consolidate .FORCE-* targets
> > + + Makefile: learn to generate listings for targets requiring special flags
> > + + Makefile: use target-specific variable to pass flags to cc
> > + + Makefile: regenerate assembler listings when asked
> 
> Fwiw, I find it harder to read due to the now ambiguous meaning of the
> + and - (it could either mean something is in pu/next, or that the
> topic changed). Of course this is partly caused by the fact that I
> don't read emails in fixed font (by default), but perhaps it's worth
> considering using different symbols for pu/next-ness?

I agree. Plus line-by-line is not necessarily the most efficient way to
convey the information that a single character changed. If the subject
of the commit didn't change, it would be easier to see soemething like:

  ->+ Makefile: consolidate .FORCE-* targets
  ->+ Makefile: learn to generate listings for targets requiring special flags

etc (where ">" is supposed to indicate transition, but it's actually
quite ugly itself).

That being said, I don't personally see the incremental format as all
that useful. If I want to see increments of what's happening, I use git
itself.  The "What's Cooking" message to me is about seeing a survey of
all topics, even those that haven't changed, with Junio's comments. So
you may take my suggestions with a large grain of salt. :)

-Peff

^ permalink raw reply

* Re: default behaviour for `gitmerge` (no arguments)
From: Jeff King @ 2010-01-12 16:23 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Gareth Adams, git
In-Reply-To: <7v7hrojukz.fsf@alter.siamese.dyndns.org>

On Mon, Jan 11, 2010 at 11:43:40AM -0800, Junio C Hamano wrote:

> The code indeed knows (as you can see "git pull" can figure it out) what
> other ref the current branch is configured to merge with by default.
> There is even a plumbing to do this for script writers.
> 
>     $ git for-each-ref --format='%(upstream)' $(git symbolic-ref HEAD)
> 
> We can teach this short-hand to "git merge", perhaps:
> 
>     $ git merge --default
> 
> But "no argument" cannot be the short-hand, because...

Hmm. If we had the oft-discussed-but-never-agreed-upon shorthand for
"the upstream of" then we wouldn't need a special merge option. You
could just do:

  git merge %HEAD ;# (or git merge %, IIRC the proposal correctly)

-Peff

^ permalink raw reply

* Re: [PATCH] grep: do not do external grep on skip-worktree entries
From: Jeff King @ 2010-01-12 16:21 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Junio C Hamano, Miles Bader, Nguyen Thai Ngoc Duy, git
In-Reply-To: <alpine.LFD.2.00.1001110748560.13040@localhost.localdomain>

On Mon, Jan 11, 2010 at 07:59:18AM -0800, Linus Torvalds wrote:

> The meh news: this shows how grep is faster than regexec() due to being a 
> smarter algorithm. For the non-fixed case (I used "qwerty.*as"), the 
> numbers are
> 
>  - built-in:
> 	real	0m0.548s
> 	user	0m0.384s
> 	sys	0m0.152s
> 
>  - external:
> 	real	0m0.415s
> 	user	0m0.176s
> 	sys	0m0.160s
> 
> so it really is just 'strstr()' that is faster. But This is a 'meh', 
> because I don't really care, and the new code is still way faster than the 
> old one. And I'd be personally willing to just drop the external grep if 
> this is the worst problem.

Just for fun, I repeated my pcre tests on what's in pu (which has
Junio's lookahead patch now). Before they didn't show any improvement
because we wasted all of our time in non-regex code. There is some
improvement in just using pcre, but I didn't get any improvement by
tweaking it:

[pu]
$ time git grep 'qwerty.*as' >/dev/null
real    0m1.007s
user    0m0.752s
sys     0m0.252s

[pu + pcre]
$ time git grep --no-ext-grep 'qwerty.*as' >/dev/null
real    0m0.864s
user    0m0.648s
sys     0m0.212s

[pu + pcre_study]
$ time git grep --no-ext-grep 'qwerty.*as' >/dev/null
real    0m0.866s
user    0m0.628s
sys     0m0.200s

[pu + pcre_dfa_exec]
$ time git grep --no-ext-grep 'qwerty.*as' >/dev/null
real    0m0.868s
user    0m0.608s
sys     0m0.256s

So pcre seems to buy us about 15%, and tweaking it gets lost in the
noise (or I am tweaking it badly, which is entirely possible). I doubt
it's worth the trouble of supporting pcre for that much.

And let me add an additional vote against strstr:

$ time git grep --no-ext-grep qwerty >/dev/null
real    0m3.285s
user    0m3.032s
sys     0m0.252s

-Peff

^ permalink raw reply

* Re: [RFC PATCH (WIP)] Show a dirty working tree and a detached HEAD in status for submodule
From: Jens Lehmann @ 2010-01-12 16:20 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Git Mailing List, Johannes Schindelin, Shawn O. Pearce,
	Heiko Voigt, Lars Hjemli
In-Reply-To: <7vtyusb6rv.fsf@alter.siamese.dyndns.org>

Am 11.01.2010 23:45, schrieb Junio C Hamano:
> Jens Lehmann <Jens.Lehmann@web.de> writes:
>> * It makes git show submodules as modified in the superproject when
>>   one or more of these conditions are met:
>>
>>     a) The submodule contains untracked files
>>     b) The submodule contains modified files
>>     c) The submodules HEAD is not on a local or remote branch
>>
>>   That can be seen when using either "git status", "git diff[-files]"
>>   & "git diff[-index] HEAD" (and with "git gui" & gitk).
> 
> If the submodule is checked out, _and_ if the HEAD there, either detached
> or not, does not agree with what the "other" one records (i.e. the commit
> recorded in an entry in the index, or in the tree, that you are comparing
> your work tree against), then it also should be considered modified.  I
> don't think your (a)-(c) cover this case.

Right, i did not to add the current (and unchanged) behavior to this
list, i just wrote down the new cases (and these new cases only come
into play when the submodule has been checked out).


> Also I don't understand why you want to treat (c) any specially at all.

To avoid possible loss of commits.

Before doing something like "git checkout -f" or "git reset --hard", it
is a good idea to check via "git status" if you have local changes. I
hope checkout and reset will recurse into submodules in the near future.
when they do, all commits in the submodule which are not on any branch
are lost (at least when the reflog expired). Or the remote branch the
user thinks the submodule is tracking has been deleted or rebased. You
might want to know that before e.g. committing it in the superproject.

Maybe compare it to new or modified files in a git repo: They don't
necessarily pose a problem when committing, you might be able to push
and clone the repo somewhere else and nothing breaks. But you wanna
know about these new and modifies files, in case you just forgot to add
them. So i think the HEAD of a submodule not on any branch is a bit like
a new or modified file in a regular repo, both will not show up in a
different repo than yours unless you do something about it. And a
modification is lost by a checkout or reset just as the dangling commits
will be.

Yes, this test can't provide 100% safety against loss of commits, but at
least we should try to warn if we can detect it. Does it give false
positives (saying the submodules HEAD is dangling when it shouldn't)?
I doubt it. Does it give false negatives? Yes, but we can't do anything
about that due to the distributed nature of git.


> Even if (c) is something we _should_ report, please do not call that as
> "detached" in its implementation.

Correct, that term is misleading in this context. Maybe call it
something like "The submodule contains a HEAD not on any branch"
then? Or "The submodule has a dangling HEAD"?


>> * This behavior is not configurable but activated by default. A config
>>   option is needed here.
> 
> I doubt it.
> 
> My gut feeling is that this should be _always_ on for a submodule
> directory that has been "submodule init/update".  The user is interested
> in that particular submodule, and any change to it should be reported for
> both classes of users.  Theose who meant to use the submodule read-only
> need to be able to notice that they accidentally made the submodule dirty
> before making a commit in the superproject.  Those who wanted to work in
> submodule needs to know if the state is in sync with what they expect
> before making a commit in the superproject.

Yes, me too thinks it should default to on for every initialized
submodule.

But this is a major change in behavior, so it might be a good idea to be
able to turn it off (e.g. if it breaks scripts). Maybe a config option
really isn't such a bright idea, but what about having something like a
"--no-dirty-submodules" command line option?


> That of course is provided if the unconditional check does not trigger for
> submodules that the user hasn't "submodue init"ed; I think you did that
> correctly at the beginning of your is_submodule_modified() implementation.

Yes, that's what that test is for. Will add a comment there.


> But the thing is, in a distributed environment, the submodule HEAD being
> at the tip of _some_ branch (either local or remote) you have doesn't mean
> anything to help them.  IOW, for protect others, you would need a check
> when you _push out_ (either in 'push' or on the receiving end).

This is something on my TODO list: Add a change to "git push" to assert
that all HEADs of initialized submodules lie on a /remote/ branch before
doing the push in the superproject.


> So I'd suggest dropping this condition in "status/diff" that is about
> preparing to make the next commit in your _local_ history.

I would rather have this patch merged without c) than not at all. But i
think it is a worthwhile and rather cheap test. And i would prefer to
change the default behavior of "git status" only once now and not again
later.

^ permalink raw reply

* Re: [PATCH 2/3] strbuf: add strbuf_percentquote_buf
From: Jeff King @ 2010-01-12 16:18 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Junio C Hamano, Adam Megacz, git
In-Reply-To: <alpine.DEB.1.00.1001121718210.4985@pacific.mpi-cbg.de>

On Tue, Jan 12, 2010 at 05:19:21PM +0100, Johannes Schindelin wrote:

> > This is handy for creating strings which will be fed to
> > strbuf_expand or printf.
> 
> For printf(), there is always %s%s, so I would not say your patch is 
> useful there, but rather adds churn: first you add a percent, then you 
> strip it away again.

True. It is only useful in either case if you are going to pass the
format specifier through an API that does all of its work at once (e.g.,
in this instance, I would be happy to simply output my strings at the
right moment, but I need to get them _between_ the log format and the
diff summary, which means I need to hide them in the log format
specifier). That tends not to happen with printf-style strings, since we
don't build complex APIs around them.

-Peff

^ permalink raw reply

* Re: [PATCH 2/3] strbuf: add strbuf_percentquote_buf
From: Johannes Schindelin @ 2010-01-12 16:19 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, Adam Megacz, git
In-Reply-To: <20100112154153.GB24957@coredump.intra.peff.net>

Hi,

On Tue, 12 Jan 2010, Jeff King wrote:

> This is handy for creating strings which will be fed to
> strbuf_expand or printf.

For printf(), there is always %s%s, so I would not say your patch is 
useful there, but rather adds churn: first you add a percent, then you 
strip it away again.

Ciao,
Dscho

^ permalink raw reply

* [PATCH 3/3] commit: show interesting ident information in summary
From: Jeff King @ 2010-01-12 15:46 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Adam Megacz, git
In-Reply-To: <20100112153656.GA24840@coredump.intra.peff.net>

There are a few cases of user identity information that we
consider interesting:

  1. When the author and committer identities do not match.

  2. When the committer identity was picked automatically
     from the username, hostname and GECOS information.

In these cases, we already show the information in the
commit message template. However, users do not always see
that template because they might use "-m" or "-F". With this
patch, we show these interesting cases after the commit,
along with the subject and change summary. The new output
looks like:

  $ git commit \
      -m "federalist papers" \
      --author='Publius <alexander@hamilton.com>'
  [master 3d226a7] federalist papers
   Author: Publius <alexander@hamilton.com>
   1 files changed, 1 insertions(+), 0 deletions(-)

for case (1), and:

  $ git config --global --unset user.name
  $ git config --global --unset user.email
  $ git commit -m foo
  [master 7c2a927] foo
   Committer: Jeff King <peff@c-71-185-130-222.hsd1.va.comcast.net>
   1 files changed, 1 insertions(+), 0 deletions(-)

for case (2).

Signed-off-by: Jeff King <peff@peff.net>
---
Note that this has a slight semantic conflict with the jc/ident topic in
next. The user_ident_explicitly_given flag needs to be compared to
IDENT_ALL.

I hope the example output in the commit message is not too verbose. I
was recently reviewing somebody's series that made output changes, and
they didn't include sample output anywhere, which made reviewing a lot
more annoying.

Personally I don't care much about case (2) one way or the other, but it
is the one that triggered this thread. I think case (1) is very useful,
though.

I tested case (2) manually, but I didn't include anything in the test
suite; I feel funny testing output created from the hostname and GECOS
(can't it even barf if the user's system isn't set up very well? That
would produce a false negative for the test).

 builtin-commit.c  |   25 ++++++++++++++++++++++---
 t/t7501-commit.sh |    6 +++++-
 2 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/builtin-commit.c b/builtin-commit.c
index 073fe90..279145d 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -1046,9 +1046,12 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 {
 	struct rev_info rev;
 	struct commit *commit;
-	static const char *format = "format:%h] %s";
+	struct strbuf format = STRBUF_INIT;
 	unsigned char junk_sha1[20];
 	const char *head = resolve_ref("HEAD", junk_sha1, 0, NULL);
+	struct pretty_print_context pctx = {0};
+	struct strbuf author_ident = STRBUF_INIT;
+	struct strbuf committer_ident = STRBUF_INIT;
 
 	commit = lookup_commit(sha1);
 	if (!commit)
@@ -1056,6 +1059,21 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 	if (!commit || parse_commit(commit))
 		die("could not parse newly created commit");
 
+	strbuf_addstr(&format, "format:%h] %s");
+
+	format_commit_message(commit, "%an <%ae>", &author_ident, &pctx);
+	format_commit_message(commit, "%cn <%ce>", &committer_ident, &pctx);
+	if (strbuf_cmp(&author_ident, &committer_ident)) {
+		strbuf_addstr(&format, "\n Author: ");
+		strbuf_percentquote_buf(&format, &author_ident);
+	}
+	if (!user_ident_explicitly_given) {
+		strbuf_addstr(&format, "\n Committer: ");
+		strbuf_percentquote_buf(&format, &committer_ident);
+	}
+	strbuf_release(&author_ident);
+	strbuf_release(&committer_ident);
+
 	init_revisions(&rev, prefix);
 	setup_revisions(0, NULL, &rev, NULL);
 
@@ -1066,7 +1084,8 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 
 	rev.verbose_header = 1;
 	rev.show_root_diff = 1;
-	get_commit_format(format, &rev);
+	get_commit_format(format.buf, &rev);
+	strbuf_release(&format);
 	rev.always_show_header = 0;
 	rev.diffopt.detect_rename = 1;
 	rev.diffopt.rename_limit = 100;
@@ -1085,7 +1104,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 		struct pretty_print_context ctx = {0};
 		struct strbuf buf = STRBUF_INIT;
 		ctx.date_mode = DATE_NORMAL;
-		format_commit_message(commit, format + 7, &buf, &ctx);
+		format_commit_message(commit, format.buf + 7, &buf, &ctx);
 		printf("%s\n", buf.buf);
 		strbuf_release(&buf);
 	}
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index a529701..7940901 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -117,7 +117,11 @@ test_expect_success \
 test_expect_success \
 	"overriding author from command line" \
 	"echo 'gak' >file && \
-	 git commit -m 'author' --author 'Rubber Duck <rduck@convoy.org>' -a"
+	 git commit -m 'author' --author 'Rubber Duck <rduck@convoy.org>' -a >output 2>&1"
+
+test_expect_success \
+	"commit --author output mentions author" \
+	"grep Rubber.Duck output"
 
 test_expect_success PERL \
 	"interactive add" \
-- 
1.6.6.138.g309fc.dirty

^ permalink raw reply related

* [PATCH 2/3] strbuf: add strbuf_percentquote_buf
From: Jeff King @ 2010-01-12 15:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Adam Megacz, git
In-Reply-To: <20100112153656.GA24840@coredump.intra.peff.net>

This is handy for creating strings which will be fed to
strbuf_expand or printf.

Signed-off-by: Jeff King <peff@peff.net>
---
 Documentation/technical/api-strbuf.txt |    7 +++++++
 strbuf.c                               |   10 ++++++++++
 strbuf.h                               |    1 +
 3 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/Documentation/technical/api-strbuf.txt b/Documentation/technical/api-strbuf.txt
index a0e0f85..d5ae3b0 100644
--- a/Documentation/technical/api-strbuf.txt
+++ b/Documentation/technical/api-strbuf.txt
@@ -214,6 +214,13 @@ which can be used by the programmer of the callback as she sees fit.
 	placeholder and replacement string.  The array needs to be
 	terminated by an entry with placeholder set to NULL.
 
+`strbuf_percentquote_buf`::
+
+	Append the contents of one strbuf to another, quoting any
+	percent signs ("%") into double-percents ("%%") in the
+	destination. This is useful for literal data to be fed to either
+	strbuf_expand or to the *printf family of functions.
+
 `strbuf_addf`::
 
 	Add a formatted string to the buffer.
diff --git a/strbuf.c b/strbuf.c
index 6cbc1fc..b5183c6 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -257,6 +257,16 @@ size_t strbuf_expand_dict_cb(struct strbuf *sb, const char *placeholder,
 	return 0;
 }
 
+void strbuf_percentquote_buf(struct strbuf *dest, struct strbuf *src)
+{
+	int i;
+	for (i = 0; i < src->len; i++) {
+		if (src->buf[i] == '%')
+			strbuf_addch(dest, '%');
+		strbuf_addch(dest, src->buf[i]);
+	}
+}
+
 size_t strbuf_fread(struct strbuf *sb, size_t size, FILE *f)
 {
 	size_t res;
diff --git a/strbuf.h b/strbuf.h
index fa07ecf..f6bf055 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -116,6 +116,7 @@ struct strbuf_expand_dict_entry {
 	const char *value;
 };
 extern size_t strbuf_expand_dict_cb(struct strbuf *sb, const char *placeholder, void *context);
+extern void strbuf_percentquote_buf(struct strbuf *dest, struct strbuf *src);
 
 __attribute__((format (printf,2,3)))
 extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...);
-- 
1.6.6.138.g309fc.dirty

^ permalink raw reply related

* [PATCH 1/3] strbuf_expand: convert "%%" to "%"
From: Jeff King @ 2010-01-12 15:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Adam Megacz, git
In-Reply-To: <20100112153656.GA24840@coredump.intra.peff.net>

The only way to safely quote arbitrary text in a
pretty-print user format is to replace instances of "%" with
"%x25". This is slightly unreadable, and many users would
expect "%%" to produce a single "%", as that is what printf
format specifiers do.

This patch converts "%%" to "%" for all users of
strbuf_expand:

 1. git-daemon interpolated paths

 2. pretty-print user formats

 3. merge driver command lines

Case (1) was already doing the conversion itself outside of
strbuf_expand. Case (2) is the intended beneficiary of this
patch. Case (3) users probably won't notice, but as this is
user-facing behavior, consistently providing the quoting
mechanism makes sense.

Signed-off-by: Jeff King <peff@peff.net>
---
Because of the %x25 thing, this isn't strictly necessary for my series.
I do think it's the right thing to do, though. If you want to drop it
because of the user-visible behavior change, I can re-roll the rest of
my series around %x25 quoting (though it makes the helper in 2/3 less
useful, as the quoting doesn't work for printf anymore).

 Documentation/pretty-formats.txt |    1 +
 daemon.c                         |    1 -
 strbuf.c                         |    6 ++++++
 t/t6006-rev-list-format.sh       |    7 +++++++
 4 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 53a9168..1686a54 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -134,6 +134,7 @@ The placeholders are:
 - '%C(...)': color specification, as described in color.branch.* config option
 - '%m': left, right or boundary mark
 - '%n': newline
+- '%%': a raw '%'
 - '%x00': print a byte from a hex code
 - '%w([<w>[,<i1>[,<i2>]]])': switch line wrapping, like the -w option of
   linkgit:git-shortlog[1].
diff --git a/daemon.c b/daemon.c
index 918e560..360635e 100644
--- a/daemon.c
+++ b/daemon.c
@@ -147,7 +147,6 @@ static char *path_ok(char *directory)
 			{ "IP", ip_address },
 			{ "P", tcp_port },
 			{ "D", directory },
-			{ "%", "%" },
 			{ NULL }
 		};
 
diff --git a/strbuf.c b/strbuf.c
index a6153dc..6cbc1fc 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -227,6 +227,12 @@ void strbuf_expand(struct strbuf *sb, const char *format, expand_fn_t fn,
 			break;
 		format = percent + 1;
 
+		if (*format == '%') {
+			strbuf_addch(sb, '%');
+			format++;
+			continue;
+		}
+
 		consumed = fn(sb, format, context);
 		if (consumed)
 			format += consumed;
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index 5719315..b0047d3 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -19,6 +19,13 @@ test_cmp expect.$1 output.$1
 "
 }
 
+test_format percent %%h <<'EOF'
+commit 131a310eb913d107dd3c09a65d1651175898735d
+%h
+commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873
+%h
+EOF
+
 test_format hash %H%n%h <<'EOF'
 commit 131a310eb913d107dd3c09a65d1651175898735d
 131a310eb913d107dd3c09a65d1651175898735d
-- 
1.6.6.138.g309fc.dirty

^ permalink raw reply related

* [PATCHv2 3/3] rebase-i: Ignore comments and blank lines in peek_next_command
From: Michael Haggerty @ 2010-01-12 15:38 UTC (permalink / raw)
  To: git; +Cc: gitster, Johannes.Schindelin, Michael Haggerty
In-Reply-To: <cover.1263310175.git.mhagger@alum.mit.edu>

Previously, blank lines and/or comments within a series of
squash/fixup commands would confuse "git rebase -i" into thinking that
the series was finished.  It would therefore require the user to edit
the commit message for the squash/fixup commits seen so far.  Then,
after continuing, it would ask the user to edit the commit message
again.

Ignore comments and blank lines within a group of squash/fixup
commands, allowing them to be processed in one go.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 git-rebase--interactive.sh    |    2 +-
 t/t3404-rebase-interactive.sh |   24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 27479db..2e56e64 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -340,7 +340,7 @@ make_squash_message () {
 }
 
 peek_next_command () {
-	sed -n "1s/ .*$//p" < "$TODO"
+	sed -n -e "/^#/d" -e "/^$/d" -e "s/ .*//p" -e "q" < "$TODO"
 }
 
 do_next () {
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index ea26115..d9382e4 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -265,6 +265,30 @@ test_expect_success 'squash and fixup generate correct log messages' '
 	git branch -D squash-fixup
 '
 
+test_expect_success 'squash ignores comments' '
+	git checkout -b skip-comments E &&
+	base=$(git rev-parse HEAD~4) &&
+	FAKE_COMMIT_AMEND="ONCE" FAKE_LINES="# 1 # squash 2 # squash 3 # squash 4 #" \
+		EXPECT_HEADER_COUNT=4 \
+		git rebase -i $base &&
+	test $base = $(git rev-parse HEAD^) &&
+	test 1 = $(git show | grep ONCE | wc -l) &&
+	git checkout to-be-rebased &&
+	git branch -D skip-comments
+'
+
+test_expect_success 'squash ignores blank lines' '
+	git checkout -b skip-blank-lines E &&
+	base=$(git rev-parse HEAD~4) &&
+	FAKE_COMMIT_AMEND="ONCE" FAKE_LINES="> 1 > squash 2 > squash 3 > squash 4 >" \
+		EXPECT_HEADER_COUNT=4 \
+		git rebase -i $base &&
+	test $base = $(git rev-parse HEAD^) &&
+	test 1 = $(git show | grep ONCE | wc -l) &&
+	git checkout to-be-rebased &&
+	git branch -D skip-blank-lines
+'
+
 test_expect_success 'squash works as expected' '
 	for n in one two three four
 	do
-- 
1.6.6.140.ga53ad

^ permalink raw reply related

* [PATCHv2 2/3] lib-rebase: Allow comments and blank lines to be added to the rebase script
From: Michael Haggerty @ 2010-01-12 15:38 UTC (permalink / raw)
  To: git; +Cc: gitster, Johannes.Schindelin, Michael Haggerty
In-Reply-To: <cover.1263310175.git.mhagger@alum.mit.edu>

(For testing "rebase -i"): Support new action types in $FAKE_LINES to
allow comments and blank lines to be added to the "rebase -i" command
list.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 t/lib-rebase.sh |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 0fce595..0db8250 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -5,13 +5,20 @@
 # - override the commit message with $FAKE_COMMIT_MESSAGE,
 # - amend the commit message with $FAKE_COMMIT_AMEND
 # - check that non-commit messages have a certain line count with $EXPECT_COUNT
-# - rewrite a rebase -i script with $FAKE_LINES in the form
+# - rewrite a rebase -i script as directed by $FAKE_LINES.
+#   $FAKE_LINES consists of a sequence of words separated by spaces.
+#   The following word combinations are possible:
 #
-#	"[<lineno1>] [<lineno2>]..."
+#   "<lineno>" -- add a "pick" line with the SHA1 taken from the
+#       specified line.
 #
-#   If a line number is prefixed with "squash", "fixup", "edit", or
-#   "reword", the respective line's command will be replaced with the
-#   specified one.
+#   "<cmd> <lineno>" -- add a line with the specified command
+#       ("squash", "fixup", "edit", or "reword") and the SHA1 taken
+#       from the specified line.
+#
+#   "#" -- Add a comment line.
+#
+#   ">" -- Add a blank line.
 
 set_fake_editor () {
 	echo "#!$SHELL_PATH" >fake-editor.sh
@@ -36,6 +43,10 @@ for line in $FAKE_LINES; do
 	case $line in
 	squash|fixup|edit|reword)
 		action="$line";;
+	"#")
+		echo '# comment' >> "$1";;
+	">")
+		echo >> "$1";;
 	*)
 		sed -n "${line}s/^pick/$action/p" < "$1".tmp >> "$1"
 		action=pick;;
-- 
1.6.6.140.ga53ad

^ permalink raw reply related

* [PATCHv2 1/3] lib-rebase: Provide clearer debugging info about what the editor did
From: Michael Haggerty @ 2010-01-12 15:38 UTC (permalink / raw)
  To: git; +Cc: gitster, Johannes.Schindelin, Michael Haggerty
In-Reply-To: <cover.1263310175.git.mhagger@alum.mit.edu>

(For testing "rebase -i"): Output the "rebase -i" command script
before and after the edits, to make it clearer what the editor did.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 t/lib-rebase.sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index f4dda02..0fce595 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -29,6 +29,7 @@ test -z "$EXPECT_COUNT" ||
 test -z "$FAKE_LINES" && exit
 grep -v '^#' < "$1" > "$1".tmp
 rm -f "$1"
+echo 'rebase -i script before editing:'
 cat "$1".tmp
 action=pick
 for line in $FAKE_LINES; do
@@ -36,12 +37,12 @@ for line in $FAKE_LINES; do
 	squash|fixup|edit|reword)
 		action="$line";;
 	*)
-		echo sed -n "${line}s/^pick/$action/p"
-		sed -n "${line}p" < "$1".tmp
 		sed -n "${line}s/^pick/$action/p" < "$1".tmp >> "$1"
 		action=pick;;
 	esac
 done
+echo 'rebase -i script after editing:'
+cat "$1"
 EOF
 
 	test_set_editor "$(pwd)/fake-editor.sh"
-- 
1.6.6.140.ga53ad

^ permalink raw reply related

* [PATCHv2 0/3] rebase-i: Ignore comments and blank lines among squash/fixup commands
From: Michael Haggerty @ 2010-01-12 15:38 UTC (permalink / raw)
  To: git; +Cc: gitster, Johannes.Schindelin, Michael Haggerty
In-Reply-To: <7vr5pw3pwp.fsf@alter.siamese.dyndns.org>

Here is v2 of the patch (now patch series) for making "rebase -i"
ignore comments and blank lines while it is processing blocks of
squash/fixup commands.

Please note that this version applies to "next", not "master", because
it depends on some changes to t/t3404-rebase-interactive.sh that were
made in mh/rebase-fixup.  (This dependency is superficial and could be
removed if necessary.)

The first patch in this series is not essential to the functionality
but I found it useful when debugging the tests.

Michael Haggerty (3):
  lib-rebase: Provide clearer debugging info about what the editor did
  lib-rebase: Allow comments and blank lines to be added to the rebase
    script
  rebase-i: Ignore comments and blank lines in peek_next_command

 git-rebase--interactive.sh    |    2 +-
 t/lib-rebase.sh               |   26 +++++++++++++++++++-------
 t/t3404-rebase-interactive.sh |   24 ++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 8 deletions(-)

^ permalink raw reply

* Re: gitosis user on Windows
From: Howard Miller @ 2010-01-12 15:38 UTC (permalink / raw)
  To: matias; +Cc: Peter Krefting, Git Mailing List
In-Reply-To: <4B4C960E.5080004@pizarro.net>

2010/1/12  <matias@pizarro.net>:
> Hi,
>
> If he is using tortoise git there are 2 different ways, mutually exclusive,
> depending on what he choses regarding which version of plink.exe to use.
> He has to chose this there: 'Start' > 'All Programs' > 'TortoiseGit' >
> 'Settings'  Then choose an SSH client. Typical examples of values for this
> would be:
>   - C:\Program Files\TortoiseGit\bin\TortoisePLink.exe  if he chooses to use
> TortoiseGit's plink
>   - C:\Program Files\Putty\plink.exe if he chooses to use putty
>
> I understand he is using TortoiseGit, so he would have to use the first
> option and then open 'Start' > 'All Programs' > 'TortoiseGit' > Puttygen
>
> Then click on 'Generate' and follow instructions.
>
> Once he has created his public key, he has to load it after each reboot,
> using 'Start' > 'All Programs' > 'TortoiseGit' > 'Pageant'.
> He will then be prompted to locate his public key and then to enter the
> password that protects it.
> If he wants pageant to point directly to his certificate he can create a
> link and specify as target:
> "C:\Program Files\TortoiseGit\bin\pageant.exe" "PATH/TO/MY/public_key.ppk"
> changing of course the paths to reflect his own values.
>
> Hope this helps. Just let me know if you need more information.
>
> matías pizarro

Thanks Matías,

It *almost* worked. We couldn't get the key pairs to work though. What
we had to do was to generate the keypair on a linux box and transfer
the private key to the windows box. We couldn't figure out how to
generate the right type of keys and that was just easier. Problem
solved :)

Howard

^ permalink raw reply

* Re: [PATCH] Display author and committer after "git commit"
From: Jeff King @ 2010-01-12 15:36 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Adam Megacz, git
In-Reply-To: <20100112142405.GA13369@coredump.intra.peff.net>

On Tue, Jan 12, 2010 at 09:24:05AM -0500, Jeff King wrote:

> But I don't understand why the original patch needed to touch anything
> outside of builtin-commit.c:print_summary. Something like this should
> work (though see below for why it isn't ready for inclusion):

Well, I had originally meant to send this off and try to convince Adam
to fix it up for inclusion, but it seemed easy enough so I just went
ahead and did it.

  [1/3]: strbuf_expand: convert "%%" to "%"
  [2/3]: strbuf: add strbuf_percentquote_buf
  [3/3]: commit: show interesting ident information in summary

-Peff

^ permalink raw reply

* Re: [PATCH] Display author and committer after "git commit"
From: Jeff King @ 2010-01-12 14:52 UTC (permalink / raw)
  To: Adam Megacz; +Cc: git
In-Reply-To: <20100112142405.GA13369@coredump.intra.peff.net>

On Tue, Jan 12, 2010 at 09:24:06AM -0500, Jeff King wrote:

>   - It tries to quote any percents in the author name, but user formats
>     don't actually have a quoting mechanism! Probably we should
>     interpret "%%" as "%". Even though it's a behavior change, I
>     consider the current behavior buggy.

Actually, on second thought, they do: you can use %x25 to get the same
effect. I still think we should support '%%' as a more readable and
expected alternative (this is how printf works, and daemon.c's expansion
already does this).

-Peff

^ permalink raw reply

* Re: [PATCH] Display author and committer after "git commit"
From: Jeff King @ 2010-01-12 14:24 UTC (permalink / raw)
  To: Adam Megacz; +Cc: git
In-Reply-To: <xuu2zl4kks3s.fsf@nowhere.com>

On Tue, Jan 12, 2010 at 01:51:51AM +0000, Adam Megacz wrote:

> Junio C Hamano <gitster@pobox.com> writes:
> > Why isn't the "# Author:" and "# Committer:" information you see along
> > with "git status" output in the editor "git commit" gives you sufficient
> > if it is to avoid unconfigured/misconfigured names and e-mail
> > addresses?
> 
> It is sufficient!  But, as others have mentioned, it is not displayed
> when "git commit -m" is used.  The patch in this thread rectifies that
> omission.

I think it is sensible to reiterate the information in the summary for
the "interesting" cases, as it does make it available to people who do
not see the template, and as the uncommon case, is not usually
cluttering the output.

But I don't understand why the original patch needed to touch anything
outside of builtin-commit.c:print_summary. Something like this should
work (though see below for why it isn't ready for inclusion):

diff --git a/builtin-commit.c b/builtin-commit.c
index 1e353f6..6ee6b10 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -1054,9 +1054,12 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 {
 	struct rev_info rev;
 	struct commit *commit;
-	static const char *format = "format:%h] %s";
+	struct strbuf format = STRBUF_INIT;
 	unsigned char junk_sha1[20];
 	const char *head = resolve_ref("HEAD", junk_sha1, 0, NULL);
+	struct pretty_print_context pctx = {0};
+	struct strbuf author_ident = STRBUF_INIT;
+	struct strbuf committer_ident = STRBUF_INIT;
 
 	commit = lookup_commit(sha1);
 	if (!commit)
@@ -1064,6 +1067,22 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 	if (!commit || parse_commit(commit))
 		die("could not parse newly created commit");
 
+	strbuf_addstr(&format, "format:%h] %s");
+
+	format_commit_message(commit, "%an <%ae>", &author_ident, &pctx);
+	format_commit_message(commit, "%cn <%ce>", &committer_ident, &pctx);
+	if (strbuf_cmp(&author_ident, &committer_ident)) {
+		int i;
+		strbuf_addstr(&format, "\n Author: ");
+		for (i = 0; i < author_ident.len; i++) {
+			if (author_ident.buf[i] == '%')
+				strbuf_addch(&format, '%');
+			strbuf_addch(&format, author_ident.buf[i]);
+		}
+	}
+	strbuf_release(&author_ident);
+	strbuf_release(&committer_ident);
+
 	init_revisions(&rev, prefix);
 	setup_revisions(0, NULL, &rev, NULL);
 
@@ -1074,7 +1093,8 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 
 	rev.verbose_header = 1;
 	rev.show_root_diff = 1;
-	get_commit_format(format, &rev);
+	get_commit_format(format.buf, &rev);
+	strbuf_release(&format);
 	rev.always_show_header = 0;
 	rev.diffopt.detect_rename = 1;
 	rev.diffopt.rename_limit = 100;
@@ -1093,7 +1113,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 		struct pretty_print_context ctx = {0};
 		struct strbuf buf = STRBUF_INIT;
 		ctx.date_mode = DATE_NORMAL;
-		format_commit_message(commit, format + 7, &buf, &ctx);
+		format_commit_message(commit, format.buf + 7, &buf, &ctx);
 		printf("%s\n", buf.buf);
 		strbuf_release(&buf);
 	}

It's not appropriate for inclusion because:

  - I didn't actually test it beyond "GIT_AUTHOR_NAME=Foo git commit
    -m". I think what the code does is correct, but it may be breaking
    output in the test suite.

  - It tries to quote any percents in the author name, but user formats
    don't actually have a quoting mechanism! Probably we should
    interpret "%%" as "%". Even though it's a behavior change, I
    consider the current behavior buggy.

    Side note: it feels a little hack-ish that I have to actually use a
    user-format to get the author and committer. But we don't seem to
    have any infrastructure for something as simple as "give me a string
    with the author name of this commit".

  - It only handles author != committer as interesting. We should also
    check user_ident_explicitly_given and show the committer in that
    case, as the editor template does.

-Peff

^ permalink raw reply related

* [RFH] Git and filesystem ACLs: problem with 'git gc'
From: Matthieu Moy @ 2010-01-12 13:57 UTC (permalink / raw)
  To: git

Hi,

I tried setting up a Git repository restricting the access using the
filesystem's ACL. In short: It almost works, but pack creation break
it. I'm looking for help to fix it.

The setup is: my user is "moy", my $HOME is rwx------ and my umask is
077 (i.e. by default, I don't share anything). I want to authorize a
user "foo" to access my repository:

cd ~/test/
git init testacl
setfacl -Rm u:foo:rwx '/home/moy/test/testacl'
setfacl -Rm d:u:foo:rwx '/home/moy/test/testacl'
setfacl -Rm d:u:moy:rwx '/home/moy/test/testacl'
setfacl -m u:foo:x '/home/moy/test'
setfacl -m u:foo:x '/home/moy'

With this setup, I can create new files, and the user foo can do the
same, the ACLs give permission to each other. Object creation (git
add, git commit) work:

$ getfacl .git/objects/3c/7a37f109f8e7f7b9f8b64833ea331fa9b047f5 
# file: .git/objects/3c/7a37f109f8e7f7b9f8b64833ea331fa9b047f5
# owner: moy
# group: perms
user::r--
user:moy:rwx
user:foo:rwx
group::---
mask::rwx
other::r--

but when pack files are created by a user, the file is not readable by
the other:

$ getfacl .git/objects/pack/pack-cf224e8b0da92fd72fbea8f101912db4835445d1.pack 
# file: .git/objects/pack/pack-cf224e8b0da92fd72fbea8f101912db4835445d1.pack
# owner: moy
# group: perms
user::r--
user:moy:rwx			#effective:---
user:len:rwx			#effective:---
group::---
mask::---
other::---

$ ls -l .git/objects/pack/pack-cf224e8b0da92fd72fbea8f101912db4835445d1.pack 
-r--------+ 1 moy perms 468 Jan 12 13:18 .git/objects/pack/pack-cf224e8b0da92fd72fbea8f101912db4835445d1.pack

My interpretation of the problem is that Git tried to remove the
permission for group (~ chmod g-rwx) on the pack file, and as an
undesirable side effect, setting the group permissions also sets the
ACL mask, and prevents other users from accessing it, even though they
have a user-ACL.

A workaround for this is to set core.sharedrepository to 'group', but
since object creation just works, I guess the pack creation should
just work too, with or without core.sharedrepository ...

I investigated a bit, and the problem seems to come from mkstemp,
which is used by write_pack_file to create the temporary file: files
created by mkstemp get an ACL umask of ---.

Is it really a good idea to use mkstemp? We're inside
.git/object/pack, for which the user is supposed to have already set
correct permissions, so shouldn't we just create a random file name
and then use a plain open(...) to create the file, leaving the umask
do its job to control the permissions?

Thanks,

--
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply

* Re: [RESEND PATCH] french translation of gitk
From: Emmanuel Trillaud @ 2010-01-12 13:02 UTC (permalink / raw)
  To: Paul Mackerras
  Cc: Nicolas Sebrecht, Maximilien Noal, Matthieu Moy, Nicolas Pitre,
	Git Mailing List, Thomas Moulard, Junio C Hamano, Guy Brand
In-Reply-To: <20100112112122.GD6685@brick.ozlabs.ibm.com>

Hi Paul, 

Le Tue, 12 Jan 2010 22:21:22 +1100,
Paul Mackerras <paulus@samba.org> a écrit :
> 
> I get those errors too.  Could somebody resend a corrected patch,
> please?
Here is an updated patch. It apply and compile cleanly on my gitk tree.

Thank for taking care of this.

Emmanuel Trillaud

--- >8 ---
Subject: gitk: Add French translation
From: Emmanuel Trillaud <etrillaud@gmail.com>

Signed-off-by: Emmanuel Trillaud <etrillaud@gmail.com>
Signed-off-by: Thomas Moulard <thomas.moulard@gmail.com>
Signed-off-by: Guy Brand <gb@unistra.fr>
Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
---
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..cb0e1ed
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,1254 @@
+# French translation of the gitk package
+# Copyright (C) 2005-2008 Paul Mackerras.  All rights reserved.
+# This file is distributed under the same license as the gitk package.
+# Translators:
+# Emmanuel Trillaud <etrillaud@gmail.com>
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gitk\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-05 15:16+0200\n"
+"PO-Revision-Date: 2009-11-19 22:13+0100\n"
+"Last-Translator: Emmanuel Trillaud <etrillaud@gmail.com>\n"
+"Language-Team: git@vger.kernel.org\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: French\n"
+"X-Poedit-Country: FRANCE\n"
+
+#: gitk:113
+msgid "Couldn't get list of unmerged files:"
+msgstr "Impossible de récupérer la liste des fichiers non fusionnés :"
+
+#: gitk:269
+msgid "Error parsing revisions:"
+msgstr "Erreur lors du parcours des révisions :"
+
+#: gitk:324
+msgid "Error executing --argscmd command:"
+msgstr "Erreur à l'exécution de la commande --argscmd :"
+
+#: gitk:337
+msgid "No files selected: --merge specified but no files are unmerged."
+msgstr ""
+"Aucun fichier sélectionné : --merge précisé, mais tous les fichiers sont "
+"fusionnés."
+
+# FIXME : améliorer la traduction de 'file limite'
+#: gitk:340
+#, fuzzy
+msgid ""
+"No files selected: --merge specified but no unmerged files are within file "
+"limit."
+msgstr ""
+"Aucun fichier sélectionné : --merge précisé mais aucun fichier non fusionné "
+"n'est dans la limite des fichiers."
+
+#: gitk:362 gitk:509
+msgid "Error executing git log:"
+msgstr "Erreur à l'exécution de git log :"
+
+#: gitk:380 gitk:525
+msgid "Reading"
+msgstr "Lecture en cours"
+
+#: gitk:440 gitk:4123
+msgid "Reading commits..."
+msgstr "Lecture des commits..."
+
+#: gitk:443 gitk:1561 gitk:4126
+msgid "No commits selected"
+msgstr "Aucun commit sélectionné"
+
+#: gitk:1437
+msgid "Can't parse git log output:"
+msgstr "Impossible de lire la sortie de git log :"
+
+#: gitk:1657
+msgid "No commit information available"
+msgstr "Aucune information disponible sur le commit"
+
+#: gitk:1793 gitk:1817 gitk:3916 gitk:8786 gitk:10322 gitk:10498
+msgid "OK"
+msgstr "OK"
+
+#: gitk:1819 gitk:3918 gitk:8383 gitk:8457 gitk:8567 gitk:8616 gitk:8788
+#: gitk:10323 gitk:10499
+msgid "Cancel"
+msgstr "Annuler"
+
+#: gitk:1919
+msgid "Update"
+msgstr "Mise à jour"
+
+#: gitk:1920
+msgid "Reload"
+msgstr "Recharger"
+
+#: gitk:1921
+msgid "Reread references"
+msgstr "Relire les références"
+
+#: gitk:1922
+msgid "List references"
+msgstr "Lister les références"
+
+#: gitk:1924
+msgid "Start git gui"
+msgstr "Démarrer git gui"
+
+#: gitk:1926
+msgid "Quit"
+msgstr "Quitter"
+
+#: gitk:1918
+msgid "File"
+msgstr "Fichier"
+
+#: gitk:1930
+msgid "Preferences"
+msgstr "Préférences"
+
+#: gitk:1929
+msgid "Edit"
+msgstr "Éditer"
+
+#: gitk:1934
+msgid "New view..."
+msgstr "Nouvelle vue..."
+
+#: gitk:1935
+msgid "Edit view..."
+msgstr "Éditer la vue..."
+
+#: gitk:1936
+msgid "Delete view"
+msgstr "Supprimer la vue"
+
+#: gitk:1938
+msgid "All files"
+msgstr "Tous les fichiers"
+
+#: gitk:1933 gitk:3670
+msgid "View"
+msgstr "Vue"
+
+#: gitk:1943 gitk:1953 gitk:2654
+msgid "About gitk"
+msgstr "À propos de gitk"
+
+#: gitk:1944 gitk:1958
+msgid "Key bindings"
+msgstr "Raccourcis clavier"
+
+#: gitk:1942 gitk:1957
+msgid "Help"
+msgstr "Aide"
+
+#: gitk:2018
+msgid "SHA1 ID: "
+msgstr "ID SHA1 :"
+
+#: gitk:2049
+msgid "Row"
+msgstr "Colonne"
+
+#: gitk:2080
+msgid "Find"
+msgstr "Recherche"
+
+#: gitk:2081
+msgid "next"
+msgstr "suivant"
+
+#: gitk:2082
+msgid "prev"
+msgstr "précédent"
+
+#: gitk:2083
+msgid "commit"
+msgstr "commit"
+
+#: gitk:2086 gitk:2088 gitk:4284 gitk:4307 gitk:4331 gitk:6272 gitk:6344
+#: gitk:6428
+msgid "containing:"
+msgstr "contient :"
+
+#: gitk:2089 gitk:3162 gitk:3167 gitk:4359
+msgid "touching paths:"
+msgstr "chemins modifiés :"
+
+#: gitk:2090 gitk:4364
+msgid "adding/removing string:"
+msgstr "ajoute/supprime la chaîne :"
+
+#: gitk:2099 gitk:2101
+msgid "Exact"
+msgstr "Exact"
+
+#: gitk:2101 gitk:4439 gitk:6240
+msgid "IgnCase"
+msgstr "Ignorer la casse"
+
+#: gitk:2101 gitk:4333 gitk:4437 gitk:6236
+msgid "Regexp"
+msgstr "Expression régulière"
+
+#: gitk:2103 gitk:2104 gitk:4458 gitk:4488 gitk:4495 gitk:6364 gitk:6432
+msgid "All fields"
+msgstr "Tous les champs"
+
+#: gitk:2104 gitk:4456 gitk:4488 gitk:6303
+msgid "Headline"
+msgstr "Surligner"
+
+#: gitk:2105 gitk:4456 gitk:6303 gitk:6432 gitk:6866
+msgid "Comments"
+msgstr "Commentaires"
+
+#: gitk:2105 gitk:4456 gitk:4460 gitk:4495 gitk:6303 gitk:6801 gitk:8063
+#: gitk:8078
+msgid "Author"
+msgstr "Auteur"
+
+#: gitk:2105 gitk:4456 gitk:6303 gitk:6803
+msgid "Committer"
+msgstr "Auteur du commit"
+
+#: gitk:2134
+msgid "Search"
+msgstr "Rechercher"
+
+#: gitk:2141
+msgid "Diff"
+msgstr "Diff"
+
+#: gitk:2143
+msgid "Old version"
+msgstr "Ancienne version"
+
+#: gitk:2145
+msgid "New version"
+msgstr "Nouvelle version"
+
+#: gitk:2147
+msgid "Lines of context"
+msgstr "Lignes de contexte"
+
+#: gitk:2157
+msgid "Ignore space change"
+msgstr "Ignorer les modifications d'espace"
+
+#: gitk:2215
+msgid "Patch"
+msgstr "Patch"
+
+#: gitk:2217
+msgid "Tree"
+msgstr "Arbre"
+
+#: gitk:2361 gitk:2378
+msgid "Diff this -> selected"
+msgstr "Diff entre ceci et la sélection"
+
+#: gitk:2362 gitk:2379
+msgid "Diff selected -> this"
+msgstr "Diff entre sélection et ceci"
+
+#: gitk:2363 gitk:2380
+msgid "Make patch"
+msgstr "Créer patch"
+
+#: gitk:2364 gitk:8441
+msgid "Create tag"
+msgstr "Créer tag"
+
+#: gitk:2365 gitk:8547
+msgid "Write commit to file"
+msgstr "Écrire le commit dans un fichier"
+
+#: gitk:2366 gitk:8604
+msgid "Create new branch"
+msgstr "Créer une nouvelle branche"
+
+#: gitk:2367
+msgid "Cherry-pick this commit"
+msgstr "Cueillir (cherry-pick) ce commit"
+
+#: gitk:2368
+msgid "Reset HEAD branch to here"
+msgstr "Réinitialiser la branche HEAD vers cet état"
+
+#: gitk:2369
+msgid "Mark this commit"
+msgstr "Marquer ce commit"
+
+#: gitk:2370
+msgid "Return to mark"
+msgstr "Retourner à la marque"
+
+#: gitk:2371
+msgid "Find descendant of this and mark"
+msgstr "Chercher le descendant de ceci et le marquer"
+
+#: gitk:2372
+msgid "Compare with marked commit"
+msgstr "Comparer avec le commit marqué"
+
+#: gitk:2386
+msgid "Check out this branch"
+msgstr "Récupérer cette branche"
+
+#: gitk:2387
+msgid "Remove this branch"
+msgstr "Supprimer cette branche"
+
+#: gitk:2394
+msgid "Highlight this too"
+msgstr "Surligner également ceci"
+
+#: gitk:2395
+msgid "Highlight this only"
+msgstr "Surligner seulement ceci"
+
+#: gitk:2396
+msgid "External diff"
+msgstr "Diff externe"
+
+#: gitk:2397
+msgid "Blame parent commit"
+msgstr "Blâmer le commit parent"
+
+#: gitk:2404
+msgid "Show origin of this line"
+msgstr "Montrer l'origine de cette ligne"
+
+#: gitk:2405
+msgid "Run git gui blame on this line"
+msgstr "Exécuter git gui blame sur cette ligne"
+
+#: gitk:2656
+msgid ""
+"\n"
+"Gitk - a commit viewer for git\n"
+"\n"
+"Copyright © 2005-2008 Paul Mackerras\n"
+"\n"
+"Use and redistribute under the terms of the GNU General Public License"
+msgstr ""
+"\n"
+"Gitk - visualisateur de commit pour git\n"
+"\n"
+"Copyright © 2005-2008 Paul Mackerras\n"
+"\n"
+"Utilisation et redistribution soumises aux termes de la GNU General Public "
+"License"
+
+#: gitk:2664 gitk:2726 gitk:8969
+msgid "Close"
+msgstr "Fermer"
+
+#: gitk:2683
+msgid "Gitk key bindings"
+msgstr "Raccourcis clavier de Gitk"
+
+#: gitk:2686
+msgid "Gitk key bindings:"
+msgstr "Raccourcis clavier de Gitk :"
+
+#: gitk:2688
+#, tcl-format
+msgid "<%s-Q>\t\tQuit"
+msgstr "<%s-Q>\t\tQuitter"
+
+#: gitk:2689
+msgid "<Home>\t\tMove to first commit"
+msgstr "<Début>\t\tAller au premier commit"
+
+#: gitk:2690
+msgid "<End>\t\tMove to last commit"
+msgstr "<Fin>\t\tAller au dernier commit"
+
+#: gitk:2691
+msgid "<Up>, p, i\tMove up one commit"
+msgstr "<Haut>, p, i\t Aller au commit suivant"
+
+#: gitk:2692
+msgid "<Down>, n, k\tMove down one commit"
+msgstr "<Bas>, n, k\t Aller au commit précédent"
+
+#: gitk:2693
+msgid "<Left>, z, j\tGo back in history list"
+msgstr "<Gauche>, z, j\tReculer dans l'historique"
+
+#: gitk:2694
+msgid "<Right>, x, l\tGo forward in history list"
+msgstr "<Droite>, x, l\tAvancer dans l'historique"
+
+#: gitk:2695
+msgid "<PageUp>\tMove up one page in commit list"
+msgstr "<PageUp>\tMonter d'une page dans la liste des commits"
+
+#: gitk:2696
+msgid "<PageDown>\tMove down one page in commit list"
+msgstr "<PageDown>\tDescendre d'une page dans la liste des commits"
+
+#: gitk:2697
+#, tcl-format
+msgid "<%s-Home>\tScroll to top of commit list"
+msgstr "<%s-Début>\tAller en haut de la liste des commits"
+
+#: gitk:2698
+#, tcl-format
+msgid "<%s-End>\tScroll to bottom of commit list"
+msgstr "<%s-End>\tAller en bas de la liste des commits"
+
+#: gitk:2699
+#, tcl-format
+msgid "<%s-Up>\tScroll commit list up one line"
+msgstr "<%s-Up>\tMonter d'une ligne dans la liste des commits"
+
+#: gitk:2700
+#, tcl-format
+msgid "<%s-Down>\tScroll commit list down one line"
+msgstr "<%s-Down>\tDescendre d'une ligne dans la liste des commits"
+
+#: gitk:2701
+#, tcl-format
+msgid "<%s-PageUp>\tScroll commit list up one page"
+msgstr "<%s-PageUp>\tMonter d'une page dans la liste des commits"
+
+#: gitk:2702
+#, tcl-format
+msgid "<%s-PageDown>\tScroll commit list down one page"
+msgstr "<%s-PageDown>\tDescendre d'une page dans la liste des commits"
+
+#: gitk:2703
+msgid "<Shift-Up>\tFind backwards (upwards, later commits)"
+msgstr ""
+"<Shift-Up>\tRecherche en arrière (vers l'avant, commits les plus anciens)"
+
+#: gitk:2704
+msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)"
+msgstr ""
+"<Shift-Down>\tRecherche en avant (vers l'arrière, commit les plus récents)"
+
+#: gitk:2705
+msgid "<Delete>, b\tScroll diff view up one page"
+msgstr "<Supprimer>, b\tMonter d'une page dans la vue des diff"
+
+#: gitk:2706
+msgid "<Backspace>\tScroll diff view up one page"
+msgstr "<Backspace>\tMonter d'une page dans la vue des diff"
+
+#: gitk:2707
+msgid "<Space>\t\tScroll diff view down one page"
+msgstr "<Espace>\t\tDescendre d'une page dans la vue des diff"
+
+#: gitk:2708
+msgid "u\t\tScroll diff view up 18 lines"
+msgstr "u\t\tMonter de 18 lignes dans la vue des diff"
+
+#: gitk:2709
+msgid "d\t\tScroll diff view down 18 lines"
+msgstr "d\t\tDescendre de 18 lignes dans la vue des diff"
+
+#: gitk:2710
+#, tcl-format
+msgid "<%s-F>\t\tFind"
+msgstr "<%s-F>\t\tRechercher"
+
+#: gitk:2711
+#, tcl-format
+msgid "<%s-G>\t\tMove to next find hit"
+msgstr "<%s-G>\t\tAller au résultat de recherche suivant"
+
+#: gitk:2712
+msgid "<Return>\tMove to next find hit"
+msgstr "<Return>\t\tAller au résultat de recherche suivant"
+
+#: gitk:2713
+msgid "/\t\tFocus the search box"
+msgstr "/\t\tFocus sur la zone de recherche"
+
+#: gitk:2714
+msgid "?\t\tMove to previous find hit"
+msgstr "?\t\tAller au résultat de recherche précédent"
+
+#: gitk:2715
+msgid "f\t\tScroll diff view to next file"
+msgstr "f\t\tAller au prochain fichier dans la vue des diff"
+
+#: gitk:2716
+#, tcl-format
+msgid "<%s-S>\t\tSearch for next hit in diff view"
+msgstr "<%s-S>\t\tAller au résultat suivant dans la vue des diff"
+
+#: gitk:2717
+#, tcl-format
+msgid "<%s-R>\t\tSearch for previous hit in diff view"
+msgstr "<%s-R>\t\tAller au résultat précédent dans la vue des diff"
+
+#: gitk:2718
+#, tcl-format
+msgid "<%s-KP+>\tIncrease font size"
+msgstr "<%s-KP+>\tAugmenter la taille de la police"
+
+#: gitk:2719
+#, tcl-format
+msgid "<%s-plus>\tIncrease font size"
+msgstr "<%s-plus>\tAugmenter la taille de la police"
+
+#: gitk:2720
+#, tcl-format
+msgid "<%s-KP->\tDecrease font size"
+msgstr "<%s-KP->\tDiminuer la taille de la police"
+
+#: gitk:2721
+#, tcl-format
+msgid "<%s-minus>\tDecrease font size"
+msgstr "<%s-minus>\tDiminuer la taille de la police"
+
+#: gitk:2722
+msgid "<F5>\t\tUpdate"
+msgstr "<F5>\t\tMise à jour"
+
+#: gitk:3177
+#, tcl-format
+msgid "Error getting \"%s\" from %s:"
+msgstr "Erreur en obtenant \"%s\" de %s:"
+
+#: gitk:3234 gitk:3243
+#, tcl-format
+msgid "Error creating temporary directory %s:"
+msgstr "Erreur lors de la création du répertoire temporaire %s :"
+
+#: gitk:3255
+msgid "command failed:"
+msgstr "échec de la commande :"
+
+#: gitk:3401
+msgid "No such commit"
+msgstr "Commit inexistant"
+
+#: gitk:3415
+msgid "git gui blame: command failed:"
+msgstr "git gui blame : échec de la commande :"
+
+#: gitk:3446
+#, tcl-format
+msgid "Couldn't read merge head: %s"
+msgstr "Impossible de lire le head de la fusion : %s"
+
+#: gitk:3454
+#, tcl-format
+msgid "Error reading index: %s"
+msgstr "Erreur à la lecture de l'index : %s"
+
+#: gitk:3479
+#, tcl-format
+msgid "Couldn't start git blame: %s"
+msgstr "Impossible de démarrer git blame : %s"
+
+#: gitk:3482 gitk:6271
+msgid "Searching"
+msgstr "Recherche en cours"
+
+#: gitk:3514
+#, tcl-format
+msgid "Error running git blame: %s"
+msgstr "Erreur à l'exécution de git blame : %s"
+
+#: gitk:3542
+#, tcl-format
+msgid "That line comes from commit %s,  which is not in this view"
+msgstr "Cette ligne est issue du commit %s, qui n'est pas dans cette vue"
+
+#: gitk:3556
+msgid "External diff viewer failed:"
+msgstr "Échec de l'outil externe de visualisation des diff"
+
+#: gitk:3674
+msgid "Gitk view definition"
+msgstr "Définition des vues de Gitk"
+
+#: gitk:3678
+msgid "Remember this view"
+msgstr "Se souvenir de cette vue"
+
+#: gitk:3679
+msgid "References (space separated list):"
+msgstr "Références (liste d'éléments séparés par des espaces) :"
+
+#: gitk:3680
+msgid "Branches & tags:"
+msgstr "Branches & tags :"
+
+#: gitk:3681
+msgid "All refs"
+msgstr "Toutes les références"
+
+#: gitk:3682
+msgid "All (local) branches"
+msgstr "Toutes les branches (locales)"
+
+#: gitk:3683
+msgid "All tags"
+msgstr "Tous les tags"
+
+#: gitk:3684
+msgid "All remote-tracking branches"
+msgstr "Toutes les branches de suivi à distance"
+
+#: gitk:3685
+msgid "Commit Info (regular expressions):"
+msgstr "Info sur les commits (expressions régulières) :"
+
+#: gitk:3686
+msgid "Author:"
+msgstr "Auteur :"
+
+#: gitk:3687
+msgid "Committer:"
+msgstr "Commiteur :"
+
+#: gitk:3688
+msgid "Commit Message:"
+msgstr "Message de commit :"
+
+#: gitk:3689
+msgid "Matches all Commit Info criteria"
+msgstr "Correspond à tous les critères d'Info sur les commits"
+
+#: gitk:3690
+msgid "Changes to Files:"
+msgstr "Changements des fichiers :"
+
+#: gitk:3691
+msgid "Fixed String"
+msgstr "Chaîne Figée"
+
+#: gitk:3692
+msgid "Regular Expression"
+msgstr "Expression Régulière"
+
+#: gitk:3693
+msgid "Search string:"
+msgstr "Recherche de la chaîne :"
+
+#: gitk:3694
+msgid ""
+"Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 "
+"15:27:38\"):"
+msgstr ""
+"Dates des commits (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, "
+"2009 15:27:38\") :"
+
+#: gitk:3695
+msgid "Since:"
+msgstr "De :"
+
+#: gitk:3696
+msgid "Until:"
+msgstr "Jusqu'au :"
+
+#: gitk:3697
+msgid "Limit and/or skip a number of revisions (positive integer):"
+msgstr "Limiter et/ou sauter un certain nombre (entier positif) de révisions :"
+
+#: gitk:3698
+msgid "Number to show:"
+msgstr "Nombre à afficher :"
+
+#: gitk:3699
+msgid "Number to skip:"
+msgstr "Nombre à sauter :"
+
+#: gitk:3700
+msgid "Miscellaneous options:"
+msgstr "Options diverses :"
+
+#: gitk:3701
+msgid "Strictly sort by date"
+msgstr "Trier par date"
+
+# FIXME : traduction de "branch sides"
+#: gitk:3702
+#, fuzzy
+msgid "Mark branch sides"
+msgstr "Marquer les extrémités des branches"
+
+#: gitk:3703
+msgid "Limit to first parent"
+msgstr "Limiter au premier ancêtre"
+
+#: gitk:3704
+msgid "Simple history"
+msgstr "Historique simple"
+
+#: gitk:3705
+msgid "Additional arguments to git log:"
+msgstr "Arguments supplémentaires de git log :"
+
+#: gitk:3706
+msgid "Enter files and directories to include, one per line:"
+msgstr "Saisir les fichiers et répertoires à inclure, un par ligne :"
+
+#: gitk:3707
+msgid "Command to generate more commits to include:"
+msgstr "Commande pour générer plus de commits à inclure :"
+
+#: gitk:3829
+msgid "Gitk: edit view"
+msgstr "Gitk : éditer la vue"
+
+#: gitk:3837
+msgid "-- criteria for selecting revisions"
+msgstr "-- critère pour la sélection des révisions"
+
+#: gitk:3842
+msgid "View Name:"
+msgstr "Nom de la vue :"
+
+#: gitk:3917
+msgid "Apply (F5)"
+msgstr "Appliquer (F5)"
+
+#: gitk:3955
+msgid "Error in commit selection arguments:"
+msgstr "Erreur dans les arguments de sélection des commits :"
+
+#: gitk:4008 gitk:4060 gitk:4508 gitk:4522 gitk:5783 gitk:11196 gitk:11197
+msgid "None"
+msgstr "Aucun"
+
+#: gitk:4456 gitk:6303 gitk:8065 gitk:8080
+msgid "Date"
+msgstr "Date"
+
+#: gitk:4456 gitk:6303
+msgid "CDate"
+msgstr "CDate"
+
+#: gitk:4605 gitk:4610
+msgid "Descendant"
+msgstr "Descendant"
+
+#: gitk:4606
+msgid "Not descendant"
+msgstr "Pas un descendant"
+
+#: gitk:4613 gitk:4618
+msgid "Ancestor"
+msgstr "Ancêtre"
+
+#: gitk:4614
+msgid "Not ancestor"
+msgstr "Pas un ancêtre"
+
+#: gitk:4904
+msgid "Local changes checked in to index but not committed"
+msgstr "Modifications locales enregistrées dans l'index mais non commitées"
+
+#: gitk:4940
+msgid "Local uncommitted changes, not checked in to index"
+msgstr "Modifications locales non enregistrées dans l'index et non commitées"
+
+#: gitk:6621
+msgid "many"
+msgstr "nombreux"
+
+#: gitk:6805
+msgid "Tags:"
+msgstr "Tags :"
+
+#: gitk:6822 gitk:6828 gitk:8058
+msgid "Parent"
+msgstr "Parent"
+
+#: gitk:6833
+msgid "Child"
+msgstr "Enfant"
+
+#: gitk:6842
+msgid "Branch"
+msgstr "Branche"
+
+#: gitk:6845
+msgid "Follows"
+msgstr "Suit"
+
+#: gitk:6848
+msgid "Precedes"
+msgstr "Précède"
+
+#: gitk:7346
+#, tcl-format
+msgid "Error getting diffs: %s"
+msgstr "Erreur lors de la récupération des diff : %s"
+
+#: gitk:7886
+msgid "Goto:"
+msgstr "Aller à :"
+
+#: gitk:7888
+msgid "SHA1 ID:"
+msgstr "Id SHA1 :"
+
+#: gitk:7907
+#, tcl-format
+msgid "Short SHA1 id %s is ambiguous"
+msgstr "Id SHA1 court %s est ambigu"
+
+#: gitk:7914
+#, tcl-format
+msgid "Revision %s is not known"
+msgstr "Id SHA1 %s est inconnu"
+
+#: gitk:7924
+#, tcl-format
+msgid "SHA1 id %s is not known"
+msgstr "Id SHA1 %s est inconnu"
+
+#: gitk:7926
+#, tcl-format
+msgid "Revision %s is not in the current view"
+msgstr "La révision %s n'est pas dans la vue courante"
+
+#: gitk:8068
+msgid "Children"
+msgstr "Enfants"
+
+#: gitk:8125
+#, tcl-format
+msgid "Reset %s branch to here"
+msgstr "Réinitialiser la branche %s vers cet état"
+
+#: gitk:8127
+msgid "Detached head: can't reset"
+msgstr "Head détaché : impossible de réinitialiser"
+
+#: gitk:8236 gitk:8242
+msgid "Skipping merge commit "
+msgstr "Éviter le commit de la fusion "
+
+#: gitk:8251 gitk:8256
+msgid "Error getting patch ID for "
+msgstr "Erreur à l'obtention de l'ID du patch pour "
+
+#: gitk:8252 gitk:8257
+msgid " - stopping\n"
+msgstr " - arrêt en cours\n"
+
+#: gitk:8262 gitk:8265 gitk:8273 gitk:8283 gitk:8292
+msgid "Commit "
+msgstr "Commit "
+
+#: gitk:8266
+msgid ""
+" is the same patch as\n"
+"       "
+msgstr ""
+"est le même patch que \n"
+"       "
+
+#: gitk:8274
+msgid ""
+" differs from\n"
+"       "
+msgstr ""
+" diffère de\n"
+"       "
+
+#: gitk:8276
+msgid "- stopping\n"
+msgstr "- arrêt en cours\n"
+
+#: gitk:8284 gitk:8293
+#, tcl-format
+msgid " has %s children - stopping\n"
+msgstr "a %s enfants - arrêt en cours\n"
+
+#: gitk:8324
+msgid "Top"
+msgstr "Haut"
+
+#: gitk:8325
+msgid "From"
+msgstr "De"
+
+#: gitk:8330
+msgid "To"
+msgstr "À"
+
+#: gitk:8354
+msgid "Generate patch"
+msgstr "Générer le patch"
+
+#: gitk:8356
+msgid "From:"
+msgstr "De :"
+
+#: gitk:8365
+msgid "To:"
+msgstr "À :"
+
+#: gitk:8374
+msgid "Reverse"
+msgstr "Inverser"
+
+#: gitk:8376 gitk:8561
+msgid "Output file:"
+msgstr "Fichier de sortie :"
+
+#: gitk:8382
+msgid "Generate"
+msgstr "Générer"
+
+#: gitk:8420
+msgid "Error creating patch:"
+msgstr "Erreur à la création du patch :"
+
+#: gitk:8443 gitk:8549 gitk:8606
+msgid "ID:"
+msgstr "ID :"
+
+#: gitk:8452
+msgid "Tag name:"
+msgstr "Nom du Tag :"
+
+#: gitk:8456 gitk:8615
+msgid "Create"
+msgstr "Créer"
+
+#: gitk:8473
+msgid "No tag name specified"
+msgstr "Aucun nom de tag spécifié"
+
+#: gitk:8477
+#, tcl-format
+msgid "Tag \"%s\" already exists"
+msgstr "Le tag \"%s\" existe déjà"
+
+#: gitk:8483
+msgid "Error creating tag:"
+msgstr "Erreur à la création du tag :"
+
+#: gitk:8558
+msgid "Command:"
+msgstr "Commande :"
+
+#: gitk:8566
+msgid "Write"
+msgstr "Écrire"
+
+#: gitk:8584
+msgid "Error writing commit:"
+msgstr "Erreur à l'ecriture du commit :"
+
+#: gitk:8611
+msgid "Name:"
+msgstr "Nom :"
+
+#: gitk:8634
+msgid "Please specify a name for the new branch"
+msgstr "Veuillez spécifier un nom pour la nouvelle branche"
+
+#: gitk:8639
+#, tcl-format
+msgid "Branch '%s' already exists. Overwrite?"
+msgstr "La branche '%s' existe déjà. Écraser?"
+
+#: gitk:8705
+#, tcl-format
+msgid "Commit %s is already included in branch %s -- really re-apply it?"
+msgstr ""
+"Le Commit %s est déjà inclus dans la branche %s -- le ré-appliquer malgré "
+"tout?"
+
+#: gitk:8710
+msgid "Cherry-picking"
+msgstr "Cueillir (Cherry-picking)"
+
+#: gitk:8719
+#, tcl-format
+msgid ""
+"Cherry-pick failed because of local changes to file '%s'.\n"
+"Please commit, reset or stash your changes and try again."
+msgstr ""
+"La cueillette (cherry-pick) a échouée à cause de modifications locales du "
+"fichier '%s'.\n"
+"Veuillez commiter, réinitialiser ou stasher vos changements et essayer de "
+"nouveau."
+
+#: gitk:8725
+msgid ""
+"Cherry-pick failed because of merge conflict.\n"
+"Do you wish to run git citool to resolve it?"
+msgstr ""
+"La cueillette (cherry-pick) a échouée à cause d'un conflit lors d'une "
+"fusion.\n"
+"Souhaitez-vous exécuter git citool pour le résoudre ?"
+
+#: gitk:8741
+msgid "No changes committed"
+msgstr "Aucun changement commité"
+
+#: gitk:8767
+msgid "Confirm reset"
+msgstr "Confirmer la réinitialisation"
+
+#: gitk:8769
+#, tcl-format
+msgid "Reset branch %s to %s?"
+msgstr "Réinitialiser la branche %s à %s?"
+
+#: gitk:8773
+msgid "Reset type:"
+msgstr "Type de réinitialisation :"
+
+#: gitk:8777
+msgid "Soft: Leave working tree and index untouched"
+msgstr "Douce : Laisse le répertoire de travail et l'index intacts"
+
+#: gitk:8780
+msgid "Mixed: Leave working tree untouched, reset index"
+msgstr ""
+"Hybride : Laisse le répertoire de travail dans son état courant, "
+"réinitialise l'index"
+
+#: gitk:8783
+msgid ""
+"Hard: Reset working tree and index\n"
+"(discard ALL local changes)"
+msgstr ""
+"Dure : Réinitialise le répertoire de travail et l'index\n"
+"(abandonne TOUS les changements locaux)"
+
+#: gitk:8800
+msgid "Resetting"
+msgstr "Réinitialisation"
+
+# Fixme: Récupération est-il vraiment une mauvaise traduction?
+#: gitk:8857
+#, fuzzy
+msgid "Checking out"
+msgstr "Récupération"
+
+#: gitk:8910
+msgid "Cannot delete the currently checked-out branch"
+msgstr "Impossible de supprimer la branche en cours"
+
+#: gitk:8916
+#, tcl-format
+msgid ""
+"The commits on branch %s aren't on any other branch.\n"
+"Really delete branch %s?"
+msgstr ""
+"Les commits de la branche %s ne sont dans aucune autre branche.\n"
+"Voulez-vous vraiment supprimer cette branche %s ?"
+
+#: gitk:8947
+#, tcl-format
+msgid "Tags and heads: %s"
+msgstr "Tags et heads : %s"
+
+#: gitk:8962
+msgid "Filter"
+msgstr "Filtrer"
+
+#: gitk:9257
+msgid ""
+"Error reading commit topology information; branch and preceding/following "
+"tag information will be incomplete."
+msgstr ""
+"Erreur à la lecture des informations sur la topologie des commits, les "
+"informations sur les branches et les tags précédents/suivants seront "
+"incomplètes."
+
+#: gitk:10243
+msgid "Tag"
+msgstr "Tag"
+
+#: gitk:10243
+msgid "Id"
+msgstr "Id"
+
+#: gitk:10291
+msgid "Gitk font chooser"
+msgstr "Sélecteur de police de Gitk"
+
+#: gitk:10308
+msgid "B"
+msgstr "B"
+
+#: gitk:10311
+msgid "I"
+msgstr "I"
+
+#: gitk:10407
+msgid "Gitk preferences"
+msgstr "Préférences de Gitk"
+
+#: gitk:10409
+msgid "Commit list display options"
+msgstr "Options d'affichage de la liste des commits"
+
+#: gitk:10412
+msgid "Maximum graph width (lines)"
+msgstr "Longueur maximum du graphe (lignes)"
+
+# FIXME : Traduction standard de "pane"?
+#: gitk:10416
+#, fuzzy, tcl-format
+msgid "Maximum graph width (% of pane)"
+msgstr "Longueur maximum du graphe (% du panneau)"
+
+#: gitk:10420
+msgid "Show local changes"
+msgstr "Montrer les changements locaux"
+
+#: gitk:10423
+msgid "Auto-select SHA1"
+msgstr "Sélection auto. du SHA1"
+
+#: gitk:10427
+msgid "Diff display options"
+msgstr "Options d'affichage des diff"
+
+#: gitk:10429
+msgid "Tab spacing"
+msgstr "Taille des tabulations"
+
+#: gitk:10432
+msgid "Display nearby tags"
+msgstr "Afficher les tags les plus proches"
+
+#: gitk:10435
+msgid "Hide remote refs"
+msgstr "Cacher les refs distantes"
+
+#: gitk:10438
+msgid "Limit diffs to listed paths"
+msgstr "Limiter les différences aux chemins listés"
+
+#: gitk:10441
+msgid "Support per-file encodings"
+msgstr "Support pour un encodage des caractères par fichier"
+
+#: gitk:10447 gitk:10512
+msgid "External diff tool"
+msgstr "Outil diff externe"
+
+#: gitk:10449
+msgid "Choose..."
+msgstr "Choisir..."
+
+#: gitk:10454
+msgid "Colors: press to choose"
+msgstr "Couleurs : cliquer pour choisir"
+
+#: gitk:10457
+msgid "Background"
+msgstr "Arrière-plan"
+
+#: gitk:10458 gitk:10488
+msgid "background"
+msgstr "arrière-plan"
+
+#: gitk:10461
+msgid "Foreground"
+msgstr "Premier plan"
+
+#: gitk:10462
+msgid "foreground"
+msgstr "premier plan"
+
+#: gitk:10465
+msgid "Diff: old lines"
+msgstr "Diff : anciennes lignes"
+
+#: gitk:10466
+msgid "diff old lines"
+msgstr "diff anciennes lignes"
+
+#: gitk:10470
+msgid "Diff: new lines"
+msgstr "Diff : nouvelles lignes"
+
+#: gitk:10471
+msgid "diff new lines"
+msgstr "diff nouvelles lignes"
+
+#: gitk:10475
+msgid "Diff: hunk header"
+msgstr "Diff : entête du hunk"
+
+#: gitk:10477
+msgid "diff hunk header"
+msgstr "diff : entête du hunk"
+
+#: gitk:10481
+msgid "Marked line bg"
+msgstr "Arrière-plan de la ligne marquée"
+
+#: gitk:10483
+msgid "marked line background"
+msgstr "Arrière-plan de la ligne marquée"
+
+#: gitk:10487
+msgid "Select bg"
+msgstr "Sélectionner l'arrière-plan"
+
+#: gitk:10491
+msgid "Fonts: press to choose"
+msgstr "Polices : cliquer pour choisir"
+
+#: gitk:10493
+msgid "Main font"
+msgstr "Police principale"
+
+#: gitk:10494
+msgid "Diff display font"
+msgstr "Police d'affichage des diff"
+
+#: gitk:10495
+msgid "User interface font"
+msgstr "Police de l'interface utilisateur"
+
+#: gitk:10522
+#, tcl-format
+msgid "Gitk: choose color for %s"
+msgstr "Gitk : choisir la couleur de %s"
+
+#: gitk:10973
+msgid ""
+"Sorry, gitk cannot run with this version of Tcl/Tk.\n"
+" Gitk requires at least Tcl/Tk 8.4."
+msgstr ""
+"Désolé, gitk ne peut être exécuté avec cette version de Tcl/Tk.\n"
+" Gitk requiert Tcl/Tk version 8.4 ou supérieur."
+
+#: gitk:11101
+msgid "Cannot find a git repository here."
+msgstr "Impossible de trouver un dépôt git ici."
+
+#: gitk:11105
+#, tcl-format
+msgid "Cannot find the git directory \"%s\"."
+msgstr "Impossible de trouver le répertoire git \"%s\"."
+
+#: gitk:11152
+#, tcl-format
+msgid "Ambiguous argument '%s': both revision and filename"
+msgstr "Argument '%s' ambigu : à la fois une révision et un nom de fichier"
+
+#: gitk:11164
+msgid "Bad arguments to gitk:"
+msgstr "Arguments invalides pour gitk :"
+
+#: gitk:11249
+msgid "Command line"
+msgstr "Ligne de commande"

^ permalink raw reply related

* Re: [PATCHv3 3/4 (resent)] gitweb: Optionally add "git" links in project list page
From: Jakub Narebski @ 2010-01-12 13:05 UTC (permalink / raw)
  To: J.H.; +Cc: git, John 'Warthog9' Hawley
In-Reply-To: <4B4BC4CB.2030409@eaglescrag.net>

On Tue, 12 Jan 2010, J.H. wrote:
> On 01/09/2010 03:20 AM, Jakub Narebski wrote:
>> On Sat, 9 Jan 2010, J.H. wrote:

>>> I have given some initial thought to converting the $output options I'm
>>> currently using to a print <FH> that Jakub is suggesting & exploring.
>> 
>> It's 'print {$fh}', i.e. use indirect filehandle, not global filehandle.
>> 
>>> I think all told it's going to be a similarly sized patch, since all
>>> output still has to get adjusted (including the things that directly
>>> output but don't print).  
>> 
>> print -> print {$fh} can be separate patch, and it can be checked that
>> it produces the same results.  Well print -> $output .= could also be
>> separate patch...
>> 
>>> I'm unsure if there's a real advantage to 
>>> either way, other than design preference. My patch (forcing the output
>>> to get passed around) moves towards more of a modal style design
>>> separating data & layout vs. it's combined nature now, well it's a step
>>> in that direction anyway.
>> 
>> Errr... what?  Forcing buffering (you need to read whole output into
>> memory, including for snapshots (uncompressed in case of .tar.gz))
>> is IMVHO orthogonal to the issue of separating data & layout.
>> BTW. Modern web server interfaces like Rack, PSGI/Plack etc. explicitly
>> include streaming support.
> 
> The inbuilt streaming support does change things, and I don't think it
> ultimately changes my caching engine really anyway - I should have that
> change done shortly.

It doesn't change caching engine much, especially if you encapsulate this
detail in the caching engine.  With 'print {$fh}' (and in a few places
'printf {$fh}' (!)) you can just do something like:

  $fh = $cache_fh;
  $actions{$action}->();
  show_cached($fh);


About 'should have that change done shortly': I am working now, time 
permitting, on splitting your caching patch in smaller parts, wrapping
it a bit differently (and hopefully more clear).

>> The advantage of doing 'print {$fh}' is that $fh can be \*STDOUT, can
>> be \$buffer, but can be filehandle to (temporary) file on disk, and
>> you can even "tee" it, i.e. both write to memory/file, and to STDOUT.
>> The number of possible choices / possible improvements is much larger.
>> 
>> And what is also important it means that people who do not use caching
>> do not suffer latency penalty and memory pressure from caching 
>> infrastructure they do not use.

-- 
Jakub Narebski
Poland

^ permalink raw reply

* Re: [PATCH] hg-to-git: fix COMMITTER type-o
From: Stelian Pop @ 2010-01-12 11:16 UTC (permalink / raw)
  To: Bart Trojanowski; +Cc: git
In-Reply-To: <1262998479-24269-1-git-send-email-bart@jukie.net>

Hi Bart,

On Fri, Jan 08, 2010 at 07:54:39PM -0500, Bart Trojanowski wrote:

> This script passes the author and committer to git-commit via environment
> variables, but it was missing the seccond T of COMMITTER in a few places.
> 
> Signed-off-by: Bart Trojanowski <bart@jukie.net>

FWIW:
	Acked-by: Stelian Pop <stelian@popies.net>

Thanks!

Stelian.
-- 
Stelian Pop <stelian@popies.net>

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox