Re: [PATCH] rebase -i: fixup fixup! fixup!

2013-06-14 Thread Andrew Pimlott
Excerpts from Andrew Pimlott's message of Fri Jun 14 12:31:57 -0700 2013: > It happened to work and I added a test. But then it occurred to me that > it might have been better to fix commit --fixup/--squash to strip the > fixup! or squash! from the referenced commit in the first place. > Anyhow, b

Re: Is there a way to cherry-pick a merge?

2013-06-14 Thread George Spelvin
> In the meantime, "git commit --amend -C commit" would be a > workaround, I would guess. Ah! A useful feature I was not familiar with. Definitely helps a great deal. Thank you! -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.or

Re: [PATCH 5/6] status: do not depend on flaky reflog messages

2013-06-14 Thread Junio C Hamano
Junio C Hamano writes: > I have been assuming the "main" thing Duy wanted to do was the last > test (and the one below), but was this meant as an improvement for > "git status" output during that state? Showing $ONTO certainly > makes some sense, and from that point of view, the change we are >

Re: [PATCH 5/6] status: do not depend on flaky reflog messages

2013-06-14 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Since you have made it clear that you will defend every bit of b397ea You are misreading me. I am not defending every bit at all. We both agree that what b397ea4863a1 (status: show more info than "currently not on any branch", 2013-03-13) expects from "git status

Re: [PATCH 0/2] recover from "failed to apply delta"

2013-06-14 Thread Junio C Hamano
Jeff King writes: >> + # At the beginning of the REF_DELTA representation of $blob_3, >> + # write 20-byte base object name for $blob_1, instead of $blob_2. >> + # The binary representation of object name for $blob_1 is found >> + # at offset 4 + 4 + 256*4 = 1032 for 20 bytes. >>

Re: [PATCH 2/2] unpack_entry: do not die when we fail to apply a delta

2013-06-14 Thread Jeff King
On Fri, Jun 14, 2013 at 02:59:00PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > test_expect_success \ > > +'corruption of delta base reference pointing to wrong object' \ > > +'create_new_pack --delta-base-offset && > > + git prune-packed && > > + printf "\220\033" | d

Re: [PATCH 5/6] status: do not depend on flaky reflog messages

2013-06-14 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Junio C Hamano wrote: >> If you first update "git checkout" so that it will pay attention to >> a custom reflog-action exported by Porcelain scripts that may want >> to internally use it to flip branches (and without a custom one, it >> will still record "checkout:

Re: Teams of people using signed commits...

2013-06-14 Thread Fredrik Gustafsson
On Fri, Jun 14, 2013 at 12:02:01PM -0700, Eric Fleischman wrote: > We think we know how to deal with signed commits & auto-reject such > commits at build time, as well as clean up. But we're worried that > folks won't sign on the way in accidentally. We don't know of a good > way to force the team

Re: [PATCH 2/2] unpack_entry: do not die when we fail to apply a delta

2013-06-14 Thread Junio C Hamano
Jeff King writes: > test_expect_success \ > +'corruption of delta base reference pointing to wrong object' \ > +'create_new_pack --delta-base-offset && > + git prune-packed && > + printf "\220\033" | do_corrupt_object $blob_3 2 && Interesting. You cheated in a different way wit

Re: [RFH/PATCH 0/4] git http tests with apache 2.4

2013-06-14 Thread Jeff King
On Fri, Jun 14, 2013 at 10:32:57AM -0700, Junio C Hamano wrote: > > However, the final patch is very unsatisfactory. We have to pick an MPM > > module to mention in the config, but we don't have any idea what's > > available. I suspect what I have provided will work on most Unix-ish > > systems. U

Re: [PATCH 0/2] recover from "failed to apply delta"

2013-06-14 Thread Jeff King
On Fri, Jun 14, 2013 at 02:51:35PM -0700, Junio C Hamano wrote: > > Here is a re-roll; the first patch is a small cleanup in t5303 that is > > required for the new tests to work. > > Heh, I was doing the same, but I cheated ;-) > > diff --git a/t/t5303-pack-corruption-resilience.sh > b/t/t5303-

Re: Is there a way to cherry-pick a merge?

