List all files and directories but include the latest commits date and
subject, similar to the file browser in web-UIs of services like GitHub.
Also sort the entries by the commits date and time to see the most
recent changed files/folders at the bottom.
When an argument is passed that does not exist, `ls` always prints the
directory name for the existing ones, even if there is only one
remaining directory that is listed.
`ls` prints a warning if a non-flag argument is specified that does not
exist.
Previously ls-show-hidden assumed that all arguments that are neither a
directory nor an otherwise existing file are flags. As all flags are
passed to the ls call the warning still got printed, but this also lead
to the current working directory (i.e. `.`) being added to the
directories to process.
If `ls` expects an argument to a flag, it is always passed in the format
`--flag=arg` where the equal sign is mandatory. This makes it possible
to simply filter out all flags (and their arguments) from the other
arguments without needing to know which flags take an argument and which
don't.
Fix this behaviour by printing the same warning as `ls` does when an
argument is neither a flag, nor a directory nor an existing file. Also
only add `.` to the directories if *really* only flags were passed.
Move `git-commit-last-msg` into an autoloadable function. This way it
can also be executed as external script and thus in a git alias. This
makes it additionally possible to call it in vim over fugitive's `:Git`.
Pass all given arguments to `git worktree add`. This makes it possible
to directly create a new branch with `-b` for example. As the arguments
are not used anywhere else, this should not introduce any parsing
issues.
Update the function to use the current `.git/modules/` structure, by
only using the basename of the path.
I am not sure when this was changed and too lazy right now to find it
out.
Move `git-track` into its own autoloadable function.
This way it is better maintainable as in one-liner format and brings the
possibility of having more complexity (e.g. for better portability).
By that it is also now executable as `git-spull` as well as `git spull`
as before.
Wrap lines at 80 columns where appropriate and I had the energy to think
about how/where to wrap.
There are still lines longer than that, which I plan to wrap in the
future. But that is enough for now.
When using the zettel as a commit message this is also convenient as git
will ignore everything behind it. (Which also means that all horizontal
rulers in a zettel should use atleast 4 dashes)
Escape slashes in the branch name before passing it to `mktemp`.
Otherwise it would complain with:
mktemp: invalid suffix [...], contains directory separator
Add description in one sentence and use cases for this.
Remove sentence about removing `TEMP_DIR` that is outdated since:
5a8b5ffd21 ("git:checkout-worktree: Use `mktemp` template")
Use a template that directly includes the repository name and the branch
checked out. This makes finding and deleting the worktree directory if
anything goes wrong a lot easier.
Checkout the worktree directly in the temporary directory. With that
`TEMP_DIR` becomes obsolete.
Fix the exit condition when the function is called outside of a git
repository.
Use zsh's `:t` History Expansion Modifier, as `$?` does not keep `git
rev-parse`'s exit code, but rather `basename`'s.
Split `toplevel` definition and assignment as the `local` builtin has
it's own exit code. Thus the function previously did not return if the
`PWD` was not in a git repo.
Some distributions ship older versions of `column` that do not have the
flags `-dNLO`. This is a workaround around this limitation that creates
the same output using other tools.
Move `git-track` into its own autoloadable function.
This way it is
better maintainable as in one-liner format and brings the possibility of
having more complexity (e.g. for better portability).
By that it is also now executable as `git-track` as well as `git track`
as before.
This annoys me in more cases than I thought. For example when checking
out a commit in the past in detached head mode and I want to see the
past commits before the current one.
Especially because there is no flag that can disable it again.
The flag has to be passed manually to `glog` now.