Re: Missing git options

2018-02-06 Thread Martin Häcker
Hi all,

> Am 06.02.2018 um 01:43 schrieb brian m. carlson 
> <sand...@crustytoothpaste.net>:
> 
> I think this is likely to cause problems.  Many people use git log with
> --pretty to format commit hashes or messages into other programs.  I'm
> aware of multiple tools that will simply break if --graph or --patch
> become the default.  Requiring people to retrofit their tools to use
> --no-graph or --no-patch is likely to be a burden.

While I share your concern, this is something that will completely freeze 
development of the git tui which I cannot imagine is wanted.

If this where my tool, I would much rather advertise an output format 
specifically for scripting.

An interim solution could be something like an `—ignore-configuration` option 
that allows script writers to get predictable output. This however still 
freezes the default output of git forever.

So you will need something like —output-for=scripting|json|xml|whatever sooner 
or later. Mixing up the TUI for humans and for scripts is not going to be fun 
to evolve.

Best Regards,
Martin Häcker



signature.asc
Description: Message signed with OpenPGP


Missing git options

2018-02-05 Thread Martin Häcker
Hi there,

I just recently learned that not all command line switches seem to 
automatically correlate to options in the git configuration.

This seems something that should be relatively easy to fix.

What I’m most missing is

— snip —
[log]
graph = true
patch = true
— snap —

which would / should correspond to `git log —graph —patch`.

What do you guys think?

Best Regards,
Martin Häcker


signature.asc
Description: Message signed with OpenPGP


git stash ; git stash pop unstages all staged changes

2018-01-30 Thread Martin Häcker
Hi there,

I just lost quite some work, because `git stash; git stash pop` doesn’t seem to 
understand the concept of the index correctly.

To reproduce:

— snip —
dwt@crest ~/Desktop % mkdir test
dwt@crest ~/Desktop % cd test
dwt@crest ~/Desktop/test % git init
Initialized empty Git repository in /Users/dwt/Desktop/test/.git/
dwt@crest ~/Desktop/test (git)-[master] % touch foo
dwt@crest ~/Desktop/test (git)-[master] % git add foo
dwt@crest ~/Desktop/test (git)-[master] % git commit -m "initial commit"
[master (root-commit) 893b428] initial commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 foo
dwt@crest ~/Desktop/test (git)-[master] % echo "bar" >> foo
dwt@crest ~/Desktop/test (git)-[master] % git status
On branch master
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

modified:   foo

no changes added to commit (use "git add" and/or "git commit -a")
dwt@crest ~/Desktop/test (git)-[master] % git add foo
dwt@crest ~/Desktop/test (git)-[master] % git status
On branch master
Changes to be committed:
  (use "git reset HEAD ..." to unstage)

modified:   foo

dwt@crest ~/Desktop/test (git)-[master] % echo "baz" >> foo
dwt@crest ~/Desktop/test (git)-[master] % git diff
diff --git a/foo b/foo
index 5716ca5..e2994c5 100644
--- a/foo
+++ b/foo
@@ -1 +1,2 @@
 bar
+baz
dwt@crest ~/Desktop/test (git)-[master] % git status
On branch master
Changes to be committed:
  (use "git reset HEAD ..." to unstage)

modified:   foo

Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

modified:   foo

dwt@crest ~/Desktop/test (git)-[master] % git stash
Saved working directory and index state WIP on master: 893b428 initial commit
dwt@crest ~/Desktop/test (git)-[master] % git status
On branch master
nothing to commit, working tree clean
dwt@crest ~/Desktop/test (git)-[master] % git stash pop
On branch master
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

modified:   foo

no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (7a8d892120c0a231a529222dabeec1fd3594f514)
dwt@crest ~/Desktop/test (git)-[master] % git diff
diff --git a/foo b/foo
index e69de29..e2994c5 100644
--- a/foo
+++ b/foo
@@ -0,0 +1,2 @@
+bar
+baz

— snap —

What git stash does get right is that it does remove everything that is stashed 
from the current state of the repo, but what it doesn’t get right is restoring 
that state fatefully in `git stash pop`.

As a user, I would expect that `git stash pop` undoes the change that `git 
stash` inflicted.

Best Regards,
Martin Häcker


signature.asc
Description: Message signed with OpenPGP