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>
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_
-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
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 +++--
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
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
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,
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
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
> ---
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
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 ++
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
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 &
-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
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
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>
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
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
-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
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
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
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
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
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>
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
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
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
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
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
> >
>
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
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 &&
-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 +
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
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 +
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>
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
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
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
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
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,
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,
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
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>
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 +
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
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
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
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* &
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 +
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
[+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:
> >
> > - $
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
> > ;;
>
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
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
[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=$
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
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 +
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
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
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>
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
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
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
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 "
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
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
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
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
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
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
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
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 () {
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
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
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
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 ++-
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
]: 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
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
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
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
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
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
magically disappear.
Thomas
' 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
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
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
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
istate->cache_changed |= CE_ENTRY_CHANGED;
>
> --
> 2.10.0-458-g8cce42d
>
--
Thomas
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.
, 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/
, 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
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
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
, 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
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/
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
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
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
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 */
> >
501 - 600 of 1952 matches
Mail list logo