[PATCH v8 2/6] stash: add test for the create command line arguments

2017-02-28 Thread Thomas Gummerer
Currently there is no test showing the expected behaviour of git stash create's command line arguments. Add a test for that to show the current expected behaviour and to make sure future refactorings don't break those expectations. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>

[PATCH v8 0/6] stash: support pathspec argument

2017-02-28 Thread Thomas Gummerer
echo original >expect && + test_cmp expect file && + test_cmp expect other-file && + git stash pop && + echo modified >expect && + test_cmp expect file && + test_cmp expect other-file +' + test_expect_

[PATCH v8 6/6] stash: allow pathspecs in the no verb form

2017-02-28 Thread Thomas Gummerer
-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 11 +++ git-stash.sh| 3 +++ t/t3903-stash.sh| 15 +++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentati

[PATCH v8 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-28 Thread Thomas Gummerer
files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt| 9 +++- git-stash.sh | 39 +++--

[PATCH v8 1/6] stash: introduce push verb

2017-02-28 Thread Thomas Gummerer
line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 3 +++ git-stash.sh

[PATCH v8 3/6] stash: refactor stash_create

2017-02-28 Thread Thomas Gummerer
the same. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/git-stash.sh b/git-stash.sh index 8365ebba2a..ef5d1b45be 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -58,8

Re: [PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-27 Thread Thomas Gummerer
On 02/27, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > + test -n "$untracked" || git ls-files --error-unmatch -- "$@" >/dev/null > > || exit 1 > > This silent "exit 1" made me scratch my head,

Re: [PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-27 Thread Thomas Gummerer
On 02/27, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > if test -z "$patch_mode" > > then > > - git reset --hard ${GIT_QUIET:+-q} > > + if test $# != 0 > > + th

Re: SHA1 collisions found

2017-02-26 Thread Thomas Braun
Am 25.02.2017 um 00:06 schrieb Jeff King: > So we don't actually know how Git would behave in the face of a SHA-1 > collision. It would be pretty easy to simulate it with something like: > > --- > diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c > index 22b125cf8..1be5b5ba3 100644 > ---

[PATCH v7 5/6] stash: use stash_push for no verb form

2017-02-25 Thread Thomas Gummerer
stash: simplify defaulting to "save" and reject unknown options"). However it was never the intent to allow that, but rather it was allowed accidentally. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 8 git-st

[PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-25 Thread Thomas Gummerer
files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt| 9 - git-stash.sh | 37 ++

[PATCH v7 1/6] stash: introduce push verb

2017-02-25 Thread Thomas Gummerer
line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 3 +++ git-stash.sh

[PATCH v7 0/6] stash: support pathspec argument

2017-02-25 Thread Thomas Gummerer
athspec shows no changes when there are none' ' - >file && - git add file && - git stash push not-file >actual && + >foo && + git add foo && + git commit -m "tmp" && + git stash push foo &

[PATCH v7 6/6] stash: allow pathspecs in the no verb form

2017-02-25 Thread Thomas Gummerer
-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 11 +++ git-stash.sh| 3 +++ t/t3903-stash.sh| 15 +++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentati

[PATCH v7 3/6] stash: refactor stash_create

2017-02-25 Thread Thomas Gummerer
the same. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/git-stash.sh b/git-stash.sh index 8365ebba2a..ef5d1b45be 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -58,8

[PATCH v7 2/6] stash: add test for the create command line arguments

2017-02-25 Thread Thomas Gummerer
Currently there is no test showing the expected behaviour of git stash create's command line arguments. Add a test for that to show the current expected behaviour and to make sure future refactorings don't break those expectations. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>

Re: [PATCH v6 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-25 Thread Thomas Gummerer
On 02/21, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > - git reset --hard ${GIT_QUIET:+-q} > > This hunk is probably the most important one to review in the whole > series, in the sense that these are entirely new code that did

Re: [PATCH v6 0/6] stash: support pathspec argument

2017-02-25 Thread Thomas Gummerer
On 02/20, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > @@ -55,10 +53,13 @@ push [-p|--patch] [-k|--[no-]keep-index] > > [-u|--include-untracked] [-a|--all] [-q > > > > Save your local modifications to a new 'stash

[PATCH v6 6/6] stash: allow pathspecs in the no verb form

2017-02-19 Thread Thomas Gummerer
-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 11 +++ git-stash.sh| 3 +++ t/t3903-stash.sh| 15 +++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentati

[PATCH v6 1/6] stash: introduce push verb

2017-02-19 Thread Thomas Gummerer
line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 3 +++ git-stash.sh

[PATCH v6 3/6] stash: refactor stash_create

2017-02-19 Thread Thomas Gummerer
the same. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/git-stash.sh b/git-stash.sh index 8365ebba2a..ef5d1b45be 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -58,8

[PATCH v6 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-19 Thread Thomas Gummerer
files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt| 9 - git-stash.sh

[PATCH v6 5/6] stash: use stash_push for no verb form

2017-02-19 Thread Thomas Gummerer
stash: simplify defaulting to "save" and reject unknown options"). However it was never the intent to allow that, but rather it was allowed accidentally. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 8 git-st

[PATCH v6 2/6] stash: add test for the create command line arguments

2017-02-19 Thread Thomas Gummerer
Currently there is no test showing the expected behaviour of git stash create's command line arguments. Add a test for that to show the current expected behaviour and to make sure future refactorings don't break those expectations. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>

[PATCH v6 0/6] stash: support pathspec argument

2017-02-19 Thread Thomas Gummerer
untracked=${1-"BUG: create_stash () -u requires an argument"} + untracked=${1?"BUG: create_stash () -u requires an argument"} ;; --) shift Thomas Gummerer (6): stash: introduce push verb stash: add te

Re: [PATCH v5 6/6] stash: allow pathspecs in the no verb form

2017-02-19 Thread Thomas Gummerer
On 02/17, Jeff King wrote: > On Fri, Feb 17, 2017 at 10:41:41PM +0000, Thomas Gummerer wrote: > > > Now that stash_push is used in the no verb form of stash, allow > > specifying the command line for this form as well. Always use -- to > > disambiguate pathspecs from ot

Re: [PATCH v5 3/6] stash: refactor stash_create

2017-02-19 Thread Thomas Gummerer
On 02/17, Jeff King wrote: > On Fri, Feb 17, 2017 at 10:41:38PM +0000, Thomas Gummerer wrote: > > > Refactor the internal stash_create function to use a -m flag for > > specifying the message and -u flag to indicate whether untracked files > > should be added to the st

Re: [PATCH v5 0/6] stash: support pathspec argument

2017-02-17 Thread Thomas Gummerer
On 02/17, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > [some people may see this message twice, as I forgot to check if the > copy I received had "Some A . Body" not enclosed in dq; blindly > doing "Reply-All" ended up

Re: [PATCH v5 0/6] stash: support pathspec argument

2017-02-17 Thread Thomas Gummerer
On 02/17, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > Thanks Matthieu, Peff and Junio for the discussion on v3 and v4. > > > > Changes since v4: > > Dropped patch 1 from the series, as it's already in master > > >

[PATCH v5 5/6] stash: use stash_push for no verb form

2017-02-17 Thread Thomas Gummerer
stash: simplify defaulting to "save" and reject unknown options"). However it was never the intent to allow that, but rather it was allowed accidentally. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 8 git-st

[PATCH v5 0/6] stash: support pathspec argument

2017-02-17 Thread Thomas Gummerer
foo && - git add foo && - STASH_ID=$(git stash create -m "create test message new style") && - echo "On master: create test message new style" >expect && - git show --pretty=%s -s ${STASH_ID} >actual &&

[PATCH v5 6/6] stash: allow pathspecs in the no verb form

2017-02-17 Thread Thomas Gummerer
-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 3 +++ t/t3903-stash.sh | 15 +++ 2 files changed, 18 insertions(+) diff --git a/git-stash.sh b/git-stash.sh index 2a33614cb7..1446fbe2e8 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -667,12 +

[PATCH v5 3/6] stash: refactor stash_create

2017-02-17 Thread Thomas Gummerer
the same. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 1 + git-stash.sh| 23 +++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt

[PATCH v5 1/6] stash: introduce push verb

2017-02-17 Thread Thomas Gummerer
line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 46 +

[PATCH v5 2/6] stash: add test for the create command line arguments

2017-02-17 Thread Thomas Gummerer
Currently there is no test showing the expected behaviour of git stash create's command line arguments. Add a test for that to show the current expected behaviour and to make sure future refactorings don't break those expectations. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>

[PATCH v5 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-17 Thread Thomas Gummerer
files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt| 11 ++ git-stash.sh

Re: [PATCH v4 4/7] stash: introduce new format create

2017-02-14 Thread Thomas Gummerer
On 02/14, Matthieu Moy wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > create_stash () { > > - stash_msg="$1" > > - untracked="$2" > > + stash_msg= > > + untracked= > > + new_style= > > + whi

Re: [PATCH v3 0/5] stash: support pathspec argument

2017-02-14 Thread Thomas Gummerer
On 02/14, Matthieu Moy wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > I'm almost convinced of special casing "-p". (Maybe I'm easy to > > convince as well, because it would be convenient ;) ) However it's a > > bit weird that now "git

Re: [PATCH v3 4/5] stash: introduce new format create

2017-02-14 Thread Thomas Gummerer
odernize this. In that case only the -m would go missing, but that's probably not the end of the world. The worse thing to do would be something like git stash create -u untracked, where the intended message was "-u untracked", but instead there is no message, but all untracked files are now included in the stash as well. In that light what you have above makes even more sense to me. Thanks! > I could go either way. > > -Peff -- Thomas

Re: [PATCH v3 0/5] stash: support pathspec argument

2017-02-13 Thread Thomas Gummerer
On 02/13, Jeff King wrote: > On Mon, Feb 13, 2017 at 10:35:31PM +0100, Matthieu Moy wrote: > > > > Is it really that dangerous, though? The likely outcome is Git saying > > > "nope, you don't have any changes to the file named drop". Of course the > > > user may have meant something different,

Re: [PATCH v3 2/5] stash: introduce push verb

2017-02-13 Thread Thomas Gummerer
On 02/13, Matthieu Moy wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > Introduce a new git stash push verb in addition to git stash save. The > > push verb is used to transition from the current command line arguments > > to a more conventional way,

Re: [PATCH v4 0/7] stash: support pathspec argument

2017-02-12 Thread Thomas Gummerer
On 02/12, Thomas Gummerer wrote: > Thanks Peff and Junio for the review of the last round. > Sorry it seems like I messed up the In-Reply-To header. Previous rounds were at: v1: http://public-inbox.org/git/20170121200804.19009-1-t.gumme...@gmail.com/ v2: http://public-inbox.o

[PATCH v4 3/7] stash: add test for the create command line arguments

2017-02-12 Thread Thomas Gummerer
Currently there is no test showing the expected behaviour of git stash create's command line arguments. Add a test for that to show the current expected behaviour and to make sure future refactorings don't break those expectations. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>

[PATCH v4 4/7] stash: introduce new format create

2017-02-12 Thread Thomas Gummerer
this change, it created a stash with the message "-m works", but now it creates a stash with the message "-m". Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 1 + git-stash.sh| 52 +

[PATCH v4 5/7] stash: teach 'push' (and 'create') to honor pathspec

2017-02-12 Thread Thomas Gummerer
files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt| 11 ++ git-stash.sh

[PATCH v4 6/7] stash: use stash_push for no verb form

2017-02-12 Thread Thomas Gummerer
something with a message, but changes their mind, and now would like to apply a stash, but forgets to remove the -m flag. E.g. git stash -m mes^H^H^Happly would result in a stash with the message apply, while the user might have intended to apply a previous stash. Signed-off-by: Thomas Gummerer <t.gu

[PATCH v4 7/7] stash: allow pathspecs in the no verb form

2017-02-12 Thread Thomas Gummerer
Now that stash_push is used in the no verb form of stash, allow specifying the command line for this form as well. Always use -- to disambiguate pathspecs from other non-option arguments. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 1 + t/t3903-stash.s

[PATCH v4 0/7] stash: support pathspec argument

2017-02-12 Thread Thomas Gummerer
amp;& + >untracked && + git stash push file && test_path_is_file untracked ' +test_expect_success 'stash without verb with pathspec' ' + >"foo bar" && + >foo && + >bar && + git add foo* &

[PATCH v4 2/7] stash: introduce push verb

2017-02-12 Thread Thomas Gummerer
line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 46 +

[PATCH v4 1/7] Documentation/stash: remove mention of git reset --hard

2017-02-12 Thread Thomas Gummerer
to a few files is introduced. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 2e9cef06e6..2e9e344cd7 100644 --- a/Documen

Re: [PATCH v3 0/5] stash: support pathspec argument

2017-02-12 Thread Thomas Gummerer
[+cc Matthieu Moy as author of a patch mentioned below] On 02/06, Jeff King wrote: > On Sun, Feb 05, 2017 at 08:26:37PM +0000, Thomas Gummerer wrote: > > > Thanks Junio for the review in the previous round. > > > > Changes since v2: > > > > - $

Re: [PATCH v3 5/5] stash: teach 'push' (and 'create') to honor pathspec

2017-02-11 Thread Thomas Gummerer
On 02/05, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > @@ -72,6 +72,11 @@ create_stash () { > > untracked="$1" > > new_style=t > > ;; >

Re: [PATCH v3 4/5] stash: introduce new format create

2017-02-11 Thread Thomas Gummerer
On 02/06, Jeff King wrote: > On Sun, Feb 05, 2017 at 08:26:41PM +0000, Thomas Gummerer wrote: > > > git stash create currently supports a positional argument for adding a > > message. This is not quite in line with how git commands usually take > > comments (using a -m f

Re: [PATCH v3 3/5] stash: add test for the create command line arguments

2017-02-11 Thread Thomas Gummerer
On 02/06, Jeff King wrote: > On Sun, Feb 05, 2017 at 08:26:40PM +0000, Thomas Gummerer wrote: > > > +test_expect_success 'create stores correct message' ' > > + >foo && > > + git add foo && > > + STASH_ID=$(git stash create "create

Re: [PATCH v3 2/5] stash: introduce push verb

2017-02-11 Thread Thomas Gummerer
[sorry for the late responses, life is keeping me busy] On 02/06, Jeff King wrote: > On Sun, Feb 05, 2017 at 08:26:39PM +0000, Thomas Gummerer wrote: > > > + -m|--message) > > + shift > > + stash_msg=$

Re: git/git-scm.com GH Issue Tracker

2017-02-06 Thread Thomas Ferris Nicolaisen
Adding Peff to cc as he is the current maintainer of the git-scm.com site/repo. On Mon, Feb 6, 2017 at 7:15 AM, Samuel Lijin wrote: > > I've taken the liberty of classifying them as shown below. > As a community member who cares a lot about that site, thank you! I would love

[PATCH v3 2/5] stash: introduce push verb

2017-02-05 Thread Thomas Gummerer
line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 46 +

[PATCH v3 1/5] Documentation/stash: remove mention of git reset --hard

2017-02-05 Thread Thomas Gummerer
to a few files is introduced. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 2e9cef06e6..2e9e344cd7 100644 --- a/Documen

[PATCH v3 0/5] stash: support pathspec argument

2017-02-05 Thread Thomas Gummerer
ed.sh index f372fc8ca8..9a98e31a3e 100755 --- a/t/t3905-stash-include-untracked.sh +++ b/t/t3905-stash-include-untracked.sh @@ -185,4 +185,30 @@ test_expect_success 'stash save --all is stash poppable' ' test -s .gitignore ' +test_expect_success 'stash push --include-untracked with path

[PATCH v3 3/5] stash: add test for the create command line arguments

2017-02-05 Thread Thomas Gummerer
Currently there is no test showing the expected behaviour of git stash create's command line arguments. Add a test for that to show the current expected behaviour and to make sure future refactorings don't break those expectations. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>

[PATCH v3 4/5] stash: introduce new format create

2017-02-05 Thread Thomas Gummerer
git stash create with positional arguments. This also adds a -u argument, for untracked files. This is already used internally as another positional argument, but can now be used from the command line. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.tx

[PATCH v3 5/5] stash: teach 'push' (and 'create') to honor pathspec

2017-02-05 Thread Thomas Gummerer
files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt| 11 ++ git-stash.sh

Re: [PATCH v2 1/4] Documentation/stash: remove mention of git reset --hard

2017-02-05 Thread Thomas Gummerer
On 01/30, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > Don't mention git reset --hard in the documentation for git stash save. > > It's an implementation detail that doesn't matter to the end user and > > thus shouldn't be e

Re: [PATCH v2 4/4] stash: support filename argument

2017-02-05 Thread Thomas Gummerer
On 01/30, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > Add an optional filename argument to git stash push, which allows for > > stashing a single (or multiple) files. > > You can give pathspec with one or more elements, so "

Re: [PATCH v2 3/4] introduce new format for git stash create

2017-02-04 Thread Thomas Gummerer
On 01/30, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > create_stash () { > > - stash_msg="$1" > > - untracked="$2" > > + stash_msg= > > + untracked= > > + new_style= &g

Re: [PATCH v2 2/4] stash: introduce push verb

2017-02-04 Thread Thomas Gummerer
On 01/30, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > Introduce a new git stash push verb in addition to git stash save. The > > push verb is used to transition from the current command line arguments > > to a more conventi

[PATCH v2 4/4] stash: support filename argument

2017-01-29 Thread Thomas Gummerer
files. Add an optional filename argument to git stash push, which allows for stashing a single (or multiple) files. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 9 + git-stash.sh| 30 +++--- t

[PATCH v2 2/4] stash: introduce push verb

2017-01-29 Thread Thomas Gummerer
filename argument to stash single files. Using that as a positional argument is much more consistent with the rest of git, than using the positional argument for the message. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh

[PATCH v2 1/4] Documentation/stash: remove mention of git reset --hard

2017-01-29 Thread Thomas Gummerer
to a few files is introduced. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 2e9cef06e6..0fc23c25ee 100644 --- a/Documen

[PATCH v2 0/4] stash: create filename argument

2017-01-29 Thread Thomas Gummerer
uot; >expect && + git show --pretty=%s ${STASH_ID} | head -n1 >actual && + test_cmp expect actual +' + test_expect_success 'stash -- stashes and restores the file' ' >foo && >bar && @@ -811,4 +829,19 @@ test_expect_success 'stash with

[PATCH v2 3/4] introduce new format for git stash create

2017-01-29 Thread Thomas Gummerer
git stash create with positional arguments. This also adds a -u argument, for untracked files. This is already used internally as another positional argument, but can now be used from the command line. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.tx

Re: [PATCH 3/3] stash: support filename argument

2017-01-29 Thread Thomas Gummerer
On 01/23, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > diff --git a/git-stash.sh b/git-stash.sh > > index d6b4ae3290..7dcce629bd 100755 > > --- a/git-stash.sh > > +++ b/git-stash.sh > > @@ -41,7 +41,7 @@ no_changes () {

Re: [PATCH 2/3] stash: introduce push verb

2017-01-29 Thread Thomas Gummerer
On 01/23, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > + stash_msg="$*" > > + > > + if test -z stash_msg > > A dollar-sign is missing here, I think. Yes, thanks. > > + then > > + push_s

Re: [PATCH 1/3] Documentation/stash: remove mention of git reset --hard

2017-01-28 Thread Thomas Gummerer
On 01/25, Junio C Hamano wrote: > Jeff King <p...@peff.net> writes: > > > On Sat, Jan 21, 2017 at 08:08:02PM +, Thomas Gummerer wrote: > > > >> diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt > >> index 2e9cef06e6..0ad5

Re: What's cooking in git.git (Jan 2017, #03; Thu, 19)

2017-01-24 Thread Thomas Braun
t v2.11 by mistake, which > has been fixed. Hi Junio, Sorry for asking a maybe obvious question. Will that be merged into maint as well? It is a regression in 2.11 so I would have expected to see that in maint. Thanks, Thomas

[PATCH 3/3] stash: support filename argument

2017-01-21 Thread Thomas Gummerer
files. Add an optional filename argument to git stash push, which allows for stashing a single (or multiple) files. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 8 git-stash.sh| 42 ++-

[PATCH 1/3] Documentation/stash: remove mention of git reset --hard

2017-01-21 Thread Thomas Gummerer
Don't mention git reset --hard in the documentation for git stash save. It's an implementation detail that doesn't matter to the end user and thus shouldn't be exposed to them. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 5 +++-- 1 file chan

[PATCH 0/3] stash: support filename argument

2017-01-21 Thread Thomas Gummerer
]: https://public-inbox.org/git/20170115142542.11999-1-t.gumme...@gmail.com/T/ Thomas Gummerer (3): Documentation/stash: remove mention of git reset --hard stash: introduce push verb stash: support filename argument Documentation/git-stash.txt | 13 - git-stash.sh| 123

[PATCH 2/3] stash: introduce push verb

2017-01-21 Thread Thomas Gummerer
filename argument to stash single files. Using that as a positional argument is much more consistent with the rest of git, than using the positional argument for the message. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh

Re: Idea: Add a filter option to 'git rebase'

2017-01-20 Thread Thomas Braun
Am 20.01.2017 um 23:28 schrieb Philip Oakley: > A recent question on stackoverflow > http://stackoverflow.com/questions/41753252/drop-commits-by-commit-message-in-git-rebase > sought to remove automatically commits that could be identified by > relevant words in the commit message. > > I had

Re: [RFC] stash: support filename argument

2017-01-16 Thread Thomas Gummerer
On 01/15, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > While working on a repository, it's often helpful to stash the changes > > of a single or multiple files, and leave others alone. Unfortunately > > git currently offers no

Re: feature request: allow to stash changed files

2017-01-15 Thread Thomas Gummerer
On 01/15, KES wrote: > http://stackoverflow.com/questions/3040833/stash-only-one-file-out-of-multiple-files-that-have-changed-with-git#comment32451416_3040833 > > Sometimes poople are forced to save stash for changed files. But there is no > such option ( You may just be lucky. I've been

[RFC] stash: support filename argument

2017-01-15 Thread Thomas Gummerer
files. Add a --file option to git stash save, which allows for stashing a single file. Specifying the --file argument multiple times allows stashing more than one file at a time. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Marked as RFC and without documentation updates to

Re: Bug Report: "git submodule deinit" fails right after a clone

2016-10-06 Thread Thomas Bétous
magically disappear. Thomas

Re: Bug Report: "git submodule deinit" fails right after a clone

2016-10-04 Thread Thomas Bétous
' to discard them Is the script working on your PC? Thank you in advance. Thomas On Wed, Sep 14, 2016 at 10:29 PM, Heiko Voigt <hvo...@hvoigt.net> wrote: > On Tue, Aug 30, 2016 at 01:45:56PM +0200, Thomas Bétous wrote: >> Are you able to reproduce this problem? > > No. I just did a c

Re: [PATCH tg/add-chmod+x-fix 2/2] t3700-add: protect one --chmod=+x test with POSIXPERM

2016-09-22 Thread Thomas Gummerer
On 09/21, Junio C Hamano wrote: > Johannes Sixt <j...@kdbg.org> writes: > > > But I came to a different conclusion as I said in a message that > > crossed yours. I hope Thomas can pick up the baton again. Sorry for not getting back earlier, my git time is quite limite

Re: [PATCH tg/add-chmod+x-fix 2/2] t3700-add: protect one --chmod=+x test with POSIXPERM

2016-09-20 Thread Thomas Gummerer
ex 100644 xfoo3 > ' > > -test_expect_success 'file status is changed after git add --chmod=+x' ' > +test_expect_success POSIXPERM 'file status is changed after git add > --chmod=+x' ' > echo "AM foo4" >expected && > echo foo >foo4 && > git add foo4 && > -- > 2.10.0.85.gea34e30 > -- Thomas

Re: [PATCH tg/add-chmod+x-fix 1/2] t3700-add: create subdirectory gently

2016-09-20 Thread Thomas Gummerer
athspec > is given' ' > ' > > test_expect_success 'no file status change if no pathspec is given in > subdir' ' > - mkdir sub && > + mkdir -p sub && > ( > cd sub && > >sub-foo1 && > -- > 2.10.0.85.gea34e30 > -- Thomas

Re: [PATCH v4 3/4] read-cache: introduce chmod_index_entry

2016-09-15 Thread Thomas Gummerer
istate->cache_changed |= CE_ENTRY_CHANGED; > > -- > 2.10.0-458-g8cce42d > -- Thomas

[PATCH v4 3/4] read-cache: introduce chmod_index_entry

2016-09-14 Thread Thomas Gummerer
As there are chmod options for both add and update-index, introduce a new chmod_index_entry function to do the work. Use it in update-index, while it will be used in add in the next patch. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- builtin/update-index.

[PATCH v4 2/4] update-index: add test for chmod flags

2016-09-14 Thread Thomas Gummerer
, which takes an int, but had a char passed in. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- builtin/update-index.c| 2 +- t/t2107-update-index-basic.sh | 13 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/builtin/update-index.c b/builtin/

[PATCH v4 4/4] add: modify already added files when --chmod is given

2016-09-14 Thread Thomas Gummerer
, regardless of the status of the file, make sure the option behaves the same way in git add. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- builtin/add.c | 47 --- builtin/checkout.c | 2 +- builtin/commit.c | 2 +- cache.h

[PATCH v4 0/4] git add --chmod: always change the file

2016-09-14 Thread Thomas Gummerer
be + or -, and changes the mode based on that, instead of using the 0777 or 0666 mode that was passed in from the outside. [4/4]: Adapted to the different behaviour of chmod_index_entry and added tests as suggested by Junio. Thomas Gummerer (4): add: document the chmod option

[PATCH v4 1/4] add: document the chmod option

2016-09-14 Thread Thomas Gummerer
The git add --chmod option was introduced in 4e55ed3 ("add: add --chmod=+x / --chmod=-x options", 2016-05-31), but was never documented. Document the feature. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-add.txt | 7 ++- 1 file changed, 6

[PATCH v3 4/4] add: modify already added files when --chmod is given

2016-09-12 Thread Thomas Gummerer
, regardless of the status of the file, make sure the option behaves the same way in git add. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- builtin/add.c | 36 +--- builtin/checkout.c | 2 +- builtin/commit.c | 2 +- cache.h

[PATCH v3 2/4] update-index: use the same structure for chmod as add

2016-09-12 Thread Thomas Gummerer
While the chmod options for update-index and the add have the same functionality, they are using different ways to parse and handle the option internally. Unify these modes in order to make further refactoring simpler. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- builtin/

[PATCH v3 3/4] read-cache: introduce chmod_index_entry

2016-09-12 Thread Thomas Gummerer
As there are chmod options for both add and update-index, introduce a new chmod_index_entry function to do the work. Use it in update-index, while it will be used in add in the next patch. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- builtin/update-index.c | 8 +--- c

[PATCH v3 1/4] add: document the chmod option

2016-09-12 Thread Thomas Gummerer
The git add --chmod option was introduced in 4e55ed3 ("add: add --chmod=+x / --chmod=-x options", 2016-05-31), but was never documented. Document the feature. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-add.txt | 7 ++- 1 file changed, 6

[PATCH v3 0/4] git add --chmod: always change the file

2016-09-12 Thread Thomas Gummerer
is useful, when we can keep the behaviour with multiple arguments in update-index the same. Thomas Gummerer (4): add: document the chmod option update-index: use the same structure for chmod as add read-cache: introduce chmod_index_entry add: modify already added files when --chmod is given

Re: [PATCH v2 2/4] update-index: use the same structure for chmod as add

2016-09-12 Thread Thomas Gummerer
On 09/11, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > @@ -955,10 +941,8 @@ int cmd_update_index(int argc, const char **argv, > > const char *prefix) > > PARSE_OPT_NOARG | /* disallow --cacheinfo= form */ > >

<    1   2   3   4   5   6   7   8   9   10   >