2013-06-14 Thread Junio C Hamano
"George Spelvin" writes: > "George Spelvin" writes: >>> Sometimes I'd like to repeat a previously performed merge, preserving >>> the commit message. And, if possible, the conflict resolutions. >> >> Is it "git merge commit^2"? > > I suppose that was an obvious one to leave out of my alternati

[PATCH 2/2] unpack_entry: do not die when we fail to apply a delta

2013-06-14 Thread Jeff King
When we try to load an object from disk and fail, our general strategy is to see if we can get it from somewhere else (e.g., a loose object). That lets users fix corruption problems by copying known-good versions of objects into the object database. We already handle the case where we were not abl

[PATCH 1/2] t5303: drop "count=1" from corruption dd

2013-06-14 Thread Jeff King
This test corrupts pack objects by using "dd" with a seek command. It passes "count=1 bs=1" to munge just a single byte. However, the test added in commit b3118bdc wants to munge two bytes, and the second byte of corruption is silently ignored. This turned out not to impact the test, however. The

Re: [PATCH 0/2] recover from "failed to apply delta"

2013-06-14 Thread Junio C Hamano
Jeff King writes: > On Thu, Jun 13, 2013 at 08:05:21PM -0400, Nicolas Pitre wrote: > >> > We already handle the case where we were not able to read >> > the delta from disk. However, when we find that the delta we >> > read does not apply, we simply die. This case is harder to >> > trigger, as c

[PATCH 0/2] recover from "failed to apply delta"

2013-06-14 Thread Jeff King
On Thu, Jun 13, 2013 at 08:05:21PM -0400, Nicolas Pitre wrote: > > We already handle the case where we were not able to read > > the delta from disk. However, when we find that the delta we > > read does not apply, we simply die. This case is harder to > > trigger, as corruption in the delta data

Re: [PATCH 5/6] status: do not depend on flaky reflog messages

2013-06-14 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > If you first update "git checkout" so that it will pay attention to > a custom reflog-action exported by Porcelain scripts that may want > to internally use it to flip branches (and without a custom one, it > will still record "checkout: moving from A to B"), without exporti

Re: Is there a way to cherry-pick a merge?

2013-06-14 Thread George Spelvin
"George Spelvin" writes: >> Sometimes I'd like to repeat a previously performed merge, preserving >> the commit message. And, if possible, the conflict resolutions. > > Is it "git merge commit^2"? I suppose that was an obvious one to leave out of my alternatives list. This is what I've been do

Re: Is there a way to cherry-pick a merge?

2013-06-14 Thread Junio C Hamano
"George Spelvin" writes: > Sometimes I'd like to repeat a previously performed merge, preserving > the commit message. And, if possible, the conflict resolutions. Is it "git merge commit^2"? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@

Is there a way to cherry-pick a merge?

2013-06-14 Thread George Spelvin
Sometimes I'd like to repeat a previously performed merge, preserving the commit message. And, if possible, the conflict resolutions. "git cherry-pick -m 1 " gets me the changes, but makes an ordinary single-parent commit, not a merge. "git rebase -p --onto HEAD commit^ commit" does the right th

[PATCH] rebase -i: fixup fixup! fixup!

2013-06-14 Thread Andrew Pimlott
Excerpts from Thomas Rast's message of Tue Jun 11 11:50:07 -0700 2013: > Andrew Pimlott writes: > > git commit -m 'fix nasty bug' > > ... > > git commit --fixup :/nasty > > ... > > git commit --fixup :/nasty > > > > The second :/nasty resolves to the previous fixup, not the ini

Re: Teams of people using signed commits...

2013-06-14 Thread Magnus Bäck
On Friday, June 14, 2013 at 15:02 EDT, Eric Fleischman wrote: > We're very interested in using signed commits but are struggling to > figure out how to use it in the real world. Would love some advice > from those who know more. What do you expect to gain from using signed commits? I'm not

Teams of people using signed commits...

2013-06-14 Thread Eric Fleischman
We're very interested in using signed commits but are struggling to figure out how to use it in the real world. Would love some advice from those who know more. We think we know how to deal with signed commits & auto-reject such commits at build time, as well as clean up. But we're worried that fo

Re: [PATCH 1/2] am: handle stray $dotest directory

2013-06-14 Thread Junio C Hamano
Junio C Hamano writes: > Ramkumar Ramachandra writes: > >> Junio C Hamano wrote: >>> And then the message triggers at the second test in t3420 when >>> applied on top of 587947750bd7 (rebase: implement --[no-]autostash >>> and rebase.autostash, 2013-05-12) or 45acb7592825 (Merge branch >>> 'rr/r

Re: [[PATCH v3] 1/2] [submodule] handle multibyte characters in name

2013-06-14 Thread Junio C Hamano
Fredrik Gustafsson writes: > On Fri, Jun 14, 2013 at 10:23:52AM -0700, Junio C Hamano wrote: >> Fredrik Gustafsson writes: >> >> > ... The >> > correct approach to solve the problem for all pathnames may be to use >> > "ls-files -z" and tell the Perl script that reads its output to read NUL >>

Re: [PATCH 1/2] pull: respect rebase.autostash

2013-06-14 Thread Junio C Hamano
Matthieu Moy writes: > Ramkumar Ramachandra writes: > >> --- a/git-pull.sh >> +++ b/git-pull.sh >> @@ -44,6 +44,7 @@ merge_args= edit= >> curr_branch=$(git symbolic-ref -q HEAD) >> curr_branch_short="${curr_branch#refs/heads/}" >> rebase=$(git config --bool branch.$curr_branch_short.rebase) >

Re: [[PATCH v3] 1/2] [submodule] handle multibyte characters in name

2013-06-14 Thread Fredrik Gustafsson
On Fri, Jun 14, 2013 at 10:23:52AM -0700, Junio C Hamano wrote: > Fredrik Gustafsson writes: > > > ... The > > correct approach to solve the problem for all pathnames may be to use > > "ls-files -z" and tell the Perl script that reads its output to read NUL > > separated records by using $/ = "\0

Re: [PATCH v2] prompt: squelch error output from cat

2013-06-14 Thread Junio C Hamano
Will queue. Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH V2] git-remote-mediawiki: remove hardcoded version number in the test suite

2013-06-14 Thread Junio C Hamano
benoit.per...@ensimag.fr writes: > From: Benoit Person > > Updates the code to make it more easy to switch mediawiki version when > testing. Before that, the version number was partly hardcoded, partly > in a var. This definitely goes in a good direction; you no longer have to touch random lines

Re: [PATCH v2] git-gui: bring Wish process to front on Mac

2013-06-14 Thread Junio C Hamano
Stefan Haller writes: > On Mac OS X, any application that is started from the Terminal will open > behind all running applications; as a work-around, manually bring ourselves > to the front. (Stolen from gitk, commit 76bf6ff93e.) > > We do this as the very first thing, so that any message boxes t

Re: [PATCH] . git.el: use commit.template if available

2013-06-14 Thread Junio C Hamano
Curt Brune writes: > If the user's git config defines commit.template then include the > contents of that file in the log buffer by default. > > In git-setup-log-buffer, instead of supplying the default commit > message insert the user's commit.template. > > Signed-off-by: Curt Brune > --- Inte

Re: [RFH/PATCH 0/4] git http tests with apache 2.4

2013-06-14 Thread Junio C Hamano
Jeff King writes: > Apache 2.4 recently shipped in Debian unstable, and I noticed that all > of the git httpd tests stopped working. It turns out that some > configuration directives have changed between 2.2 and 2.4, and the httpd > server would not start at all. > > With this series, the tests r

[PATCH] . git.el: use commit.template if available

2013-06-14 Thread Curt Brune
If the user's git config defines commit.template then include the contents of that file in the log buffer by default. In git-setup-log-buffer, instead of supplying the default commit message insert the user's commit.template. Signed-off-by: Curt Brune --- contrib/emacs/git.el | 47 ++

Re: [[PATCH v3] 1/2] [submodule] handle multibyte characters in name

2013-06-14 Thread Junio C Hamano
Fredrik Gustafsson writes: > ... The > correct approach to solve the problem for all pathnames may be to use > "ls-files -z" and tell the Perl script that reads its output to read NUL > separated records by using $/ = "\0". I've tentatively queued the attached without 2/2; the scriptlet is small

Re: [PATCH 1/2] am: handle stray $dotest directory

2013-06-14 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Junio C Hamano wrote: >> The reason would become clear once you think what string you are >> feeding eval_gettext with if you do not escape. The translators >> translate a fixed string (possibly with placeholders) to a fixed >> translated string (possibly with plac

Re: [PATCH 1/2] am: handle stray $dotest directory

2013-06-14 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Junio C Hamano wrote: >> And then the message triggers at the second test in t3420 when >> applied on top of 587947750bd7 (rebase: implement --[no-]autostash >> and rebase.autostash, 2013-05-12) or 45acb7592825 (Merge branch >> 'rr/rebase-autostash', 2013-06-11). >

Re: [PATCH 3/3] rebase: use peel_committish() where appropriate

2013-06-14 Thread Junio C Hamano
Ramkumar Ramachandra writes: > The revisions specified on the command-line as and > arguments could be of the form :/quuxery; so, use peel_committish() to > resolve them. The failing tests in t/rebase and t/rebase-interactive > now pass. You can also specify the commit at the end of the histo

Re: [PATCH 2/3] sh-setup: add new peel_committish() helper

2013-06-14 Thread Philip Oakley
From: "Ramkumar Ramachandra" Sent: Friday, June 14, 2013 5:18 PM Philip Oakley wrote: Is there a proper name for this style of revision specification? I've been letting this 'style' wash over me in the hope that I'd understand eventually, but it hasn't. See gitrevisions(7). None of them hav

Re: [PATCH 5/6] status: do not depend on flaky reflog messages

2013-06-14 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Junio C Hamano wrote: >> As I said (twice), you can argue that that particular piece of >> information is not useful (at least to you), but why it is not >> useful has to be justified, against the justification given by >> b397ea4863a1 (status: show more info than "

Difficulty adding a symbolic link

2013-06-14 Thread Dale R. Worley
I'm having a problem with "git add" in version 1.7.7.6. The situation is that I have a repository that is contained in a second-level directory, a sub-sub-directory of "/". The core.worktree of the repository is "/", so the working directory is the entire file tree. I want this repository to tra

Re: [PATCH 2/3] sh-setup: add new peel_committish() helper

2013-06-14 Thread Ramkumar Ramachandra
Philip Oakley wrote: > Is there a proper name for this style of revision specification? I've been > letting this 'style' wash over me in the hope that I'd understand > eventually, but it hasn't. See gitrevisions(7). None of them have any names. > Loking at git-rev-parse I now see that it might b

Re: [PATCH 1/2] am: handle stray $dotest directory

2013-06-14 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > The reason would become clear once you think what string you are > feeding eval_gettext with if you do not escape. The translators > translate a fixed string (possibly with placeholders) to a fixed > translated string (possibly with placeholders). > > eval_gettext "

Re: [PATCH 1/2] am: handle stray $dotest directory

2013-06-14 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > And then the message triggers at the second test in t3420 when > applied on top of 587947750bd7 (rebase: implement --[no-]autostash > and rebase.autostash, 2013-05-12) or 45acb7592825 (Merge branch > 'rr/rebase-autostash', 2013-06-11). What was triggered? (I didn't underst

Re: [PATCH 2/3] sh-setup: add new peel_committish() helper

2013-06-14 Thread Philip Oakley
From: "Ramkumar Ramachandra" Sent: Friday, June 14, 2013 2:17 PM The normal way to check whether a certain revision resolves to a valid commit is: $ git rev-parse --verify $REV^0 Unfortunately, this does not work when $REV is of the type :/quuxery. Is there a proper name for this style of r

Re: [PATCH v6 00/31] git-remote-mediawiki: Follow perlcritic's recommandations

2013-06-14 Thread Junio C Hamano
Célestin Matte writes: > Célestin Matte (31): > git-remote-mediawiki: Make a regexp clearer > git-remote-mediawiki: Move "use warnings;" before any instruction > git-remote-mediawiki: Replace :utf8 by :encoding(UTF-8) > git-remote-mediawiki: Always end a subroutine with a return > git-r

[[PATCH v3] 1/2] [submodule] handle multibyte characters in name

2013-06-14 Thread Fredrik Gustafsson
Many "git submodule" operations do not work on a submodule at a path whose name is not in ASCII. This is because "git ls-files" is used to find which paths are bound to submodules to the current working tree, and the output is C-quoted by default for non ASCII pathnames and pathnames that has a do

[[PATCH v3] 0/2] module_list enhancements

2013-06-14 Thread Fredrik Gustafsson
Reworded commit message for [submodule] handle multibyte characters in name as suggested by Junio. Previous iteration can be found here: http://thread.gmane.org/gmane.comp.version-control.git/227786/ Fredrik Gustafsson (2): [submodule] handle multibyte characters in name [submodule] Replace p

[[PATCH v3] 2/2] [submodule] Replace perl-code with sh

2013-06-14 Thread Fredrik Gustafsson
This will prevent a fork and makes the code similair to the rest of the file. In the long term git-submodule.sh needs to use something else than sh to handle newline in filenames (and therefore needs to use a language that accepts \0 in strings). However I don't think that keeping that small perl-

Re: [PATCH 1/2] am: handle stray $dotest directory

2013-06-14 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Junio C Hamano wrote: >> $dotest, or \$dotest? > > Works fine for me like this. Why do we escape the dollar in the other > strings? The reason would become clear once you think what string you are feeding eval_gettext with if you do not escape. The translators t

Re: [PATCH 1/2] am: handle stray $dotest directory

2013-06-14 Thread Junio C Hamano
Junio C Hamano writes: >> +# Possible stray $dotest directory >> +if test -d "$dotest"; then >> +case "$skip,$resolved,$abort" in >> +,,t) >> +rm -fr "$dotest" >> +exit 0 >> +;; >> +*) >> +

Re: [PATCH v2 0/5] Write a good 'git stash store' for autostash

2013-06-14 Thread Ramkumar Ramachandra
Junio C Hamano wrote: >> git stash store [-m ] [-e ] > > I am perplexed; that would not something I _would_ design or > suggest. The "-e " looks especially odd, in that "-e" > usually refers to something the command evaluates (e.g. sed, perl), > but more importantly if the caller wants a custom

Re: [PATCH 1/2] am: handle stray $dotest directory

2013-06-14 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > $dotest, or \$dotest? Works fine for me like this. Why do we escape the dollar in the other strings? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/major

Re: [PATCH 1/5] stash doc: add a warning about using create

2013-06-14 Thread Junio C Hamano
Phil Hord writes: >> DESCRIPTION >> --- >> @@ -151,6 +151,7 @@ create:: >> >> Create a stash (which is a regular commit object) and return its >> object name, without storing it anywhere in the ref namespace. >> + This is probably not what you want to use; see "sav

Re: [PATCH 1/2] am: handle stray $dotest directory

2013-06-14 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > These two case arms are indented one level too deep (will locally > touch up). Thanks. Can you tell me how to get shell-script-mode to indent the case statement properly? (I used the default indentation) -- To unsubscribe from this list: send the line "unsubscribe git" in

Re: [PATCH 1/2] am: handle stray $dotest directory

2013-06-14 Thread Junio C Hamano
Ramkumar Ramachandra writes: > + die "$(eval_gettext "Stray $dotest directory found. > +Use \"git am --abort\" to remove it.")" $dotest, or \$dotest? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More m

Re: [PATCH 5/6] status: do not depend on flaky reflog messages

2013-06-14 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > As I said (twice), you can argue that that particular piece of > information is not useful (at least to you), but why it is not > useful has to be justified, against the justification given by > b397ea4863a1 (status: show more info than "currently not on any > branch", 2013-

Re: [PATCH 1/2] am: handle stray $dotest directory

2013-06-14 Thread Junio C Hamano
Ramkumar Ramachandra writes: > The following bug has been observed: > > $ git am # no input file > ^C > $ git am --abort > Resolve operation not in progress, we are not resuming. > > This happens because the following test fails: > > test -d "$dotest" && test -f "$dotest/last" && test

Re: [PATCH v2 1/2] [submodule] handle multibyte characters in name

2013-06-14 Thread Junio C Hamano
Fredrik Gustafsson writes: > Many "git submodule" operations do not work on a submodule at a path whose > name is not in ASCII. Thanks. A suggestion to add some more explanation to the log message follows. > This is because "git ls-files" is used to find which paths are bound to > submodules t

Re: [PATCH] unpack_entry: do not die when we fail to apply a delta

2013-06-14 Thread Junio C Hamano
Makes sense. Thanks, will queue. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 5/6] status: do not depend on flaky reflog messages

2013-06-14 Thread Junio C Hamano
Ramkumar Ramachandra writes: > In this example, it is inconsequential whether I run: > > $ git checkout v1.8.2^ > > or: > > $ git checkout v1.8.2 > $ git reset --hard @^ > > as far as describe is concerned. It will give me the same good > consistent answer in either case. Yes, "describe H

Re: [PATCH v2 0/5] Write a good 'git stash store' for autostash

2013-06-14 Thread Junio C Hamano
Ramkumar Ramachandra writes: > So, I've taken Junio's suggestion and designed a proper command-line > interface for 'git stash store' in this iteration: > > git stash store [-m ] [-e ] I am perplexed; that would not something I _would_ design or suggest. The "-e " looks especially odd, in th

Re: [PATCH 5/6] status: do not depend on flaky reflog messages

2013-06-14 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > The part you stripped from your quote looked like this: Apologies for the lack of clarity. >>> You were at 1.8.2 but no longer are, so in the following sequence: >>> >>> $ git checkout v1.8.2 >>> $ git status >>> $ git reset --hard HEAD^ >>> $ git status >>

Re: [PATCH] prompt: squelch error output from cat

2013-06-14 Thread SZEDER Gábor
On Thu, Jun 13, 2013 at 08:15:59PM +0530, Ramkumar Ramachandra wrote: > SZEDER Gábor wrote: > > Just curious: when do those files don't exist? When using an older > > version of git with a newer prompt, obviously, but are there other > > cases? > > # On terminal one > $ git rebase --interacti

Re: [PATCH] format-patch: remove existing output-directory

2013-06-14 Thread Junio C Hamano
John Keeping writes: > On Fri, Jun 14, 2013 at 06:45:19PM +0530, Ramkumar Ramachandra wrote: >> John Keeping wrote: >> > I don't think this is the correct behaviour. I can think of cases where >> > I would want to output multiple things into the same directory. >> >> format.cleanOutputDirectory

Re: [PATCH] format-patch: remove existing output-directory

2013-06-14 Thread Ramkumar Ramachandra
Fredrik Gustafsson wrote: > git format-patch always creates a new directory like: > .git/outgoing/[patchname]... > and possible runs a custom command afterwards. Like cd to the patch > directory, open the cover-letter in your editor etc. > > git send-email without patches specified gives you a list

Re: [PATCH] format-patch: remove existing output-directory

2013-06-14 Thread Junio C Hamano
John Keeping writes: > On Fri, Jun 14, 2013 at 06:13:33PM +0530, Ramkumar Ramachandra wrote: >> The following command >> >> $ git format-patch -o outgoing master >> >> does not ensure that the output-directory outgoing doesn't already >> exist. As a result, it's possible for patches from two

Re: [PATCH] format-patch: remove existing output-directory

2013-06-14 Thread Ramkumar Ramachandra
SZEDER Gábor wrote: > _git_fp () { _git_format_patch ; } Good stopgap, thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH v6 22/31] git-remote-mediawiki: Modify strings for a better coding-style

2013-06-14 Thread Célestin Matte
From: Célestin Matte - strings which don't need interpolation are single-quoted for more clarity and slight gain of performance - interpolation is preferred over concatenation in many cases, for more clarity - variables are always used with the ${} operator inside strings - strings including doub

[PATCH v6 16/31] git-remote-mediawiki: Remove unused variable $entry

2013-06-14 Thread Célestin Matte
From: Célestin Matte Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index 68df6e4..2cfbc0a 10

[PATCH v6 17/31] git-remote-mediawiki: Rename a variable ($last) which has the name of a keyword

2013-06-14 Thread Célestin Matte
From: Célestin Matte Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl

[PATCH v6 25/31] git-remote-mediawiki: Don't use quotes for empty strings

2013-06-14 Thread Célestin Matte
From: Célestin Matte Empty strings are replaced by an $EMPTY constant. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/contrib/mw-to-git/git-remote

[PATCH v6 23/31] git-remote-mediawiki: Brace file handles for print for more clarity

2013-06-14 Thread Célestin Matte
From: Célestin Matte This follows the following rule: InputOutput::RequireBracedFileHandleWithPrint (Severity: 1) The `print' and `printf' functions have a unique syntax that supports an optional file handle argument. Conway suggests wrapping this argument in braces to make it visuall

[PATCH v6 30/31] git-remote-mediawiki: add a perlcritic rule in Makefile

2013-06-14 Thread Célestin Matte
From: Célestin Matte Option "-2" launches perlcritic with level 2. Levels go from 5 (most pertinent) to 1. Rules of level 1 are mostly a question of style, and are therefore ignored. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/Makefile | 2 ++ 1 file change

[PATCH v6 18/31] git-remote-mediawiki: Assign a variable as undef and make proper indentation

2013-06-14 Thread Célestin Matte
From: Célestin Matte Explicitly assign local variable $/ as undef and make a proper one-instruction-by-line indentation Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --g

[PATCH v6 19/31] git-remote-mediawiki: Check return value of open

2013-06-14 Thread Célestin Matte
From: Célestin Matte Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index

[PATCH v6 26/31] git-remote-mediawiki: Put non-trivial numeric values in constants.

2013-06-14 Thread Célestin Matte
From: Célestin Matte Non-trivial numeric values (e.g., different from 0, 1 and 2) are placed in constants at the top of the code to be easily modifiable and to make more sense Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 20 ++

[PATCH v6 24/31] git-remote-mediawiki: Replace "unless" statements with negated "if" statements

2013-06-14 Thread Célestin Matte
From: Célestin Matte Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.

[PATCH v6 31/31] git-remote-mediawiki: Make error message more precise

2013-06-14 Thread Célestin Matte
From: Célestin Matte In subroutine parse_command, error messages were not correct. For the "import" function, having too much or incorrect arguments displayed both "invalid arguments", while it displayed "too many arguments" for the "option" functions under the same conditions. Separate the two e

[PATCH v6 29/31] git-remote-mediawiki: Add a .perlcriticrc file

2013-06-14 Thread Célestin Matte
From: Célestin Matte Such a file allows to configure perlcritic. Here, it is used to remove many unwanted rules and configure one to remove unwanted warnings. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/.perlcriticrc | 28 1 fil

[PATCH v6 11/31] git-remote-mediawiki: Change style in a regexp

2013-06-14 Thread Célestin Matte
From: Célestin Matte In this regexp, ' |\n' is used, whereas its equivalent '[ \n]', which is clearer, is used elsewhere. Make the style coherent. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 2 +- 1 file changed, 1 insertion(+),

[PATCH v6 03/31] git-remote-mediawiki: Replace :utf8 by :encoding(UTF-8)

2013-06-14 Thread Célestin Matte
From: Célestin Matte Follow perlcritic's InputOutput::RequireEncodingWithUTF8Layer policy Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/mw-to-git/git-r

[PATCH v6 21/31] git-remote-mediawiki: Put long code into a subroutine

2013-06-14 Thread Célestin Matte
From: Célestin Matte Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 56 - 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/gi

[PATCH v6 15/31] git-remote-mediawiki: Turn double-negated expressions into simple expressions

2013-06-14 Thread Célestin Matte
From: Célestin Matte Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl

[PATCH v6 14/31] git-remote-mediawiki: Change the name of a variable

2013-06-14 Thread Célestin Matte
From: Célestin Matte Local variable $url has the same name as a global variable. Changing the name of the local variable prevents future possible misunderstanding. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 6 +++--- 1 file chan

[PATCH v6 13/31] git-remote-mediawiki: Add newline in the end of die() error messages

2013-06-14 Thread Célestin Matte
From: Célestin Matte Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-r

[PATCH v6 27/31] git-remote-mediawiki: Fix a typo ("mediwiki" instead of "mediawiki")

2013-06-14 Thread Célestin Matte
From: Célestin Matte Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl inde

[PATCH v6 10/31] git-remote-mediawiki: Change separator of some regexps

2013-06-14 Thread Célestin Matte
From: Célestin Matte Use {}{} instead of /// when slashes are used inside the regexp so as not to escape it. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cont

[PATCH v6 20/31] git-remote-mediawiki: remove import of unused open2

2013-06-14 Thread Célestin Matte
From: Célestin Matte Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index 82684f3..e3a79db 10

[PATCH v6 28/31] git-remote-mediawiki: Clearly rewrite double dereference

2013-06-14 Thread Célestin Matte
From: Célestin Matte @$var structures are re-written in the following way: @{$var} It makes them more readable. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a

[PATCH v6 02/31] git-remote-mediawiki: Move "use warnings;" before any instruction

2013-06-14 Thread Célestin Matte
From: Célestin Matte Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index

[PATCH v6 12/31] git-remote-mediawiki: Change style in a regexp

2013-06-14 Thread Célestin Matte
From: Célestin Matte Change '[\n]' to '\n': brackets are useless here. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/c

[PATCH v6 08/31] git-remote-mediawiki: Remove useless regexp modifier (m)

2013-06-14 Thread Célestin Matte
From: Célestin Matte m// and // is used randomly. It is better to use the m modifier only when needed, e.g., when the regexp uses another separator than //. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 6 +++--- 1 file changed, 3

Re: [PATCH 5/6] status: do not depend on flaky reflog messages

2013-06-14 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Junio C Hamano wrote: >>> What is wrong with git describe? Is this cheaper, or am I missing >>> something? >> >> I think what you are missing is that the "detached from" is not >> about your current HEAD after you flipped it around with many resets >> and commits.

[PATCH v6 09/31] git-remote-mediawiki: Change the behaviour of a split

2013-06-14 Thread Célestin Matte
From: Célestin Matte A "split ' '" is turned into a "split / /", which changes its behaviour: the old method matched a run of whitespaces (/\s*/), while the new one will match a single space, which is what we want here. Indeed, in other contexts, changing split(' ') to split(/ /) could potentiall

[PATCH v6 07/31] git-remote-mediawiki: Rewrite unclear line of instructions

2013-06-14 Thread Célestin Matte
From: Célestin Matte Subroutines' parameters should be assigned to variable before doing anything else Besides, existing instruction affected a variable inside a "if", which break Git's coding style Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-med

[PATCH v6 04/31] git-remote-mediawiki: Always end a subroutine with a return

2013-06-14 Thread Célestin Matte
From: Célestin Matte Follow Subroutines::RequireFinalReturn Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 18 ++ 1 file changed, 18 insertions(+) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/

[PATCH v6 06/31] git-remote-mediawiki: Change syntax of map calls

2013-06-14 Thread Célestin Matte
From: Célestin Matte Put first parameter of map inside a block, for better readability. Follow BuiltinFunctions::RequireBlockMap Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 14 -- 1 file changed, 8 insertions(+), 6 de

[PATCH v6 05/31] git-remote-mediawiki: Move a variable declaration at the top of the code

2013-06-14 Thread Célestin Matte
From: Célestin Matte %basetimestamps declaration was lost in the middle of subroutines Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/mw-to-git/git-remo

[PATCH v6 00/31] git-remote-mediawiki: Follow perlcritic's recommandations

2013-06-14 Thread Célestin Matte
From: Célestin Matte A new version of this series of patch, to make it mergeable with next. Changes with v5: - Fix a bug in [21/31] - Build on top of next so that it's mergeable Changes with v4: - fixed typos - Change in [21/31]: all the processing is done within the subroutine Changes with

Re: [PATCH] format-patch: remove existing output-directory

2013-06-14 Thread SZEDER Gábor
On Fri, Jun 14, 2013 at 07:04:18PM +0530, Ramkumar Ramachandra wrote: > My main itch is that completion doesn't work with my fp: > > alias.fp = !rm -rf outgoing && git format-patch -M -C -o outgoing Why not define your custom completion function for this alias in your .bashrc? _git_fp () { _

  1   2   >